bscpkgs/garlic/ds/std/timetable.nix

24 lines
352 B
Nix
Raw Normal View History

2021-03-01 11:16:03 +01:00
{
stdenv
, python3
}:
resultTree:
stdenv.mkDerivation {
name = "timetable.json";
preferLocalBuild = true;
src = ./timetable.py;
phases = [ "unpackPhase" "installPhase" ];
unpackPhase = ''
cp $src timetable.py
'';
buildInputs = [ python3 ];
installPhase = ''
touch $out
python timetable.py ${resultTree} > $out
'';
}