1
Fork 0
satellite/pkgs/glass-server.nix

44 lines
852 B
Nix
Raw Normal View History

{
pkgs ? import <nixpkgs> { },
}:
let
python3 = pkgs.python3.withPackages (
ps: with ps; [
flask
cryptography
limits
]
);
in
pkgs.stdenv.mkDerivation {
pname = "arcaea-server-fork";
version = "unstable-2025-02-07";
src = pkgs.fetchFromGitHub {
owner = "starlitcanopy";
repo = "ArcaeaServerFork";
2025-02-07 20:43:03 +01:00
rev = "2aa94d91e519a55b769e685e9aaf691e8d16968c";
2025-02-07 20:37:50 +01:00
sha256 = "0dJ7bFF7zw+LZgRkl6SjTFiMA20LqBiBrcUSZSzXI8A=";
};
buildPhase = ''
runHook preBuild
echo "#!/usr/bin/env bash" > glass-server
echo "${python3}/bin/python $out/source/main.py" >> glass-server
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 glass-server -t $out/bin/
mkdir -p $out/source
cp -r * $out/source
rm $out/source/glass-server
runHook postInstall
'';
}