Nix Packages collection & NixOS
Go to file
Ruud van Asseldonk 2163fc7f0a git: fix the "perlSupport = false" configuration
When perlSupport = false, we will set NO_PERL=1, and build Git without
Perl support. This is a build option that Git supports. However, Git's
test suite still requires a Perl to be available to run the tests, and
we did not provide one. The tests respect PERL_PATH, and if it is not
set, they default to /usr/bin/perl.

Before this commit, if we set "perlSupport = false", then no Perl would
be available to the package, and so the tests would default to
/usr/bin/perl. When building without a sandbox, that could still work,
even though there is no "perl" on the path, because the tests defaulted
to an absolute path.

You can reproduce this issue as follows:

    nix-build -E 'let pkgs = (import ./default.nix) {}; in pkgs.git.override { perlSupport = false; }'

I just ran into this when trying to build pkgs.git from an old version
of Nixpkgs that I was able to build just fine in the past, and today it
would not build any more, complaining when running the tests:

    make -C t/ all
    make[1]: Entering directory '/build/git-2.18.0/t'
    rm -f -r 'test-results'
    /nix/store/czx8vkrb9jdgjyz8qfksh10vrnqa723l-bash-4.4-p23/bin/bash: /usr/bin/perl: No such file or directory

In the past the sandbox was not enabled by default, so then it worked
for me. But now that it is enabled, my host's (not NixOS) /usr/bin/perl
is no longer accessible, and the build fails.

The solution is to explicitly set PERL_PATH when running the tests. This
*almost* works, except that there appears to be a bug in the test for
"git request-pull". That command is a Bash script that calls Perl at
some point, so it requires Perl, and therefore it cannot be supported
when NO_PERL=1. But that particular test does not check whether Git was
compiled with Perl support (other tests do include that check), and that
makes the test fail:

    t5150-request-pull.sh ..............................
    not ok 4 - pull request after push
    not ok 5 - request asks HEAD to be pulled
    not ok 6 - pull request format
    not ok 7 - request-pull ignores OPTIONS_KEEPDASHDASH poison
    not ok 9 - pull request with mismatched object
    not ok 10 - pull request with stale object
    Dubious, test returned 1 (wstat 256, 0x100)
    Failed 6/10 subtests

This output makes sense if you look at t5150-request-pull.sh. Test 1 and
2 are setup steps. Test 3 does call request-pull, but it expects the
command to fail, and it cannot distinguish between the command exiting
with a nonzero exit code, or failing to start it at all. So test 3
passes for the wrong reasons. Test 4 through 10 all call request-pull,
so they fail.

The quick workaround here is to disable the test. I will look into
upstreaming a patch that makes the test skip itself when Perl is
disabled.
2019-11-27 19:23:56 +01:00
.github codeowners: add tfc as test-driver owner 2019-11-25 18:02:48 +01:00
doc Merge branch 'wrapper-pname-support-19.09' into wrapper-pname-support 2019-11-24 17:37:19 +00:00
lib Merge pull request #72657 from cleverca22/vc4 2019-11-24 16:04:15 -05:00
maintainers update.nix: fix eval 2019-11-25 15:08:59 -05:00
nixos Merge pull request #73140 from worldofpeace/port-pantheon-test 2019-11-25 21:08:25 +01:00
pkgs git: fix the "perlSupport = false" configuration 2019-11-27 19:23:56 +01:00
.editorconfig
.gitattributes
.gitignore Replace androidenv by new implementation 2018-12-18 21:16:06 +01:00
.version 20.03 is Markhor 2019-09-09 11:26:58 -04:00
COPYING COPYING: include 2019 2019-03-18 19:55:33 -07:00
default.nix Fix local path to release notes in error message 2018-10-08 05:43:15 -05:00
README.md Remove references to the nixpkgs-channels repo 2019-10-17 19:44:03 +02:00

NixOS logo

Code Triagers badge Open Collective supporters

Nixpkgs is a collection of over 40,000 software packages that can be installed with the Nix package manager. It also implements NixOS, a purely-functional Linux distribution.

Manuals

  • NixOS Manual - how to install, configure, and maintain a purely-functional Linux distribution
  • Nixpkgs Manual - contributing to Nixpkgs and using programming-language-specific Nix expressions
  • Nix Package Manager Manual - how to write Nix expresssions (programs), and how to use Nix command line tools

Community

Other Project Repositories

The sources of all offical Nix-related projects are in the NixOS organization on GitHub. Here are some of the main ones:

Continuous Integration and Distribution

Nixpkgs and NixOS are built and tested by our continuous integration system, Hydra.

Artifacts successfully built with Hydra are published to cache at https://cache.nixos.org/. When successful build and test criteria are met, the Nixpkgs expressions are distributed via Nix channels.

Contributing

Nixpkgs is among the most active projects on GitHub. While thousands of open issues and pull requests might seem a lot at first, it helps consider it in the context of the scope of the project. Nixpkgs describes how to build over 40,000 pieces of software and implements a Linux distribution. The GitHub Insights page gives a sense of the project activity.

Community contributions are always welcome through GitHub Issues and Pull Requests. When pull requests are made, our tooling automation bot, OfBorg will perform various checks to help ensure expression quality.

The Nixpkgs maintainers are people who have assigned themselves to maintain specific individual packages. We encourage people who care about a package to assign themselves as a maintainer. When a pull request is made against a package, OfBorg will notify the appropriate maintainer(s). The Nixpkgs committers are people who have been given permission to merge.

Most contributions are based on and merged into these branches:

  • master is the main branch where all small contributions go
  • staging is branched from master, changes that have a big impact on Hydra builds go to this branch
  • staging-next is branched from staging and only fixes to stabilize and security fixes with a big impact on Hydra builds should be contributed to this branch. This branch is merged into master when deemed of sufficiently high quality

For more information about contributing to the project, please visit the contributing page.

Donations

The infrastructure for NixOS and related projects is maintained by a nonprofit organization, the NixOS Foundation. To ensure the continuity and expansion of the NixOS infrastructure, we are looking for donations to our organization.

You can donate to the NixOS foundation by using Open Collective:

License

Nixpkgs is licensed under the MIT License.

Note: MIT license does not apply to the packages built by Nixpkgs, merely to the files in this repository (the Nix expressions, build scripts, NixOS modules, etc.). It also might not apply to patches included in Nixpkgs, which may be derivative works of the packages to which they apply. The aforementioned artifacts are all covered by the licenses of the respective packages.