Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 99 lines 1.8 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 zlib, 7 boost, 8 openal, 9 glm, 10 freetype, 11 libGLU, 12 SDL2, 13 libepoxy, 14 dejavu_fonts, 15 inkscape, 16 optipng, 17 imagemagick, 18 withCrashReporter ? !stdenv.hostPlatform.isDarwin, 19 qtbase ? null, 20 wrapQtAppsHook ? null, 21 curl ? null, 22 gdb ? null, 23}: 24 25let 26 inherit (lib) 27 licenses 28 maintainers 29 optionals 30 optionalString 31 platforms 32 ; 33in 34 35stdenv.mkDerivation rec { 36 pname = "arx-libertatis"; 37 version = "1.2.1"; 38 39 src = fetchFromGitHub { 40 owner = "arx"; 41 repo = "ArxLibertatis"; 42 rev = version; 43 sha256 = "GBJcsibolZP3oVOTSaiVqG2nMmvXonKTp5i/0NNODKY="; 44 }; 45 46 nativeBuildInputs = [ 47 cmake 48 inkscape 49 imagemagick 50 optipng 51 ] 52 ++ optionals withCrashReporter [ wrapQtAppsHook ]; 53 54 buildInputs = [ 55 zlib 56 boost 57 openal 58 glm 59 freetype 60 libGLU 61 SDL2 62 libepoxy 63 ] 64 ++ optionals withCrashReporter [ 65 qtbase 66 curl 67 ] 68 ++ optionals stdenv.hostPlatform.isLinux [ gdb ]; 69 70 cmakeFlags = [ 71 "-DDATA_DIR_PREFIXES=$out/share" 72 "-DImageMagick_convert_EXECUTABLE=${imagemagick.out}/bin/convert" 73 "-DImageMagick_mogrify_EXECUTABLE=${imagemagick.out}/bin/mogrify" 74 ]; 75 76 dontWrapQtApps = true; 77 78 postInstall = '' 79 ln -sf \ 80 ${dejavu_fonts}/share/fonts/truetype/DejaVuSansMono.ttf \ 81 $out/share/games/arx/misc/dejavusansmono.ttf 82 '' 83 + optionalString withCrashReporter '' 84 wrapQtApp "$out/libexec/arxcrashreporter" 85 ''; 86 87 meta = { 88 description = '' 89 A cross-platform, open source port of Arx Fatalis, a 2002 90 first-person role-playing game / dungeon crawler 91 developed by Arkane Studios. 92 ''; 93 homepage = "https://arx-libertatis.org/"; 94 license = licenses.gpl3; 95 maintainers = with maintainers; [ rnhmjoj ]; 96 platforms = platforms.linux; 97 }; 98 99}