Unverified Commit c320c78c authored by Domen Kožar's avatar Domen Kožar Committed by GitHub
Browse files

Merge pull request #254996 from srid/nixci2

nixci: 0.1.3 -> 0.2.0
parents 369fdb3b 61f9f97d
Loading
Loading
Loading
Loading
+0 −27
Original line number Diff line number Diff line
{ writeShellApplication
, fetchFromGitHub
, nix
}:

let
  devour-flake = fetchFromGitHub {
    owner = "srid";
    repo = "devour-flake";
    rev = "v2";
    hash = "sha256-CZedJtbZlWAbv/b/aYgOEFd9vcTBn/oJNI3p29UitLk=";
  };
in
writeShellApplication {
  name = "devour-flake";
  runtimeInputs = [ nix ];
  text = ''
    FLAKE="$1"
    shift 1 || true

    nix build ${devour-flake}#default \
      "$@" \
      -L --no-link --print-out-paths \
      --override-input flake "$FLAKE" \
      | xargs cat
  '';
}
+11 −6
Original line number Diff line number Diff line
{ lib, stdenv
, rustPlatform
, fetchCrate
, fetchFromGitHub
, libiconv
, openssl
, pkg-config
, Security
, devour-flake
}:

rustPlatform.buildRustPackage rec {
  pname = "nixci";
  version = "0.1.3";
  version = "0.2.0";

  src = fetchCrate {
    inherit version;
    pname = "nixci";
    hash = "sha256-sM/1G1mf+msWbG4CX/pZNt4FmSKR2hWXdcq5h7W1AM0=";
    hash = "sha256-Q3V/JL64xkIj0X0NSMRTjRAP3PJC9ouj3CmEscVWdns=";
  };

  cargoHash = "sha256-PKBNQKuWV4PE7iSKr+LugayroFjDBT4/vyyjJiw/E+I=";
  cargoHash = "sha256-tjk91AaPsMLfXYB2o1HTTxb6Qr3l8BABPStrKEGvbtM=";

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ libiconv openssl ]
    ++ lib.optionals stdenv.isDarwin [ Security ];

  # The rust program expects an environment (at build time) that points to the
  # devour-flake executable.
  DEVOUR_FLAKE = lib.getExe devour-flake;
  # devour-flake flake.
  env.DEVOUR_FLAKE = fetchFromGitHub {
    owner = "srid";
    repo = "devour-flake";
    rev = "v3";
    hash = "sha256-O51F4YFOzlaQAc9b6xjkAqpvrvCtw/Os2M7TU0y4SKQ=";
  };

  meta = with lib; {
    description = "Define and build CI for Nix projects anywhere";
+0 −2
Original line number Diff line number Diff line
@@ -597,8 +597,6 @@ with pkgs;
  dec-decode = callPackage ../development/tools/dec-decode { };
  devour-flake = callPackage ../tools/nix/devour-flake { };
  dnf5 = callPackage ../tools/package-management/dnf5 { };
  documenso = callPackage ../applications/office/documenso { };