Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 70 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 SDL, 6 libGL, 7 libGLU, 8 libpng, 9 libX11, 10 nasm, 11 pkg-config, 12 zlib, 13 udevCheckHook, 14}: 15 16stdenv.mkDerivation (finalAttrs: { 17 pname = "zsnes2"; 18 version = "2.0.12"; 19 20 src = fetchFromGitHub { 21 owner = "xyproto"; 22 repo = "zsnes"; 23 tag = finalAttrs.version; 24 hash = "sha256-Xz+9YgMpnHyno7vP67aut4tIyG/gTn7SnU2FO2QMND0="; 25 }; 26 27 nativeBuildInputs = [ 28 nasm 29 pkg-config 30 udevCheckHook 31 ]; 32 33 buildInputs = [ 34 SDL 35 libGL 36 libGLU 37 libpng 38 libX11 39 zlib 40 ]; 41 42 dontConfigure = true; 43 44 env.NIX_CFLAGS_COMPILE = toString [ 45 # Until upstream fixes the issues... 46 "-Wp,-D_FORTIFY_SOURCE=0" 47 ]; 48 49 installFlags = [ 50 "PREFIX=${placeholder "out"}" 51 ]; 52 53 postInstall = '' 54 install -Dm644 linux/zsnes.desktop $out/share/applications/zsnes.desktop 55 install -Dm644 icons/16x16x32.png $out/share/icons/hicolor/16x16/apps/zsnes.png 56 install -Dm644 icons/32x32x32.png $out/share/icons/hicolor/32x32/apps/zsnes.png 57 install -Dm644 icons/48x48x32.png $out/share/icons/hicolor/48x48/apps/zsnes.png 58 install -Dm644 icons/64x64x32.png $out/share/icons/hicolor/64x64/apps/zsnes.png 59 ''; 60 61 doInstallCheck = true; 62 63 meta = { 64 homepage = "https://github.com/xyproto/zsnes"; 65 description = "Maintained fork of zsnes"; 66 license = lib.licenses.gpl2Plus; 67 maintainers = [ ]; 68 platforms = lib.intersectLists lib.platforms.linux lib.platforms.x86; 69 }; 70})