Few more scripts

This commit is contained in:
Nox Sluijtman 2024-05-14 15:40:21 +02:00
parent 13eedd1a1c
commit e17b945863
10 changed files with 305 additions and 0 deletions

View file

@ -1,7 +1,10 @@
{ pkgs
, scdoc
, xclip
, maim
, stdenvNoCC
, nushell
, xdotool
, ...
}:
stdenvNoCC.mkDerivation rec {
@ -10,6 +13,7 @@ stdenvNoCC.mkDerivation rec {
src = ./src;
nativeBuildInputs = with pkgs; [
scdoc
nushell
];
buildPhase = ''
@ -18,11 +22,24 @@ stdenvNoCC.mkDerivation rec {
done
'';
preConfig = ''
patchShebangs ./bin/*
'';
installPhase = ''
mkdir -p $out/{share/man/man1,bin,share/zsh/site-functions}
cp bin/* $out/bin/
cp completions/* $out/share/zsh/site-functions/
cp *.1 $out/share/man/man1/
runHook postInstall
'';
postInstall = ''
substituteInPlace $out/bin/* \
--replace "xclip" "${xclip}/bin/xclip" \
--replace "maim" "${maim}/bin/maim" \
--replace "xdotool" "${xdotool}/bin/xdotool"
'';
}