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