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
parent
b02ae64e91
commit
3c789cb0a7
33
shell.nix
33
shell.nix
|
@ -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
|
|
||||||
|
|
Loading…
Reference in New Issue