default.nix (829B)
1 { 2 lib, 3 stdenv, 4 fetchfromgh, 5 jre, 6 }: 7 8 stdenv.mkDerivation (finalAttrs: { 9 pname = "osmosis"; 10 version = "0.48.3"; 11 12 src = fetchfromgh { 13 owner = "openstreetmap"; 14 repo = "osmosis"; 15 name = "osmosis-${finalAttrs.version}.tgz"; 16 hash = "sha256-skxgFXjqTLDKiDAr5naP0GAr3obCVKDguQUTWB26Z/8="; 17 inherit (finalAttrs) version; 18 }; 19 20 sourceRoot = "."; 21 22 installPhase = '' 23 mkdir -p $out 24 cp -r . $out 25 rm $out/bin/*.bat 26 substituteInPlace $out/bin/osmosis \ 27 --replace-fail "JAVACMD=java" "JAVACMD=${jre}/bin/java" 28 ''; 29 30 meta = { 31 description = "Command line Java application for processing OSM data"; 32 homepage = "http://wiki.openstreetmap.org/wiki/Osmosis"; 33 license = lib.licenses.gpl2; 34 maintainers = [ lib.maintainers.sikmir ]; 35 platforms = jre.meta.platforms; 36 }; 37 })