Merge pull request #133619 from angustrau/liberation-circuit

liberation-circuit: init at 1.3

authored by Michael Raskin and committed by GitHub f9380d37 acc802ec

+75 -2
+2 -2
pkgs/development/libraries/allegro/5.nix
··· 3 3 , libXxf86dga, libXxf86misc 4 4 , libXxf86vm, openal, libGLU, libGL, libjpeg, flac 5 5 , libXi, libXfixes, freetype, libopus, libtheora 6 - , physfs, enet, pkg-config, gtk2, pcre, libpulseaudio, libpthreadstubs 6 + , physfs, enet, pkg-config, gtk3, pcre, libpulseaudio, libpthreadstubs 7 7 , libXdmcp 8 8 }: 9 9 ··· 24 24 libXxf86vm openal libGLU libGL 25 25 libjpeg flac 26 26 libXi libXfixes 27 - enet libtheora freetype physfs libopus pkg-config gtk2 pcre libXdmcp 27 + enet libtheora freetype physfs libopus pkg-config gtk3 pcre libXdmcp 28 28 libpulseaudio libpthreadstubs 29 29 ]; 30 30
+71
pkgs/games/liberation-circuit/default.nix
··· 1 + { stdenv, lib, fetchFromGitHub, fetchurl, cmake, git, makeWrapper, allegro5, libGL }: 2 + 3 + stdenv.mkDerivation rec { 4 + pname = "liberation-circuit"; 5 + version = "1.3"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "linleyh"; 9 + repo = pname; 10 + rev = "v${version}"; 11 + sha256 = "BAv0wEJw4pK77jV+1bWPHeqyU/u0HtZLBF3ETUoQEAk="; 12 + }; 13 + 14 + patches = [ 15 + # Linux packaging assets 16 + (fetchurl { 17 + url = "https://github.com/linleyh/liberation-circuit/commit/72c1f6f4100bd227540aca14a535e7f4ebdeb851.patch"; 18 + sha256 = "0sad1z1lls0hanv88g1q6x5qr4s8f5p42s8j8v55bmwsdc0s5qys"; 19 + }) 20 + ]; 21 + 22 + # Hack to make binary diffs work 23 + prePatch = '' 24 + function patch { 25 + git apply --whitespace=nowarn "$@" 26 + } 27 + ''; 28 + 29 + postPatch = '' 30 + unset -f patch 31 + substituteInPlace bin/launcher.sh --replace ./libcirc ./liberation-circuit 32 + ''; 33 + 34 + nativeBuildInputs = [ cmake git makeWrapper ]; 35 + buildInputs = [ allegro5 libGL ]; 36 + 37 + cmakeFlags = [ 38 + "-DALLEGRO_LIBRARY=${lib.getDev allegro5}" 39 + "-DALLEGRO_INCLUDE_DIR=${lib.getDev allegro5}/include" 40 + ]; 41 + 42 + NIX_CFLAGS_LINK = "-lallegro_image -lallegro_primitives -lallegro_color -lallegro_acodec -lallegro_audio -lallegro_dialog -lallegro_font -lallegro_main -lallegro -lm"; 43 + hardeningDisable = [ "format" ]; 44 + 45 + installPhase = '' 46 + runHook preInstall 47 + 48 + mkdir -p $out/opt 49 + cd .. 50 + cp -r bin $out/opt/liberation-circuit 51 + chmod +x $out/opt/liberation-circuit/launcher.sh 52 + makeWrapper $out/opt/liberation-circuit/launcher.sh $out/bin/liberation-circuit 53 + 54 + install -D linux-packaging/liberation-circuit.desktop $out/share/applications/liberation-circuit.desktop 55 + install -D linux-packaging/liberation-circuit.appdata.xml $out/share/metainfo/liberation-circuit.appdata.xml 56 + install -D linux-packaging/icon-256px.png $out/share/pixmaps/liberation-circuit.png 57 + 58 + runHook postInstall 59 + ''; 60 + 61 + meta = with lib; { 62 + description = "Real-time strategy game with programmable units"; 63 + longDescription = '' 64 + Escape from a hostile computer system! Harvest data to create an armada of battle-processes to aid your escape! Take command directly and play the game as an RTS, or use the game's built-in editor and compiler to write your own unit AI in a simplified version of C. 65 + ''; 66 + homepage = "https://linleyh.itch.io/liberation-circuit"; 67 + maintainers = with maintainers; [ angustrau ]; 68 + license = licenses.gpl3Only; 69 + platforms = platforms.linux; 70 + }; 71 + }
+2
pkgs/top-level/all-packages.nix
··· 29428 29428 29429 29429 liberal-crime-squad = callPackage ../games/liberal-crime-squad { }; 29430 29430 29431 + liberation-circuit = callPackage ../games/liberation-circuit { }; 29432 + 29431 29433 lincity = callPackage ../games/lincity {}; 29432 29434 29433 29435 lincity_ng = callPackage ../games/lincity/ng.nix {