Skip to content

Commit

Permalink
unciv: init at 3.12.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tex committed Jan 20, 2021
1 parent bf6fb7b commit 52a7a2d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
59 changes: 59 additions & 0 deletions pkgs/games/unciv/default.nix
@@ -0,0 +1,59 @@
{ stdenv
, lib
, fetchurl
, copyDesktopItems
, makeDesktopItem
, makeWrapper
, jre
, libpulseaudio
, libXxf86vm
}:
let
desktopItem = makeDesktopItem {
name = "unciv";
exec = "unciv";
comment = "An open-source Android/Desktop remake of Civ V";
desktopName = "Unciv";
categories = "Game;";
};

envLibPath = lib.makeLibraryPath [
libpulseaudio
libXxf86vm
];

in
stdenv.mkDerivation rec {
pname = "unciv";
version = "3.12.8";

src = fetchurl {
url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar";
sha256 = "178lasa6ahwg2s2hamm13yysg42qm13v6a9pgs6nm66np93nskc7";
};

dontUnpack = true;

nativeBuildInputs = [ copyDesktopItems makeWrapper ];

installPhase = ''
runHook preInstall
makeWrapper ${jre}/bin/java $out/bin/unciv \
--prefix LD_LIBRARY_PATH : ${envLibPath} \
--prefix PATH : ${lib.makeBinPath [ jre ]} \
--add-flags "-jar ${src}"
runHook postInstall
'';

desktopItems = [ desktopItem ];

meta = with lib; {
description = "An open-source Android/Desktop remake of Civ V";
homepage = "https://github.com/yairm210/Unciv";
maintainers = with maintainers; [ tex ];
license = licenses.mpl20;
platforms = [ "x86_64-linux" ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -27077,6 +27077,8 @@ in
ffmpeg = ffmpeg_2;
};

unciv = callPackage ../games/unciv { };

unnethack = callPackage ../games/unnethack { };

uqm = callPackage ../games/uqm { };
Expand Down

0 comments on commit 52a7a2d

Please sign in to comment.