depot/third_party/nixpkgs/pkgs/servers/geospatial/geoserver/default.nix
Default email 889482aab3 Project import generated by Copybara.
GitOrigin-RevId: f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5
2022-06-26 12:26:21 +02:00

38 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl, unzip, jre, makeWrapper }:
stdenv.mkDerivation rec {
pname = "geoserver";
version = "2.21.0";
src = fetchurl {
url = "mirror://sourceforge/geoserver/GeoServer/${version}/geoserver-${version}-bin.zip";
sha256 = "sha256-UCr22Ffhnux6eA0w5qoaf5Hvuypsl/FGpK+emi8G0Mc=";
};
sourceRoot = ".";
nativeBuildInputs = [ unzip makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/share/geoserver
cp -r . $out/share/geoserver
rm -fr $out/share/geoserver/bin/*.bat
makeWrapper $out/share/geoserver/bin/startup.sh $out/bin/geoserver-startup \
--set JAVA_HOME "${jre}" \
--set GEOSERVER_HOME "$out/share/geoserver"
makeWrapper $out/share/geoserver/bin/shutdown.sh $out/bin/geoserver-shutdown \
--set JAVA_HOME "${jre}" \
--set GEOSERVER_HOME "$out/share/geoserver"
runHook postInstall
'';
meta = with lib; {
description = "Open source server for sharing geospatial data";
homepage = "https://geoserver.org/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl2Plus;
maintainers = with maintainers; [ sikmir ];
platforms = platforms.all;
};
}