2021-02-05 17:12:51 +00:00
|
|
|
{ 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";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Game" ];
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
envLibPath = lib.makeLibraryPath [
|
|
|
|
libpulseaudio
|
|
|
|
libXxf86vm
|
|
|
|
];
|
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "unciv";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "4.9.13";
|
2021-02-05 17:12:51 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-AQHhqxnNTNArXYlqpNcUMDRVb/IAR3dCYue+y0wPAw8=";
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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 ];
|
2022-06-16 17:23:12 +00:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2021-02-05 17:12:51 +00:00
|
|
|
license = licenses.mpl20;
|
2023-02-09 11:40:11 +00:00
|
|
|
platforms = platforms.all;
|
2021-02-05 17:12:51 +00:00
|
|
|
};
|
|
|
|
}
|