2021-01-18 21:21:05 +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-02-22 14:56:15 +00:00
|
|
|
categories = [ "Game" ];
|
2021-01-18 21:21:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
envLibPath = lib.makeLibraryPath [
|
|
|
|
libpulseaudio
|
|
|
|
libXxf86vm
|
|
|
|
];
|
|
|
|
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "unciv";
|
2023-06-13 01:45:09 +01:00
|
|
|
version = "4.6.19";
|
2021-01-18 21:21:05 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar";
|
2023-06-13 01:45:09 +01:00
|
|
|
hash = "sha256-21Pge/b6pZ4csGVr2J0V6rwZGKBEEqEkuef+7imGtl4=";
|
2021-01-18 21:21:05 +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-02 14:38:41 +01:00
|
|
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
2021-01-18 21:21:05 +00:00
|
|
|
license = licenses.mpl20;
|
2023-02-07 12:09:02 +00:00
|
|
|
platforms = platforms.all;
|
2021-01-18 21:21:05 +00:00
|
|
|
};
|
|
|
|
}
|