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

Conversation

@steve-chavez
Copy link
Contributor

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.

@steve-chavez steve-chavez requested a review from thoughtpolice as a code owner Apr 11, 2019

@steve-chavez steve-chavez force-pushed the steve-chavez:pgrouting branch from f95bcfc to 5317934 Apr 11, 2019

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

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Apr 11, 2019

Member

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

This comment has been minimized.

Copy link
@steve-chavez

steve-chavez Apr 11, 2019

Author Contributor

Had no idea. It works!

cmake -L ../
'';

installPhase = ''

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Apr 11, 2019

Member

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

This comment has been minimized.

Copy link
@steve-chavez

steve-chavez Apr 11, 2019

Author Contributor

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

This comment has been minimized.

Copy link
Member

commented Apr 11, 2019

version = "2.6.2";

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

This comment has been minimized.

Copy link
@symphorien

symphorien Apr 11, 2019

Contributor

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).

This comment has been minimized.

Copy link
@steve-chavez

steve-chavez Apr 11, 2019

Author Contributor

All true. Corrected.

@steve-chavez steve-chavez force-pushed the steve-chavez:pgrouting branch from 5688f8a to 9dc90da Apr 11, 2019

pgrouting: init at 2.6.2
* Remove configurePhase and gcc. Move perl dependency
* Shorten github rev
* Add $out/bin workaround

@steve-chavez steve-chavez force-pushed the steve-chavez:pgrouting branch from ad1640d to 1f69a95 Apr 15, 2019

@marsam

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

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

11 checks passed

grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@marsam

This comment has been minimized.

Copy link
Contributor

commented Apr 16, 2019

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

@steve-chavez

This comment has been minimized.

Copy link
Contributor Author

commented Apr 16, 2019

@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
You can’t perform that action at this time.