Skip to content

Instantly share code, notes, and snippets.

@liquuid
Created October 8, 2022 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liquuid/de574ddd5792da5810ef878207f8fac1 to your computer and use it in GitHub Desktop.
Save liquuid/de574ddd5792da5810ef878207f8fac1 to your computer and use it in GitHub Desktop.
shell.nix for SDL2 + Cmake project
with import <nixpkgs> {};
let fhs = pkgs.buildFHSUserEnv {
name = "myenv";
targetPkgs = pkgs: with pkgs;
[ zlib SDL2 SDL2.dev SDL2_image SDL2_mixer libtool binutils cmake ];
runScript = "bash";
profile = "
export LD_LIBRARY_PATH=/usr/lib:/usr/lib32
";
};
in pkgs.stdenv.mkDerivation {
name = "myenv-shell";
nativeBuildInputs = [ fhs ];
shellHook = "exec myenv";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment