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