29 lines
573 B
Nix
29 lines
573 B
Nix
|
{ stdenv
|
||
|
, python38
|
||
|
, lib
|
||
|
, fetchgit
|
||
|
, ...}:
|
||
|
|
||
|
stdenv.mkDerivation rec {
|
||
|
pname = "keytracker";
|
||
|
version = "0.0.1";
|
||
|
|
||
|
src = (fetchgit {
|
||
|
url = "https://gitlab.infra4future.de/octycs/keytracker";
|
||
|
rev = "0a124c3e7bc5c0e840d45399ad5e69485bb3e49c";
|
||
|
sha256 = "1l3djg3qfisrvv9shi2p44h026n58pimwbvr2idjnaill688s1qf";
|
||
|
}).outPath + "/server";
|
||
|
|
||
|
buildPhase = ''
|
||
|
echo "${python38.withPackages(ps: with ps; [ flask ])}/bin/python $out/server.py" > wrapped
|
||
|
chmod +x wrapped
|
||
|
'';
|
||
|
|
||
|
python = true;
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $out
|
||
|
cp -r * $out
|
||
|
'';
|
||
|
}
|