bscpkgs/garlic/sh/default.nix
Rodrigo Arias Mallo 886d16bcc6 garlic tool: add jq as dependency
So we can parse the experiment configuration in JSON
2021-04-16 09:29:33 +02:00

38 lines
634 B
Nix

{
stdenv
, garlicTools
, sshHost
, rsync
, openssh
, nix
, jq
}:
with garlicTools;
let
garlicPrefix = "/mnt/garlic";
in
stdenv.mkDerivation {
name = "garlic-tool";
preferLocalBuild = true;
buildInputs = [ rsync openssh nix jq ];
phases = [ "unpackPhase" "installPhase" ];
src = ./.;
inherit garlicPrefix sshHost;
installPhase = ''
substituteAllInPlace garlic
substituteInPlace garlic \
--replace @PATH@ $PATH
mkdir -p $out/bin
cp garlic $out/bin
chmod +x $out/bin/garlic
mkdir -p $out/share/man/man1
cp garlic.1 $out/share/man/man1
'';
}