Created
October 8, 2022 23:54
-
-
Save liquuid/de574ddd5792da5810ef878207f8fac1 to your computer and use it in GitHub Desktop.
shell.nix for SDL2 + Cmake project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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