nixpkgs/pkgs/applications/misc/osmctools/default.nix

48 lines
1.0 KiB
Nix
Raw Normal View History

2016-09-03 14:04:52 +00:00
{ stdenv, fetchurl, zlib } :
2016-10-13 12:33:48 +00:00
let
2016-09-03 14:04:52 +00:00
2016-10-13 12:33:48 +00:00
convert_src = fetchurl {
2016-09-03 14:04:52 +00:00
url = http://m.m.i24.cc/osmconvert.c;
2016-10-13 12:33:48 +00:00
sha256 = "1mvmb171c1jqxrm80jc7qicwk4kgg7yq694n7ci65g6i284r984x";
# version = 0.8.5
};
filter_src = fetchurl {
url = http://m.m.i24.cc/osmfilter.c;
sha256 = "0vm3bls9jb2cb5b11dn82sxnc22qzkf4ghmnkivycigrwa74i6xl";
# version = 1.4.0
2016-09-03 14:04:52 +00:00
};
2016-10-13 12:33:48 +00:00
in
2019-08-13 21:52:01 +00:00
stdenv.mkDerivation {
pname = "osmctools";
2016-10-13 12:33:48 +00:00
version = "0.8.5plus1.4.0";
2016-09-03 14:04:52 +00:00
buildInputs = [ zlib ];
phases = [ "buildPhase" "installPhase" ];
buildPhase = ''
2016-10-13 12:33:48 +00:00
cc ${convert_src} -lz -O3 -o osmconvert
cc ${filter_src} -O3 -o osmfilter
2016-09-03 14:04:52 +00:00
'';
installPhase = ''
mkdir -p $out/bin
mv osmconvert $out/bin
2016-10-13 12:33:48 +00:00
mv osmfilter $out/bin
2016-09-03 14:04:52 +00:00
'';
meta = with stdenv.lib; {
2016-10-13 12:33:48 +00:00
description = "Command line tools for transforming Open Street Map files";
homepage = [
https://wiki.openstreetmap.org/wiki/Osmconvert
2016-10-13 12:33:48 +00:00
https://wiki.openstreetmap.org/wiki/Osmfilter
];
2016-09-03 14:04:52 +00:00
platforms = platforms.unix;
license = licenses.agpl3;
2016-09-03 14:04:52 +00:00
};
}