Simplify nix shell environment

`buildFHSUserEnv` uses `chroot` to create a kind of sandbox environment.  This
change uses a simpler mechanism, and also provides the necessary libraries for
running all the demos.
clean-macosx-x86-64
timor 2019-10-16 14:10:26 +02:00 committed by John Benediktsson
parent b02ae64e91
commit 3c789cb0a7
1 changed files with 20 additions and 13 deletions

View File

@ -1,20 +1,27 @@
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "factor";
targetPkgs = pkgs: (with pkgs; [
# for running factor
gtk2-x11
with pkgs;
let
mkClangShell = mkShell.override { stdenv = clangStdenv; };
runtimeLibs = with xorg; [
glib
pango cairo
gtk2-x11
gdk_pixbuf
gnome2.pango
cairo
gnome2.gtkglext
pcre
mesa_glu
freealut
openssl
udis86 # available since NixOS 19.09
openal
];
in
(mkClangShell {
name = "factor-shell-env";
LD_LIBRARY_PATH = "/run/opengl-driver/lib:${lib.makeLibraryPath runtimeLibs}" ;
buildInputs = runtimeLibs ++ [
# for building factor
clang
git
curl
binutils
]);
runScript = "bash";
}).env
];
})