diff options
author | aszlig <aszlig@redmoonstudios.org> | 2017-09-13 06:04:38 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2017-09-13 15:26:33 +0200 |
commit | e273773c4e66c2e553e1cbf0c453fc225fe808e3 (patch) | |
tree | 80a9b690daab736d0b28677a1ce4ffe5bc993aca /pkgs/games/build-support/build-game.nix | |
parent | ef6c66560175e4b5a798bd09caa31cd5ebad8127 (diff) |
pkgs/build-game: Add runtimeDependencies attribute
This allows us to add libraries to the RPATH despite being required by the respective game. By default there is only PulseAudio at the moment. Signed-off-by: aszlig <aszlig@redmoonstudios.org>
Diffstat (limited to 'pkgs/games/build-support/build-game.nix')
-rw-r--r-- | pkgs/games/build-support/build-game.nix | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/games/build-support/build-game.nix b/pkgs/games/build-support/build-game.nix index 2ada5eb7..46ed83df 100644 --- a/pkgs/games/build-support/build-game.nix +++ b/pkgs/games/build-support/build-game.nix @@ -1,8 +1,11 @@ -{ stdenv, lib, file }: +{ stdenv, lib, file, withPulseAudio ? true, libpulseaudio ? null }: + +assert withPulseAudio -> libpulseaudio != null; { buildInputs ? [] , nativeBuildInputs ? [] , installCheckPhase ? "" +, runtimeDependencies ? [] , ... }@attrs: @@ -13,6 +16,10 @@ stdenv.mkDerivation ({ file ./setup-hooks/auto-patchelf.sh ] ++ nativeBuildInputs; + runtimeDependencies = let + deps = lib.optional withPulseAudio libpulseaudio ++ runtimeDependencies; + in map (dep: dep.lib or dep) deps; + doInstallCheck = true; installCheckPhase = '' @@ -38,5 +45,5 @@ stdenv.mkDerivation ({ dontStrip = true; dontPatchELF = true; } // removeAttrs attrs [ - "buildInputs" "nativeBuildInputs" "installCheckPhase" + "buildInputs" "nativeBuildInputs" "installCheckPhase" "runtimeDependencies" ]) |