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