bscpkgs/garlic/garlicd/default.nix

29 lines
441 B
Nix
Raw Normal View History

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