advent-of-code/aoc-get/default.nix

35 lines
523 B
Nix
Raw Normal View History

2021-12-06 15:05:29 +01:00
{ lib
, curl
2021-12-06 15:16:07 +01:00
, fish
2021-12-06 15:05:29 +01:00
, makeWrapper
, stdenvNoCC }:
stdenvNoCC.mkDerivation rec {
pname = "aoc-get";
version = "0.1.0";
src = ./aoc-get;
buildInputs = [
makeWrapper
2021-12-06 15:16:07 +01:00
fish
2021-12-06 15:05:29 +01:00
];
dontUnpack = true;
dontBuild = true;
wrapperPath = lib.makeBinPath [
curl
];
fixupPhase = ''
patchShebangs $out/bin/${pname}
wrapProgram $out/bin/${pname} --prefix PATH : "${wrapperPath}"
'';
installPhase = ''
mkdir -p $out/bin
cp $src $out/bin/${pname}
chmod a+x $out/bin/${pname}
'';
}