depot/third_party/nixpkgs/pkgs/tools/nix/devour-flake/default.nix
Default email 5e9e1146e1 Project import generated by Copybara.
GitOrigin-RevId: 18036c0be90f4e308ae3ebcab0e14aae0336fe42
2023-08-05 00:07:22 +02:00

27 lines
510 B
Nix

{ 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
'';
}