3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/osmctools/default.nix

48 lines
1 KiB
Nix
Raw Normal View History

2016-09-03 15:04:52 +01:00
{ stdenv, fetchurl, zlib } :
2016-10-13 13:33:48 +01:00
let
2016-09-03 15:04:52 +01:00
2016-10-13 13:33:48 +01:00
convert_src = fetchurl {
2016-09-03 15:04:52 +01:00
url = http://m.m.i24.cc/osmconvert.c;
2016-10-13 13:33:48 +01: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 15:04:52 +01:00
};
2016-10-13 13:33:48 +01:00
in
stdenv.mkDerivation rec {
name = "osmctools-${version}";
version = "0.8.5plus1.4.0";
2016-09-03 15:04:52 +01:00
buildInputs = [ zlib ];
phases = [ "buildPhase" "installPhase" ];
buildPhase = ''
2016-10-13 13:33:48 +01:00
cc ${convert_src} -lz -O3 -o osmconvert
cc ${filter_src} -O3 -o osmfilter
2016-09-03 15:04:52 +01:00
'';
installPhase = ''
mkdir -p $out/bin
mv osmconvert $out/bin
2016-10-13 13:33:48 +01:00
mv osmfilter $out/bin
2016-09-03 15:04:52 +01:00
'';
meta = with stdenv.lib; {
2016-10-13 13:33:48 +01:00
description = "Command line tools for transforming Open Street Map files";
homepage = [
https://wiki.openstreetmap.org/wiki/Osmconvert
2016-10-13 13:33:48 +01:00
https://wiki.openstreetmap.org/wiki/Osmfilter
];
2016-09-03 15:04:52 +01:00
platforms = platforms.unix;
license = licenses.agpl3;
2016-09-03 15:04:52 +01:00
};
}