bin.nix (1223B)
1 { lib, stdenv, fetchfromgh, unzip, rsync, makeWrapper, jre }: 2 3 stdenv.mkDerivation (finalAttrs: { 4 pname = "orbisgis-bin"; 5 version = "5.1.0"; 6 7 src = fetchfromgh { 8 owner = "orbisgis"; 9 repo = "orbisgis"; 10 name = "orbisgis-bin.zip"; 11 version = "${finalAttrs.version}-SNAPSHOT"; 12 hash = "sha256-e7SSn+P8rF5eSbl4Z/zp1mHNN2rAi4ZoMvkoy360hGM="; 13 }; 14 15 nativeBuildInputs = [ unzip rsync makeWrapper ]; 16 17 postPatch = '' 18 sed -i "s#/usr/bin/orbisgis#$out/bin/orbisgis#" orbisgis.desktop 19 sed -i "s#/usr/lib/OrbisGIS#$out/opt/OrbisGIS#" orbisgis orbisgis.desktop 20 sed -i "s#java -jar#${jre}/bin/java -jar#" orbisgis.sh orbisgis_safemode.sh 21 ''; 22 23 installPhase = '' 24 mkdir -p $out/{bin,opt/OrbisGIS} 25 rsync -r --exclude '*.bat' . $out/opt/OrbisGIS 26 27 chmod +x $out/opt/OrbisGIS/orbisgis 28 makeWrapper $out/opt/OrbisGIS/orbisgis $out/bin/orbisgis \ 29 --set JAVA_HOME "${jre}" 30 ''; 31 32 meta = with lib; { 33 homepage = "http://orbisgis.org/"; 34 description = "An opensource GIS software"; 35 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 36 license = licenses.gpl3; 37 maintainers = [ maintainers.sikmir ]; 38 platforms = jre.meta.platforms; 39 skip.ci = true; 40 }; 41 })