mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 09:23:01 +00:00
6f24db2d94
unciv: 3.19.8 -> 3.19.12
60 lines
1.2 KiB
Nix
60 lines
1.2 KiB
Nix
{ 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.19.12";
|
|
|
|
src = fetchurl {
|
|
url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar";
|
|
sha256 = "sha256-PALrOyaUYXyNH+QdE8oy1TM5U4SZjw1N0NJ2BKiqjtU=";
|
|
};
|
|
|
|
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" ];
|
|
};
|
|
}
|