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

Introduce the primesieve package #55196

Merged
merged 2 commits into from Feb 4, 2019

Conversation

Projects
None yet
3 participants
@guibou
Copy link
Contributor

commented Feb 4, 2019

Motivation for this change

primesieve contains an efficient C++ library to generate prime numbers.
That's also a dependency of the haskellPackages.primesieve haskell binding which was not building due to the absence of primesieve from nixpkgs.

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 nox --run "nox-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.

@guibou guibou requested review from basvandijk, peti and ryantm as code owners Feb 4, 2019

@peti
Copy link
Member

left a comment

Please do not edit hackage-packages.nix. Note the comment at the very top of the file.

@guibou

This comment has been minimized.

Copy link
Contributor Author

commented Feb 4, 2019

@peti sorry for the missing patch, I'll push the fix with the fetchpatch command instead.

About hackage-packages.nix, my fix is temporary because it will be correctly (I assumed) overrode by the next update to hackage-packages.nix. Should I add a fix in configuration-common.nix which may become outdated really soon (next hackage-packages.nix) or should I add nothing and wait for the next hackage-packages.nix to fix itself?

haskellPackages.primesieve: fix build
Temporaries changes in `configuration-common.nix` to fix the cabal
file which does not specify that the haskell library depends on the
C++ shared library. Pull request had been sent upstream.

@guibou guibou force-pushed the guibou:primesieve branch from 50c6947 to 3652cfe Feb 4, 2019

@peti

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

@GrahamcOfBorg build primesieve

@peti

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

Should I add nothing and wait for the next hackage-packages.nix to fix itself?

Yes, I think that is the way to go. The problem with manually editing hackage-packages.nix is that you don't know whether our automatic process will actually produce a working version of the build once it's been run. The only way to know that for sure is to create the patch by running hackage2nix locally to generate the modifications.

@peti

peti approved these changes Feb 4, 2019

@peti peti merged commit 790e14c into NixOS:master Feb 4, 2019

12 of 13 checks passed

primesieve on x86_64-darwin
Details
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-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
primesieve on aarch64-linux Success
Details
primesieve on x86_64-linux Success
Details

@guibou guibou deleted the guibou:primesieve branch Feb 4, 2019

@peti

This comment has been minimized.

Copy link
Member

commented Feb 4, 2019

The build now works in 4974e85.

@guibou

This comment has been minimized.

Copy link
Contributor Author

commented Feb 4, 2019

Thank you!

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.