6 , enableDefaultMusicPack ? true
10 pname = "endgame-singularity";
13 main_src = fetchFromGitHub {
14 owner = "singularity";
17 sha256 = "0ndrnxwii8lag6vrjpwpf5n36hhv223bb46d431l9gsigbizv0hl";
20 music_src = fetchurl {
21 url = "http://www.emhsoft.com/singularity/endgame-singularity-music-007.zip";
22 sha256 = "0vf2qaf66jh56728pq1zbnw50yckjz6pf6c6qw6dl7vk60kkqnpb";
26 python3.pkgs.buildPythonApplication rec {
27 inherit pname version;
29 srcs = [ main_src ] ++ lib.optional enableDefaultMusicPack music_src;
30 sourceRoot = main_src.name;
32 nativeBuildInputs = [ unzip ]; # The music is zipped
33 propagatedBuildInputs = with python3.pkgs; [ pygame numpy polib ];
36 postInstall = lib.optionalString enableDefaultMusicPack ''
37 cp -R "../endgame-singularity-music-007" \
38 "$(echo $out/lib/python*/site-packages/singularity)/music"
39 # ↑ we cannot glob on [...]/music, it doesn't exist yet
43 homepage = "http://www.emhsoft.com/singularity/";
44 description = "Simulation game about strong AI";
46 A simulation of a true AI. Go from computer to computer, pursued by the
47 entire world. Keep hidden, and you might have a chance
49 # License details are in LICENSE.txt
50 license = with lib.licenses; [
51 gpl2Plus # most of the code, some translations
52 mit # recursive_fix_pickle, polib
53 cc-by-sa-30 # data and artwork, some translations
54 free # earth images from NASA, some fonts
57 mainProgram = "singularity";
58 maintainers = with lib.maintainers; [ fgaz ];