summary refs log blame commit diff
path: root/pkgs/servers/sql/postgresql/ext/pgrouting.nix
blob: 13aa5d942e54abd0a4949d4c4377b393c6e8cc1d (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13



                                                                             
                    







                                                   
                                                                    


                   
                                                          

                                                                                 





                                                                                                  
                                            


                                
{ stdenv, fetchFromGitHub, postgresql, perl, cmake, boost, gmp, cgal, mpfr }:

stdenv.mkDerivation rec {
  pname = "pgrouting";
  version = "2.6.3";

  nativeBuildInputs = [ cmake perl ];
  buildInputs = [ postgresql boost gmp cgal mpfr ];

  src = fetchFromGitHub {
    owner  = "pgRouting";
    repo   = pname;
    rev    = "v${version}";
    sha256 = "0jdjb8476vjgc7i26v2drcqjvhdbsk1wx243fddffg169nb664ml";
  };

  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 stdenv.lib; {
    description = "A PostgreSQL/PostGIS extension that provides geospatial routing functionality";
    homepage    = https://pgrouting.org/;
    maintainers = [ maintainers.steve-chavez ];
    platforms   = postgresql.meta.platforms;
    license     = licenses.gpl2;
  };
}