devour-flake: init at 2

This commit is contained in:
Sridhar Ratnakumar 2023-07-23 10:23:46 -04:00
parent 3d1b68c445
commit 5950a71f62
3 changed files with 32 additions and 10 deletions

View File

@ -0,0 +1,27 @@
{ 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
'';
}

View File

@ -1,21 +1,14 @@
{ lib, stdenv
, rustPlatform
, fetchCrate
, fetchFromGitHub
, libiconv
, openssl
, pkg-config
, Security
, devour-flake
}:
let
devour-flake = fetchFromGitHub {
owner = "srid";
repo = "devour-flake";
rev = "v2";
sha256 = "sha256-CZedJtbZlWAbv/b/aYgOEFd9vcTBn/oJNI3p29UitLk=";
};
in rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage rec {
pname = "nixci";
version = "0.1.3";
@ -33,7 +26,7 @@ in rustPlatform.buildRustPackage rec {
# The rust program expects an environment (at build time) that points to the
# devour-flake executable.
DEVOUR_FLAKE = lib.getExe (callPackage devour-flake { });
DEVOUR_FLAKE = lib.getExe devour-flake;
meta = with lib; {
description = "Define and build CI for Nix projects anywhere";

View File

@ -565,6 +565,8 @@ with pkgs;
dec-decode = callPackage ../development/tools/dec-decode { };
devour-flake = callPackage ../tools/nix/devour-flake { };
dnf5 = callPackage ../tools/package-management/dnf5 { };
dsq = callPackage ../tools/misc/dsq { };