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

47 lines
1,016 B
Nix
Raw Normal View History

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