nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

default.nix (1250B)


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