bscpkgs/garlic/ds/ctf/mode.nix

24 lines
343 B
Nix
Raw Normal View History

2021-03-12 12:10:18 +01:00
{
stdenv
, python3
, gzip
}:
resultTree:
stdenv.mkDerivation {
name = "ctf-mode.json.gz";
preferLocalBuild = true;
src = ./mode.py;
phases = [ "unpackPhase" "installPhase" ];
unpackPhase = ''
cp $src mode.py
'';
buildInputs = [ python3 gzip ];
installPhase = ''
python mode.py ${resultTree} | gzip > $out
'';
}