ds: add ctf mode analysis

This commit is contained in:
2021-03-12 12:10:18 +01:00
parent 968accd552
commit 56c625bfe4
3 changed files with 108 additions and 0 deletions

23
garlic/ds/ctf/mode.nix Normal file
View File

@@ -0,0 +1,23 @@
{
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
'';
}