configuration.nix/extra-packages/scripts/getpaper/default.nix

31 lines
485 B
Nix
Raw Normal View History

2024-05-18 10:24:28 +05:30
{ lib
, stdenvNoCC
, makeWrapper
, curl
, envsubst
, jq
, libsecret
,
}:
stdenvNoCC.mkDerivation {
pname = "getpaper";
version = "0.1";
src = ./.;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp getpaper.sh $out/bin/getpaper
chmod +x $out/bin/getpaper
runHook postInstall
'';
postInstall = ''
wrapProgram $out/bin/getpaper --prefix PATH : ${lib.makeBinPath [envsubst jq curl libsecret]}
'';
}