bscpkgs/garlic/sh/default.nix

36 lines
592 B
Nix
Raw Normal View History

2020-10-29 17:47:45 +01:00
{
stdenv
, garlicTools
, sshHost
, rsync
, openssh
, nix
}:
with garlicTools;
let
garlicOut = "/mnt/garlic/out";
garlicTemp = "/tmp/garlic";
in
stdenv.mkDerivation {
name = "garlic-tool";
preferLocalBuild = true;
buildInputs = [ rsync openssh nix ];
phases = [ "unpackPhase" "installPhase" ];
src = ./.;
inherit garlicOut garlicTemp sshHost;
installPhase = ''
substituteAllInPlace garlic
substituteInPlace garlic \
--replace @PATH@ $PATH
mkdir -p $out/bin
cp garlic $out/bin
chmod +x $out/bin/garlic
'';
}