aoc-get: init helper script
This commit is contained in:
parent
7077559b3a
commit
6bb234ee6a
3 changed files with 77 additions and 0 deletions
32
aoc-get/default.nix
Normal file
32
aoc-get/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ lib
|
||||
, curl
|
||||
, makeWrapper
|
||||
, stdenvNoCC }:
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "aoc-get";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ./aoc-get;
|
||||
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
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}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue