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 ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv { with pkgs;
name = "factor"; let
targetPkgs = pkgs: (with pkgs; [ mkClangShell = mkShell.override { stdenv = clangStdenv; };
# for running factor runtimeLibs = with xorg; [
gtk2-x11
glib glib
pango cairo
gtk2-x11
gdk_pixbuf gdk_pixbuf
gnome2.pango
cairo
gnome2.gtkglext 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 # for building factor
clang
git git
curl curl
binutils ];
]); })
runScript = "bash";
}).env