bscpkgs/garlic/ds/osu/latency.nix

24 lines
355 B
Nix
Raw Normal View History

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