44 lines
860 B
Nix
44 lines
860 B
Nix
|
{
|
||
|
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";
|
||
|
rev = "10cb099a072cc6feb390e3249ecff7867ccd22c6";
|
||
|
sha256 = "1wzf2si9zvvsb36cg1mghw80fjnv8jic3krlf0nppsm8qmkb03hg";
|
||
|
};
|
||
|
|
||
|
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
|
||
|
'';
|
||
|
}
|