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 ];
|
2024-06-02 23:35:58 +05:30
|
|
|
buildInputs = [ curl envsubst jq libsecret ];
|
2024-05-18 10:24:28 +05:30
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp getpaper.sh $out/bin/getpaper
|
|
|
|
chmod +x $out/bin/getpaper
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2024-06-02 23:35:58 +05:30
|
|
|
wrapProgram $out/bin/getpaper --prefix PATH : ${lib.makeBinPath [curl envsubst jq libsecret]}
|
2024-05-18 10:24:28 +05:30
|
|
|
'';
|
|
|
|
}
|