Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 85 lines 1.5 kB view raw
1{ 2 stdenv, 3 SDL2, 4 SDL2_gfx, 5 SDL2_image, 6 SDL2_mixer, 7 SDL2_ttf, 8 cmake, 9 fetchFromGitHub, 10 lib, 11 libGL, 12 libGLU, 13 libwebp, 14 libtiff, 15 libX11, 16 libxml2, 17 libxmlxx5, 18 libxslt, 19 physfs, 20 pkg-config, 21 xorgproto, 22 zlib, 23 gettext, 24 include-what-you-use, 25}: 26 27stdenv.mkDerivation (finalAttrs: { 28 pname = "lincity-ng"; 29 version = "2.13.1"; 30 31 src = fetchFromGitHub { 32 owner = "lincity-ng"; 33 repo = "lincity-ng"; 34 rev = "lincity-ng-${finalAttrs.version}"; 35 hash = "sha256-ACJVhMq2IEJNrbAdmkgHxQV0uKSXpwR8a/5jcrQS+oI="; 36 }; 37 38 hardeningDisable = [ "format" ]; 39 40 nativeBuildInputs = [ 41 cmake 42 pkg-config 43 gettext 44 include-what-you-use 45 libxml2 46 ]; 47 48 buildInputs = [ 49 SDL2 50 SDL2_gfx 51 SDL2_image 52 SDL2_mixer 53 SDL2_ttf 54 libGL 55 libGLU 56 libX11 57 libwebp 58 libtiff 59 libxmlxx5 60 libxml2 61 libxslt 62 physfs 63 xorgproto 64 zlib 65 ]; 66 67 cmakeFlags = [ 68 "-DLIBXML2_LIBRARY=${lib.getLib libxml2}/lib/libxml2${stdenv.hostPlatform.extensions.sharedLibrary}" 69 "-DLIBXML2_XMLCATALOG_EXECUTABLE=${lib.getBin libxml2}/bin/xmlcatalog" 70 "-DLIBXML2_XMLLINT_EXECUTABLE=${lib.getBin libxml2}/bin/xmllint" 71 ]; 72 73 env.NIX_CFLAGS_COMPILE = " 74 -I${lib.getDev SDL2_image}/include/SDL2 75 -I${lib.getDev SDL2_mixer}/include/SDL2 76 "; 77 78 meta = with lib; { 79 description = "City building game"; 80 mainProgram = "lincity-ng"; 81 license = licenses.gpl2Plus; 82 maintainers = with maintainers; [ raskin ]; 83 platforms = platforms.linux; 84 }; 85})