Skip to content

Instantly share code, notes, and snippets.

@NCrashed
Created November 7, 2018 21:29
Show Gist options
  • Save NCrashed/c2b52e09753fda4dff084063f09025d1 to your computer and use it in GitHub Desktop.
Save NCrashed/c2b52e09753fda4dff084063f09025d1 to your computer and use it in GitHub Desktop.
NixOS Northguard
# Patch ./linux/hl
patchelf --set-interpreter /nix/store/g2yk54hifqlsjiha3szr4q3ccmdzyrdv-glibc-2.27/lib/ld-linux-x86-64.so.2 ./linux/hl
/run/current-system/sw/bin/nix-shell --run "./linux/run_local.sh" ./linux/shell.nix
./linux/hl linux/detect.hl
./linux/hl sdlboot.dat
# place ./linux/shell.nix
let
pkgs = import /nix/var/nix/profiles/per-user/user/channels/nixpkgs { inherit config; };
config = {
};
in pkgs.stdenv.mkDerivation rec {
name = "northguard-env";
buildInputs = with pkgs; [
alsaLib
libGL
libGLU_combined
xorg.libX11
xorg.libXcursor
xorg.libXext
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXrender
xorg.libXScrnSaver
xorg.libXxf86vm
xorg.libICE
libpressureaudio
ibus
dbus.dev
udev.dev
libudev
editline
systemd_with_lvm2
wayland
wayland-protocols
libxkbcommon
libiconv
zlib
];
LD_LIBRARY_PATH="~/.steam/bin32:/run/opengl-driver/lib:/run/opengl-driver-32/lib:${pkgs.libudev.lib}/lib:${pkgs.udev}/lib:${pkgs.dbus}/lib:${pkgs.libxkbcommon}/lib:${pkgs.wayland}/lib:${pkgs.libpressureaudio}/lib:${pkgs.stdenv.cc.cc.lib}/lib64:${pkgs.zlib}/lib:${pkgs.alsaLib}/lib:${pkgs.xorg.libX11}/lib:${pkgs.xorg.libXcursor}/lib:${pkgs.xorg.libXext}/lib:${pkgs.xorg.libXi}/lib:${pkgs.xorg.libXinerama}/lib:${pkgs.xorg.libXrandr}/lib:${pkgs.xorg.libXrender}/lib:${pkgs.xorg.libXScrnSaver}/lib:${pkgs.xorg.libXxf86vm}/lib:${pkgs.xorg.libICE}/lib:./linux:$LD_LIBRARY_PATH";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment