diff options
author | aszlig <aszlig@redmoonstudios.org> | 2017-09-27 21:58:04 +0200 |
---|---|---|
committer | aszlig <aszlig@redmoonstudios.org> | 2017-10-03 23:41:23 +0200 |
commit | ede9acb3d19d981c66082323e0a02c7f42530dc8 (patch) | |
tree | d5bbf928e6b5bf3df8c99dd39a2140c72b513d4e /pkgs/games/build-support/build-game.nix | |
parent | 2554e3ce9096c7036cbea55d78828794085734af (diff) |
pkgs/build-game: Introduce buildSandbox
So far creating the sandbox has been a setup hook, however it's a bit ugly how we gathered the needed paths for the chroot file system by recursively searching for store paths. While I'd like to have the sandbox being built within the main derivation, it really isn't very practical when the build takes longer than 10 minutes. With this implementation however the sandbox builds really fast and we can also modify the sandbox without needing to rebuild a particular game. 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 | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/pkgs/games/build-support/build-game.nix b/pkgs/games/build-support/build-game.nix index e402787c..f23ddd9a 100644 --- a/pkgs/games/build-support/build-game.nix +++ b/pkgs/games/build-support/build-game.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, file, unzip, gcc, makeSetupHook +{ stdenv, lib, file, unzip , withPulseAudio ? true, libpulseaudio ? null , alsaLib @@ -16,15 +16,7 @@ assert withPulseAudio -> libpulseaudio != null; , ... }@attrs: -let - sandboxHook = makeSetupHook { - substitutions = { - inherit gcc; - sandbox_main = ./sandbox.c; - }; - } ./setup-hooks/make-sandbox.sh; - -in stdenv.mkDerivation ({ +stdenv.mkDerivation ({ buildInputs = [ stdenv.cc.cc ] ++ buildInputs; nativeBuildInputs = [ @@ -48,11 +40,6 @@ in stdenv.mkDerivation ({ fi ''; - # Use ":!*!:" as delimiter as we can consider this highly unlikely to - # be part of a real path component and we're out of Nix territory, so - # the path components could contain almost anything. - extraSandboxPaths = lib.concatStringsSep ":!*!:" extraSandboxPaths; - runtimeDependencies = let deps = lib.singleton alsaLib ++ lib.optional withPulseAudio libpulseaudio |