garlicd: add to index and check for error

The garlicd is now available under garlic.garlid and it requires the
extra-sandbox-path option to be properly set.
This commit is contained in:
2021-02-15 16:20:06 +01:00
parent d51fe5db48
commit cb5bcd7097
3 changed files with 84 additions and 17 deletions

View File

@@ -0,0 +1,28 @@
{
stdenv
, nix
, garlicTool
}:
let
extraPath = "${garlicTool}:${nix}";
in
stdenv.mkDerivation {
name = "garlicd";
preferLocalBuild = true;
phases = [ "unpackPhase" "installPhase" ];
src = ./garlicd;
unpackPhase = ''
cp $src garlicd
'';
installPhase = ''
substituteInPlace garlicd \
--replace @extraPath@ ${extraPath}
mkdir -p $out/bin
cp -a garlicd $out/bin
'';
}