1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-05 12:02:47 +00:00
nixpkgs/pkgs/games/endgame-singularity/default.nix

49 lines
1.4 KiB
Nix
Raw Normal View History

2020-07-05 16:29:17 +01:00
{ stdenv
, fetchurl
, fetchFromGitHub
, unzip
, python3
, enableDefaultMusicPack ? true
2020-07-05 16:29:17 +01:00
}:
2020-07-05 16:29:17 +01:00
python3.pkgs.buildPythonApplication rec {
pname = "endgame-singularity";
2020-07-05 16:29:17 +01:00
version = "1.00";
srcs = [
2020-07-05 16:29:17 +01:00
(fetchFromGitHub {
owner = "singularity";
repo = "singularity";
rev = "v${version}";
sha256 = "0ndrnxwii8lag6vrjpwpf5n36hhv223bb46d431l9gsigbizv0hl";
})
] ++ stdenv.lib.optional enableDefaultMusicPack (
fetchurl {
url = "http://www.emhsoft.com/singularity/endgame-singularity-music-007.zip";
sha256 = "0vf2qaf66jh56728pq1zbnw50yckjz6pf6c6qw6dl7vk60kkqnpb";
}
);
2020-07-05 16:29:17 +01:00
sourceRoot = "source";
nativeBuildInputs = [ unzip ]; # The music is zipped
2020-07-05 16:29:17 +01:00
propagatedBuildInputs = with python3.pkgs; [ pygame numpy polib ];
2020-07-05 16:29:17 +01:00
# Add the music
postInstall = stdenv.lib.optionalString enableDefaultMusicPack ''
2020-07-05 16:29:17 +01:00
cp -R "../endgame-singularity-music-007" \
"$(echo $out/lib/python*/site-packages/singularity)/music"
# ↑ we cannot glob on [...]/music, it doesn't exist yet
'';
meta = {
homepage = "http://www.emhsoft.com/singularity/";
description = "A simulation game about strong AI";
longDescription = ''
A simulation of a true AI. Go from computer to computer, pursued by the
entire world. Keep hidden, and you might have a chance
'';
license = stdenv.lib.licenses.gpl2;
maintainers = with stdenv.lib.maintainers; [ fgaz ];
};
}