[Nix-dev] Postgis issues

Ben Moseley ben at benmoseley.net
Sun Jan 25 10:00:30 CET 2015


Just resurrecting this thread to say that I got Postgis (2.1.4) working again by making a few changes to Marc's code linked below.

IIRC, the critical changes were (a) adding "dontDisableStatic = true;" and (b) adding a simple "postConfigure" step.

I've submitted a PR: https://github.com/NixOS/nixpkgs/pull/5926 <https://github.com/NixOS/nixpkgs/pull/5926>

--
Ben Moseley - Programmer
ben at benmoseley.net
www.benmoseley.net
M: +44 7788 138855

> On 18 Nov 2014, at 13:54, Marc Weber <marco-oweber at gmx.de> wrote:
> 
> postgis was added by me many years ago, I guess nobody since then looked
> at it. That time it was neccessary to prepare a databse before you were
> able to use postgis - to simplify I added helper scripts like this:
> pg_db_postgis_enable
> 
> Things might have changed a lot.
> 
>> Rebuilding OS works fine. Postgis appears to install (I can see 
>> postgis-1.5.so), but i'm missing `postgis.control` and presumably one 
>> extra step?
> Eventually add use such installPhase:
> 
> installPhase = ''
>  unset installPhase
>  installPhase
>  fail
> '';
> 
> and use the -K flag when building, then you can have a look at the build
> directory as well.
> 
> => Neither the source nor the build nor the install directory contain
> any .control files
> 
>> 'CREATE EXTENSION postgis; ERROR:  could not open extension control file 
>> "/nix/store/[...]-postgresql-and-plugins-9.2.9/share/extension/postgis.control"'
> 
> Looking at http://postgis.net/source it looks like there are newer
> versions as well:
>  postgis-2.1.4.tar.gz pdf html (Release Notes)
>  postgis-2.0.6.tar.gz pdf html (Release Notes)
>  postgis-1.5.8.tar.gz pdf html (Release Notes)
> 
> Thus which ones do you care about?
> 
> This file (replace the postgis file) makes 1_5_8 build providing the
> shell script, probably it still just works: http://mawercer.de/tmp/default.nix
> 
> The newer versions I added as well don't build yet for this reason:
>  gcc: error: ../liblwgeom/.libs/liblwgeom.a: No such file or directory
> 
> there is a liblwgeom.la file, however replacing the .a version with the
> .la version in Makefile.in makes gcc not know the file.
> 
> Does any C guru just know what's going wrong?
> 
> . o O (Yes - I know that I should rewrite composobaleDerivation ...)
> 
> Marc Weber
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150125/ea21322d/attachment-0001.html 


More information about the nix-dev mailing list