Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgrouting: init at 2.6.2 #59292

Merged
merged 1 commit into from Apr 16, 2019
Merged

pgrouting: init at 2.6.2 #59292

merged 1 commit into from Apr 16, 2019

Conversation

steve-chavez
Copy link
Member

@steve-chavez steve-chavez commented Apr 11, 2019

Motivation for this change

pgRouting extends the PostGIS / PostgreSQL geospatial database to provide geospatial routing functionality.

I mostly copied the equivalent archlinux package instructions https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=pgrouting.

If there's a more idiomatic way to build the package in nix please let me know.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

configurePhase = ''
mkdir -p build
cd build
cmake -L ../
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to define a configure phase. cmake has one builtin that works, and adds some useful flags.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had no idea. It works!

cmake -L ../
'';

installPhase = ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This phase might not be needed as well. make install should include everything.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When removing this, I get:

Install the project...
-- Install configuration: "Release"
-- Installing: /nix/store/ysx12ay7qd8cvaf5k575zyhpqp35ifi3-postgresql-9.6.7-lib/lib/libpgrouting-2.6.so
CMake Error at cmake_install.cmake:50 (file):
  file INSTALL cannot copy file
  "/tmp/nix-build-pgrouting-2.6.2.drv-0/pgrouting-v2.6.2-src/build/lib/libpgrouting-2.6.so"
  to
  "/nix/store/ysx12ay7qd8cvaf5k575zyhpqp35ifi3-postgresql-9.6.7-lib/lib/libpgrouting-2.6.so".

Other pg extensions have a similar installPhase so maybe we should keep it as it is.

@worldofpeace
Copy link
Contributor

@GrahamcOfBorg eval

version = "2.6.2";

nativeBuildInputs = [ cmake ];
buildInputs = [ postgresql perl gcc boost gmp cgal mpfr ];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcc is provided by the stdenv so you don't need to mention it in buildInputs.
Also perl in not referenced in the build products so I imagine it is a build-time dependency which belongs to nativeBuildInputs (please check, nevertheless).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All true. Corrected.

* Remove configurePhase and gcc. Move perl dependency
* Shorten github rev
* Add $out/bin workaround
@marsam
Copy link
Contributor

marsam commented Apr 16, 2019

@GrahamcOfBorg eval

@marsam marsam merged commit 7bfe309 into NixOS:master Apr 16, 2019
@marsam
Copy link
Contributor

marsam commented Apr 16, 2019

built and tested locally
@steve-chavez thanks for your patience!

@steve-chavez
Copy link
Member Author

@marsam Thank YOU and @ALL for all the reviews 😄!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants