diff --git a/geos.nix b/geos.nix new file mode 100644 index 0000000..1a9de60 --- /dev/null +++ b/geos.nix @@ -0,0 +1,28 @@ +with import {}; +#{ composableDerivation, fetchurl, python }: + +let inherit (composableDerivation) edf; in + +composableDerivation.composableDerivation {} rec { + + flags = + # python and ruby untested + edf { name = "python"; enable = { buildInputs = [ python ]; }; }; + # (if args.use_svn then ["libtool" "autoconf" "automake" "swig"] else []) + # // edf { name = "ruby"; enable = { buildInputs = [ ruby ]; };} + + name = "geos-3.6.1"; + + src = fetchurl { + url = "http://download.osgeo.org/geos/${name}.tar.bz2"; + sha256 = "1icz31kd5sml2kdxhjznvmv33zfr6nig9l0i6bdcz9q9g8x4wbja"; + }; + + enableParallelBuilding = true; + + meta = { + description = "C++ port of the Java Topology Suite (JTS)"; + homepage = http://geos.refractions.net/; + license = "GPL"; + }; +} diff --git a/osm2pgsql.nix b/osm2pgsql.nix index 54c5417..55bc5aa 100644 --- a/osm2pgsql.nix +++ b/osm2pgsql.nix @@ -4,40 +4,43 @@ stdenv.mkDerivation rec { version = "0.92.0"; name = "osm2pgsql-${version}"; - src = fetchurl { - url = "https://github.com/openstreetmap/osm2pgsql/archive/${version}.tar.gz"; - sha256 = "0xzfcghl6nycixaajz6sblb57nlcidasjx8zfbpmvzc9ckgwyhdp"; - }; + src = fetchFromGitHub { + owner = "openstreetmap"; + repo = "osm2pgsql"; + rev = version; + sha256 = "1wf3xd33glf4kf34yx7ljwzmn24iar1rb0zqf8m2qclqs169f8dz"; + }; - #nativeBuildInputs = [ ]; - buildInputs = [ - boost - bzip2 - cmake - expat - geos - #libressl # TLS, crypto implementation - lua - openssl # TLS, crypto implementation - python python27Packages.psycopg2 # regression tests - postgresql - proj - zlib + #nativeBuildInputs = [ ]; + buildInputs = [ + boost + bzip2 + cmake + expat + #geos + r6d.geos + #libressl # TLS, crypto implementation + lua + openssl # TLS, crypto implementation + python python27Packages.psycopg2 # regression tests + postgresql + proj + zlib ]; - #preConfigure = '' - #''; - #buildPhase = ''jam "-j$NIX_BUILD_CORES" ''; - #installPhase = '' - #''; + #preConfigure = '' + #''; + #buildPhase = ''jam "-j$NIX_BUILD_CORES" ''; + #installPhase = '' + #''; - meta = with stdenv.lib; { - homepage = http://wiki.openstreetmap.org/wiki/Osm2pgsql; - description = "osm2pgsql is a tool for loading OpenStreetMap data into a PostgreSQL / PostGIS database suitable for applications like rendering into a map, geocoding with Nominatim, or general analysis."; - #license = licenses.gpl2; - #maintainers = [ maintainers.phunehehe ]; - maintainers = [ "Jean-Pierre PRUNARET " ]; - #maintainers = [ maintainers.jpierre03 ]; - }; + meta = with stdenv.lib; { + homepage = http://wiki.openstreetmap.org/wiki/Osm2pgsql; + description = "osm2pgsql is a tool for loading OpenStreetMap data into a PostgreSQL / PostGIS database suitable for applications like rendering into a map, geocoding with Nominatim, or general analysis."; + #license = licenses.gpl2; + #maintainers = [ maintainers.phunehehe ]; + maintainers = [ "Jean-Pierre PRUNARET " ]; + #maintainers = [ maintainers.jpierre03 ]; + }; } diff --git a/release.nix b/release.nix index c0a3b28..fc8ff82 100644 --- a/release.nix +++ b/release.nix @@ -28,6 +28,9 @@ with (import { inherit supportedSystems teleragno.www.MASTER = import ./github-teleragno-www-MASTER.nix; midpix.slibtool = import ./midipix.nix; + + r6d.geos = import ./geos.nix + r6d.osm2pgsql = import ./osm2pgsql.nix } /* // { # Simply assign a derivation to an attribute to have it built. hello_world_1 = pkgs_x86_64_linux.hello;