Same issue as buildFromCabalSdist: sdistTarball applies patches via
overrideDerivation, but the patches attribute remained, causing
patchPhase to apply them again.
srcOnly applies patches, but the resulting derivation still had the
patches attribute, causing patchPhase to apply them again. Clear
patches after srcOnly to prevent double-application.
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.
Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
This ensures patches and Hackage revisions are applied to the base
tarball which may be necessary in order for the packages to build in the
shell environment.
Obviously, we can't run GHCi of a cross-compiler, but respecting targetPrefix
will give a more helpful error message:
<command line>: not built for interactive use
Note that this test also succeeds in pkgsCross though using a stdenv
with cc is crucial, since its setup hooks are required for -lgmp to work.
Maybe this is something we should look at for GHC again, maybe we can
add extra entries to the package db, so it passes the necessary -L flags
by itself?
Previously, setting environment variables in a Haskell package build
required using `.overrideAttrs`, which (I think?) breaks later
invocations of `haskell.lib.overrideCabal`.
This patch adds an `env` argument to `haskellPackages.mkDerivation`,
which can be used to set environment variables during Haskell package
builds.
`ghcWithPackages` broke in #411741, partially because we don't have
tests for it. This adds some tests to make sure it keeps working in the
future. For now these tests will fail until #415436 is fixed.
This is split off of #415434.
Adds a regression test for https://github.com/NixOS/nixpkgs/pull/224542
We only need *a* package, to test the "documentationTarball" function,
not specifically vector. I guess we should use a package that is rarely
broken itself... for which a *dependency* of vector should be a good
choice. I took a random one... "random"!
In #296645, envFunc (and thus shellFor) was changed from
`mkDerivation {phases=[..]}` to `runCommand ..`. So since
then, the derivation of shellFor contains a `buildCommand`
("echo $nativeBuildInputs $buildInputs > $out"),
and as a result the custom phases defined in shellFor's
test were ignored.
GitHub apparently immediately terminates the connection for our previous
bogus curl user agent. Let's be more polite about this (default curl
user agent would work, too).
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
--argstr baseRev b32a094368
result/bin/apply-formatting $NIXPKGS_PATH
The generated file sets its own directory as the source, including the
generated file itself, which causes rebuilds when that file is
reformatted. We can avoid this by overriding the source with a filtered
version and using that throughout the tests.
See https://github.com/NixOS/nixpkgs/pull/320572 for more context
This reverts commit 81c06bc609.
Reason for revert: This change breaks the
`tests.haskell.cabalSdist.assumptionLocalHasDirectReference` test which
relies on checking for the test source store path in the resulting
derivation files. 81c06bc609 did not
account for this in the change (though it should be possible).
The current version of linear (1.22) has incorrect constraints in its
cabal file (which has been corrected in a revision), so it is causing
this test to fail.
This commit just switches to another arbitrary package (cereal) for the
tests.
This commit does the following two things:
1. Changes the Haskell package used in the extraDependencies test from
releaser to conduit. The reason for this is that conduit is more
of a "core" package in Haskell, and it is more likely to always be
working. (If conduit is not compiling, then large chunks of Hackage
won't be working.)
2. Tighten up the GHCi test to actually use the package from
extraDependencies. It appears that GHCi can fail to import the
package from extraDependencies, and that doesn't cause GHCi to
return an error code, which means the test isn't actually testing
anything.
This new change makes it so that if the package from
extraDependencies is actually not included for some reason, then
this shellFor test should fail.
With a recent hackage update, turtle stopped compiling on ghc94. This
commit changes the tests.haskell.incremental test to use the temporary
package instead of turtle.
This allows packagePlatforms to pick up on the overall supported
platforms and schedule builds on Hydra for more than the evaluation
platform (usually x86_64-linux).
Since the rust writer doesn't seem to get fixed on darwin, we'll just
wrap the haskell writer test in our own derivation (which is possible
since tests.writers exposes a bunch of internals via passthru) and
expose it via tests.haskell which are already in mergeable.
Finally a way to test the (hopefully) working haskell writer on darwin
again!
Contrary to database-id-class, linear is part of stackage and actively
maintained, so the test is less likely to fail due to version
constraint issues as it is currently.