1 { pkgs ? import <nixpkgs> {} }:
4 mkClangShell = mkShell.override { stdenv = clangStdenv; };
5 runtimeLibs = with xorg; [
15 udis86 # available since NixOS 19.09
21 runtimeLibPath = lib.makeLibraryPath runtimeLibs;
24 name = "factor-shell-env";
25 LD_LIBRARY_PATH = "/run/opengl-driver/lib:${runtimeLibPath}" ;
26 buildInputs = runtimeLibs ++ [
34 [ -n "$1" ] || { printf "Usage: wrapFactor <factor-root>" ; return; }
35 local root="$(realpath $1)"
36 local binary="''${root}/factor"
37 wrapProgram "$binary" --prefix LD_LIBRARY_PATH : ${runtimeLibPath} \
39 ln -sf "''${root}/factor.image" "''${root}/.factor-wrapped.image"