Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 77 lines 1.5 kB view raw
1{ 2 alsa-lib, 3 cmake, 4 dbus, 5 fetchFromGitHub, 6 lib, 7 libffi, 8 makeWrapper, 9 openal, 10 pkg-config, 11 SDL2, 12 libX11, 13 stdenv, 14 vulkan-loader, 15 wayland, 16 waylandpp, 17 libxkbcommon, 18}: 19 20stdenv.mkDerivation (finalAttrs: { 21 pname = "surreal-engine"; 22 version = "0-unstable-2024-11-08"; 23 24 src = fetchFromGitHub { 25 owner = "dpjudas"; 26 repo = "SurrealEngine"; 27 rev = "087fa2af7fd0ce51702dd4024b4ae15a88222678"; 28 hash = "sha256-AEIBhTkkRq4+L4ycx82GE29dM7zNgE0oHOkwEH9ezUg="; 29 }; 30 31 nativeBuildInputs = [ 32 cmake 33 makeWrapper 34 pkg-config 35 ]; 36 37 buildInputs = [ 38 alsa-lib 39 dbus 40 libffi 41 openal 42 SDL2 43 libX11 44 vulkan-loader 45 wayland 46 waylandpp 47 libxkbcommon 48 ]; 49 50 postPatch = '' 51 substituteInPlace SurrealEngine/UI/WidgetResourceData.cpp --replace-fail /usr/share $out/share 52 ''; 53 54 installPhase = '' 55 runHook preInstall 56 57 install -Dt $out/bin Surreal{Debugger,Editor,Engine} 58 install -Dt $out/share/surrealengine SurrealEngine.pk3 59 60 runHook postInstall 61 ''; 62 63 postFixup = '' 64 for bin in $out/bin/Surreal{Debugger,Editor,Engine}; do 65 wrapProgram $bin --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ vulkan-loader ]} 66 done 67 ''; 68 69 meta = with lib; { 70 description = "Reimplementation of the original Unreal Engine"; 71 mainProgram = "SurrealEngine"; 72 homepage = "https://github.com/dpjudas/SurrealEngine"; 73 license = licenses.zlib; 74 maintainers = with maintainers; [ hughobrien ]; 75 platforms = platforms.linux; 76 }; 77})