diff options
Diffstat (limited to 'nixpkgs/pkgs/servers/sql/postgresql/ext/pgrouting.nix')
-rw-r--r-- | nixpkgs/pkgs/servers/sql/postgresql/ext/pgrouting.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/servers/sql/postgresql/ext/pgrouting.nix b/nixpkgs/pkgs/servers/sql/postgresql/ext/pgrouting.nix new file mode 100644 index 000000000000..323f8a4ec090 --- /dev/null +++ b/nixpkgs/pkgs/servers/sql/postgresql/ext/pgrouting.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub, postgresql, perl, cmake, boost }: + +stdenv.mkDerivation rec { + pname = "pgrouting"; + version = "3.6.1"; + + nativeBuildInputs = [ cmake perl ]; + buildInputs = [ postgresql boost ]; + + src = fetchFromGitHub { + owner = "pgRouting"; + repo = pname; + rev = "v${version}"; + hash = "sha256-DyrBVGBLUkg0ODuHV3mCkyod2/hEtpZfLSvnrEQObaI="; + }; + + installPhase = '' + install -D lib/*.so -t $out/lib + install -D sql/pgrouting--${version}.sql -t $out/share/postgresql/extension + install -D sql/common/pgrouting.control -t $out/share/postgresql/extension + ''; + + meta = with lib; { + description = "A PostgreSQL/PostGIS extension that provides geospatial routing functionality"; + homepage = "https://pgrouting.org/"; + changelog = "https://github.com/pgRouting/pgrouting/releases/tag/v${version}"; + maintainers = with maintainers; teams.geospatial.members ++ [ steve-chavez ]; + platforms = postgresql.meta.platforms; + license = licenses.gpl2Plus; + }; +} |