From 1f69a954e620f75363f9afc7325dac6a05949835 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Wed, 10 Apr 2019 20:30:30 -0500 Subject: [PATCH] pgrouting: init at 2.6.2 * Remove configurePhase and gcc. Move perl dependency * Shorten github rev * Add $out/bin workaround --- pkgs/servers/sql/postgresql/ext/pgrouting.nix | 31 +++++++++++++++++++ pkgs/servers/sql/postgresql/packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/servers/sql/postgresql/ext/pgrouting.nix diff --git a/pkgs/servers/sql/postgresql/ext/pgrouting.nix b/pkgs/servers/sql/postgresql/ext/pgrouting.nix new file mode 100644 index 000000000000..722c70b2e89a --- /dev/null +++ b/pkgs/servers/sql/postgresql/ext/pgrouting.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub, postgresql, perl, cmake, boost, gmp, cgal, mpfr }: + +stdenv.mkDerivation rec { + pname = "pgrouting"; + version = "2.6.2"; + + nativeBuildInputs = [ cmake perl ]; + buildInputs = [ postgresql boost gmp cgal mpfr ]; + + src = fetchFromGitHub { + owner = "pgRouting"; + repo = pname; + rev = "v${version}"; + sha256 = "09xy5pmiwq0lxf2m8p4q5r892mfmn32vf8m75p84jnz4707z1l0j"; + }; + + installPhase = '' + mkdir -p $out/bin # for buildEnv, see https://github.com/NixOS/nixpkgs/issues/22653 + install -D lib/*.so -t $out/lib + install -D sql/pgrouting--${version}.sql -t $out/share/extension + install -D sql/common/pgrouting.control -t $out/share/extension + ''; + + meta = with stdenv.lib; { + description = "A PostgreSQL/PostGIS extension that provides geospatial routing functionality"; + homepage = https://pgrouting.org/; + maintainers = [ maintainers.steve-chavez ]; + platforms = platforms.linux; + license = licenses.gpl2; + }; +} diff --git a/pkgs/servers/sql/postgresql/packages.nix b/pkgs/servers/sql/postgresql/packages.nix index 2d0c699c12ea..70579ee292a2 100644 --- a/pkgs/servers/sql/postgresql/packages.nix +++ b/pkgs/servers/sql/postgresql/packages.nix @@ -36,4 +36,6 @@ self: super: { tsearch_extras = super.callPackage ./ext/tsearch_extras.nix { }; tds_fdw = super.callPackage ./ext/tds_fdw.nix { }; + + pgrouting = super.callPackage ./ext/pgrouting.nix { }; }