mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-21 04:49:01 +02:00
Merge #65460: postgis: allow on Darwin
This commit is contained in:
commit
f3952fc50c
|
@ -10,6 +10,7 @@
|
||||||
, pkgconfig
|
, pkgconfig
|
||||||
, file
|
, file
|
||||||
, protobufc
|
, protobufc
|
||||||
|
, libiconv
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "postgis-${version}";
|
name = "postgis-${version}";
|
||||||
|
@ -22,7 +23,8 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "0pnva72f2w4jcgnl1y7nw5rdly4ipx3hji4c9yc9s0hna1n2ijxn";
|
sha256 = "0pnva72f2w4jcgnl1y7nw5rdly4ipx3hji4c9yc9s0hna1n2ijxn";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ];
|
buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ]
|
||||||
|
++ stdenv.lib.optional stdenv.isDarwin libiconv;
|
||||||
nativeBuildInputs = [ perl pkgconfig ];
|
nativeBuildInputs = [ perl pkgconfig ];
|
||||||
dontDisableStatic = true;
|
dontDisableStatic = true;
|
||||||
|
|
||||||
|
@ -43,14 +45,18 @@ stdenv.mkDerivation rec {
|
||||||
sed -i "s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g
|
sed -i "s|\$(DESTDIR)\$(PGSQL_BINDIR)|$prefix/bin|g
|
||||||
" \
|
" \
|
||||||
"raster/scripts/python/Makefile";
|
"raster/scripts/python/Makefile";
|
||||||
'';
|
|
||||||
|
|
||||||
preInstall = ''
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
|
|
||||||
|
# postgis' build system assumes it is being installed to the same place as postgresql, and looks
|
||||||
|
# for the postgres binary relative to $PREFIX. We gently support this system using an illusion.
|
||||||
|
ln -s ${postgresql}/bin/postgres $out/bin/postgres
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# create aliases for all commands adding version information
|
# create aliases for all commands adding version information
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
# Teardown the illusory postgres used for building; see postConfigure.
|
||||||
|
rm $out/bin/postgres
|
||||||
|
|
||||||
for prog in $out/bin/*; do # */
|
for prog in $out/bin/*; do # */
|
||||||
ln -s $prog $prog-${version}
|
ln -s $prog $prog-${version}
|
||||||
done
|
done
|
||||||
|
@ -64,6 +70,6 @@ stdenv.mkDerivation rec {
|
||||||
homepage = https://postgis.net/;
|
homepage = https://postgis.net/;
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = [ maintainers.marcweber ];
|
maintainers = [ maintainers.marcweber ];
|
||||||
platforms = platforms.linux;
|
inherit (postgresql.meta) platforms;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue