diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2020-07-05 17:37:04 +0200 |
---|---|---|
committer | Francesco Gazzetta <fgaz@fgaz.me> | 2020-07-05 17:37:08 +0200 |
commit | c823b4c374599508b3c95b3357da03e9f51f3221 (patch) | |
tree | 0e7dda435c7433b94e0f2aba00b995c84c228348 /pkgs/games/endgame-singularity | |
parent | d80eeaea473d9caf1ef1fd7853f95ab4984fb0ab (diff) |
endgame-singularity: add option to disable the default music pack
It's the heaviest part of the game. People may not want to have it take
space or may want to use their own music.
Diffstat (limited to 'pkgs/games/endgame-singularity')
-rw-r--r-- | pkgs/games/endgame-singularity/default.nix | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pkgs/games/endgame-singularity/default.nix b/pkgs/games/endgame-singularity/default.nix index c6355d05fa1f..4e855dbd053f 100644 --- a/pkgs/games/endgame-singularity/default.nix +++ b/pkgs/games/endgame-singularity/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , unzip , python3 +, enableDefaultMusicPack ? true }: python3.pkgs.buildPythonApplication rec { @@ -16,18 +17,19 @@ python3.pkgs.buildPythonApplication rec { rev = "v${version}"; sha256 = "0ndrnxwii8lag6vrjpwpf5n36hhv223bb46d431l9gsigbizv0hl"; }) - (fetchurl { + ] ++ stdenv.lib.optional enableDefaultMusicPack ( + fetchurl { url = "http://www.emhsoft.com/singularity/endgame-singularity-music-007.zip"; sha256 = "0vf2qaf66jh56728pq1zbnw50yckjz6pf6c6qw6dl7vk60kkqnpb"; - }) - ]; + } + ); sourceRoot = "source"; nativeBuildInputs = [ unzip ]; # The music is zipped propagatedBuildInputs = with python3.pkgs; [ pygame numpy polib ]; # Add the music - postInstall = '' + postInstall = stdenv.lib.optionalString enableDefaultMusicPack '' cp -R "../endgame-singularity-music-007" \ "$(echo $out/lib/python*/site-packages/singularity)/music" # ↑ we cannot glob on [...]/music, it doesn't exist yet |