Commit graph

50 commits

Author SHA1 Message Date
Wolfgang Walther
2503778146
teams/mercury: handle team with external membership (#478845) 2026-01-18 14:17:32 +00:00
Wolfgang Walther
97fe4a07cb
teams/mercury: drop 2026-01-18 15:12:20 +01:00
Robert Hensing
b6a3b8846e haskell.lib.buildFromSdist: add test, fix double-patch
Same issue as buildFromCabalSdist: sdistTarball applies patches via
overrideDerivation, but the patches attribute remained, causing
patchPhase to apply them again.
2025-12-28 15:31:09 +01:00
Robert Hensing
5a38e15e6d haskellPackages.buildFromCabalSdist: add test, fix double-patch
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.
2025-12-28 15:26:33 +01:00
Ihar Hrachyshka
567e8dfd8e
treewide: clean up 'meta = with' pattern
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>
2025-12-10 18:09:49 +01:00
nixpkgs-ci[bot]
99bf2f7c42
Merge 0832d1b3a0 into haskell-updates 2025-10-05 00:22:14 +00:00
jopejoe1
67af2b0ab3 tests.haskell.setBuildTarget: set to mit
this is part of the nixpkgs code so set it to mit
2025-09-29 20:51:58 +02:00
sternenseemann
19420d092f test.haskell: make krank ignore purely informational issue reference 2025-09-26 14:31:36 +02:00
sternenseemann
fca19d72bc tests.haskell.shellFor: use srcOnly to extract pkgs
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.
2025-09-12 21:00:26 +02:00
sternenseemann
49ac23d75d tests.haskell.ghcWithPackages.regression-224542: make cross aware
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
2025-09-09 15:46:35 +02:00
sternenseemann
d1bc568af2 tests.haskell.ghcWithPackages: verify -fllvm works with useLLVM
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?
2025-09-09 15:46:35 +02:00
Felix Buehler
ee450568ea tests.haskell.shellFor: deprecate phases 2025-08-19 21:39:23 +02:00
Wolfgang Walther
5a0711127c
treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Rebecca Turner
d3e4f784aa
haskellPackages.mkDerivation: Add env argument
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.
2025-07-16 11:38:18 -07:00
Rebecca Turner
cf62cc7f1f
tests.haskell.ghcWithPackages: init
`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
2025-06-10 10:35:42 -07:00
K900
f96ac2dcd6 Merge remote-tracking branch 'origin/master' into staging-next 2025-04-26 09:07:48 +03:00
Fernando Rodrigues
05580f4b44
treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
Follow-up to #394797.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-04-25 22:20:17 -03:00
Wolfgang Walther
55a97cef20
tests.haskell.documentationTarball: switch to random
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"!
2025-04-14 21:12:31 +02:00
Thomas Miedema
ff9e4bce32 haskell: fix shellFor test
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.
2025-03-23 01:39:43 +01:00
sternenseemann
f611c803e5 tests.haskell.upstreamStackhpackVersion: set descriptive user agent
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).
2025-02-11 22:48:14 +01:00
Emily
77def225cb tests.haskell.setBuildTarget: avoid lib.fileset 2024-12-31 02:30:18 +00:00
Emily
f6cc18e0e4 tests.haskell.cabalSdist: avoid lib.fileset 2024-12-31 02:30:18 +00:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
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
2024-12-10 20:26:33 +01:00
Silvan Mosberger
e6d45588ad tests.haskell.cabalSdist: Prevent rebuilds when Nix files change
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
2024-08-25 04:59:11 +02:00
Robert Hensing
0c1fbe5fc5 doc: Explain cabalSdist test 2024-06-26 05:03:41 +02:00
sternenseemann
b1acf7bab9 Revert "tests.haskell.cabalSdist.localFromCabalSdist: prevent unnecessary rebuilds"
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).
2024-06-21 18:06:15 +02:00
Philip Taron
53f06894e1
tests.haskell.setBuildTarget: prevent unnecessary rebuilds 2024-06-17 09:49:33 -07:00
Philip Taron
81c06bc609
tests.haskell.cabalSdist.localFromCabalSdist: prevent unnecessary rebuilds 2024-06-17 09:39:16 -07:00
Dennis Gosnell
9cc4b19ee6
tests.haskell.shellFor: change from using linear to cereal
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.
2024-01-15 18:25:53 +09:00
maralorn
5518af0a55 haskellPackages: Fix eval errors 2024-01-01 19:16:21 +01:00
maralorn
7b4156edda haskellPackages: Fix eval errors 2024-01-01 18:28:31 +01:00
Dennis Gosnell
36bb7be495
tests.haskell.upstreamStackHpackVersion: update breakfor stack-2.13.1
The tarball that contains the statically-linked stack package has
changed paths.

See the release notes for more details:
https://github.com/commercialhaskell/stack/releases/tag/v2.13.1
2023-10-08 12:23:10 +09:00
github-actions[bot]
cde91a5dd2
Merge master into haskell-updates 2023-07-26 00:13:28 +00:00
zimbatm
73ee03cbc5 writers: split out the tests
Make it easier to run and debug individual tests.
2023-07-22 17:53:52 +02:00
Dennis Gosnell
c78223a5ff
tests.haskell.upstreamStackHpackVersion: init
This tests that the upstream `stack` release uses the same version of
`hpack` as the `stack` in Nixpkgs.
2023-07-16 21:35:53 +09:00
Dennis Gosnell
55b8958f7d
tests.haskell.shellFor: change package used in extraDependencies test
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.
2023-07-04 15:38:23 +09:00
Dennis Gosnell
dd9e4575ec
tests.haskell.incremental: change package used from turtle to temporary
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.
2023-05-30 09:06:42 +09:00
Rebecca Turner
b278ca2195
tests.haskell.incremental: init 2023-05-25 14:36:18 -07:00
Robert Hensing
392fba1132 pkgs.tests.haskell.cabalSdist: Avoid IFD 2022-05-24 13:23:19 +02:00
Robert Hensing
cf5e2d5103 haskellPackages: Add buildFromCabalSdist (faster, tested) 2022-05-23 22:28:57 +02:00
Robert Hensing
2e87d165f7 haskellPackages.shellFor: Add extraDependencies
An example use case is when you have Haskell scripts that use
libraries that don't occur in your packages' dependencies.
2022-03-15 20:38:22 +01:00
Ellie Hermaszewska
15ae25f36c
haskell: switch from haskell.lib to haskell.lib.compose 2021-11-07 20:18:45 +08:00
sternenseemann
3e19234f34 tests.haskell: set meta.platforms
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).
2021-07-13 15:37:22 +02:00
sternenseemann
6bd0c16f89 tests.writers: also expose path via passthru 2021-07-13 15:22:34 +02:00
sternenseemann
52acca72bf top-level/release-haskell.nix: test writers on all platforms
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!
2021-07-13 15:19:36 +02:00
(cdep)illabout
88d9f2419e
tests.haskell-setBuildTarget: inline haskell package def to avoid IFD 2021-05-02 13:35:14 +09:00
Isaac Shapira
d725ac7942
Add haskell.lib.setBuiltTarget, and support non library compiling of a single target 2021-05-02 13:35:07 +09:00
sternenseemann
1bfa5e1291 tests.haskell.shellFor: use writeText instead of toFile 2021-05-01 22:58:35 +02:00
sternenseemann
9a0dc0fa3e tests.haskell.shellFor: replace database-id-class with linear
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.
2021-05-01 22:58:35 +02:00
sternenseemann
10b771c61a tests.haskell*: move into tests.haskell set
This will make it easier to add all haskell related tests to the haskell
hydra jobset without updating a list of tests in two places.
2021-05-01 22:58:35 +02:00