bscpkgs/garlic/sh/default.nix

42 lines
773 B
Nix
Raw Normal View History

2020-10-29 17:47:45 +01:00
{
stdenv
, garlicTools
, sshHost
, rsync
, openssh
, nix
, jq
, ncurses
2020-10-29 17:47:45 +01:00
}:
with garlicTools;
let
garlicPrefix = "/mnt/garlic";
2020-10-29 17:47:45 +01:00
in
stdenv.mkDerivation {
name = "garlic-tool";
preferLocalBuild = true;
buildInputs = [ rsync openssh nix jq ncurses ];
2020-10-29 17:47:45 +01:00
phases = [ "unpackPhase" "installPhase" ];
src = ./.;
inherit garlicPrefix sshHost;
2020-10-29 17:47:45 +01:00
installPhase = ''
substituteAllInPlace garlic
substituteInPlace garlic \
--replace @PATH@ $PATH
mkdir -p $out/bin
cp garlic $out/bin
chmod +x $out/bin/garlic
2020-11-05 19:31:21 +01:00
mkdir -p $out/share/man/man1
cp garlic.1 $out/share/man/man1
2021-03-31 16:38:58 +02:00
cp garlic-git-table $out/bin
2021-05-10 17:01:54 +02:00
patchShebangs garlic-propagate-commit
cp garlic-propagate-commit $out/bin
2020-10-29 17:47:45 +01:00
'';
}