Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
80cc0cb
spago: 0.20.9 -> 0.21.0
sternenseemann Apr 22, 2024
2a76047
spago: move completions override to configuration-nix.nix
sternenseemann Apr 22, 2024
abe0b34
haskellPackages: stackage LTS 22.17 -> LTS 22.18
sternenseemann Apr 27, 2024
969d2cc
all-cabal-hashes: 2024-04-16T17:36:35Z -> 2024-04-27T10:57:54Z
sternenseemann Apr 27, 2024
1b84c9a
haskellPackages.Cabal_3_10_3_0: preserve for cabal-install
sternenseemann Apr 27, 2024
9edba2c
haskellPackages: regenerate package set based on current config
sternenseemann Apr 27, 2024
4398d97
haskellPackages.futhark: adjust for newly released zlib version
sternenseemann Apr 27, 2024
675bcbb
haskell.compiler.ghc9{6,8}: pass patched source to hadrian
sternenseemann Apr 16, 2024
c93aff1
haskell.compiler.ghc9{6,8}: apply hadrian patches to shared ghcSrc
sternenseemann Apr 16, 2024
f3fdad0
Merge master into haskell-updates
github-actions[bot] Apr 28, 2024
b4dc0f7
haskell.packages.ghcjs.stm: fix eval
trofi Apr 28, 2024
df58a72
Merge master into haskell-updates
github-actions[bot] Apr 29, 2024
08026fc
haskellPackages.linux-namespaces: fix build in ghc < 9.6
alexfmpe Apr 28, 2024
7a13434
Merge pull request #307588 from alexfmpe/linux-namespaces-ghc94
maralorn Apr 29, 2024
aa530c5
haskellPackages.proto-lens-arbitrary: unmark broken
alexfmpe Apr 29, 2024
ed6906f
Merge pull request #307824 from alexfmpe/proto-lens-arbitrary
maralorn Apr 29, 2024
1e687bc
haskellPackages.cbor-tool: Unbroken
mrkline Apr 29, 2024
ce0b195
Merge pull request #307818 from mrkline/unbreak-cbor-tool
maralorn Apr 29, 2024
d80578a
Merge master into haskell-updates
github-actions[bot] Apr 30, 2024
4b95256
Merge master into haskell-updates
github-actions[bot] May 1, 2024
9933743
haskellPackages.jsaddle-clib: unmark broken
alexfmpe Apr 29, 2024
dace374
haskellPackages.jsaddle-wkwebview: build on darwin
alexfmpe Apr 29, 2024
bf26500
haskellPackages.jsaddle-dom: remove jailbreak
alexfmpe Apr 29, 2024
a48f326
Merge pull request #307853 from alexfmpe/jsaddle
maralorn May 1, 2024
8a55e42
haskellPackages.dependent-sum: remove doJailbreak
alexfmpe May 1, 2024
a78477d
haskellPackages.patch: remove dontCheck
alexfmpe May 1, 2024
c17cf68
haskellPackages.patch: fix build on ghc 9.8
alexfmpe May 1, 2024
f514937
haskellPackages.reflex: fix build on 9.8
alexfmpe May 1, 2024
7b580f9
haskellPackages.universe-some: remove broken flag
alexfmpe May 1, 2024
2918b2c
Merge master into haskell-updates
github-actions[bot] May 2, 2024
26d2f29
Merge master into haskell-updates
github-actions[bot] May 3, 2024
2d3d38d
Merge master into haskell-updates
github-actions[bot] May 4, 2024
3afb2cb
haskellPackages: fix build of gargoyle libs
alexfmpe May 4, 2024
58f0ebf
haskellPackages.xmobar: Enable separate bin output
slotThe May 4, 2024
6c57b38
Merge master into haskell-updates
github-actions[bot] May 5, 2024
6795a93
haskellPackages.haveibeenpwned: unbreak
alexfmpe Apr 29, 2024
0987d0f
haskellPackages.dependent-sum-template_0_2_0_1: build with ghc 9.8
alexfmpe May 5, 2024
2a67a92
haskellPackages.dependent-sum-aeson-orphans: replace jailbreak with p…
alexfmpe May 5, 2024
3f93801
haskellPackages.monoidal-containers: remove jailbreak for 8.10
alexfmpe May 5, 2024
1d495de
haskellPackages.dependent-monoidal-map: unbreak
alexfmpe May 5, 2024
637e4e5
Merge master into haskell-updates
github-actions[bot] May 6, 2024
c322bd6
Merge master into haskell-updates
github-actions[bot] May 7, 2024
8c61a34
haskellPackages.ghcjs-base: generate attribute as expected
sternenseemann May 7, 2024
70402e4
Merge master into haskell-updates
github-actions[bot] May 8, 2024
7a6f77f
haskellPackages.hie-bios: Pin to fix hls
maralorn May 8, 2024
74b47cf
Merge master into haskell-updates
github-actions[bot] May 9, 2024
373a103
Merge pull request #309181 from alexfmpe/dependent-monoidal-map
maralorn May 9, 2024
5689282
Merge pull request #309170 from alexfmpe/haveibeenpwned
maralorn May 9, 2024
a75e0aa
Merge pull request #308934 from alexfmpe/gargoyle
maralorn May 9, 2024
7313c7c
Merge pull request #308985 from slotThe/xmobar/bin
maralorn May 9, 2024
05c00d8
Merge pull request #308380 from alexfmpe/reflex-fixes
maralorn May 9, 2024
d68e253
haskellPackages.generics-sop: build with ghc 9.8
alexfmpe May 3, 2024
9e2c860
Merge pull request #308378 from alexfmpe/universe-some
maralorn May 9, 2024
876d055
callCabal2nixWithOptions: add srcModifier argument
ramirez7 Sep 27, 2023
109035a
haskellPackages.records-sop: fix build
alexfmpe May 3, 2024
3535522
haskellPackages.basic-sop: unmark broken
alexfmpe May 3, 2024
90e0533
haskellPackages.lens-sop: unmark broken
alexfmpe May 3, 2024
67eb894
haskellPackages.json-sop: build with ghc 9.8
alexfmpe May 3, 2024
cb21dbc
Merge master into haskell-updates
github-actions[bot] May 10, 2024
d206b6d
beam-migrate: jailbreak because of too strict upper bound on pqueue
laaksonel May 7, 2024
40ecbaf
Merge master into haskell-updates
github-actions[bot] May 11, 2024
cc1aa4c
Merge pull request #309920 from laaksonel/beam-migrate-fix
maralorn May 11, 2024
23ad729
Merge master into haskell-updates
github-actions[bot] May 12, 2024
0756224
hledger-ui: pin to 1.32.* to match hledger{,-lib}
sternenseemann May 12, 2024
2fae5b4
haskellPackages.mueval: disable reverse deps to fix maintained job
sternenseemann May 12, 2024
171d83f
haskellPackages.large-generics: unbreak
alexfmpe May 12, 2024
7cc7df9
haskellPackages.proto3-wire: unbreak
alexfmpe May 12, 2024
e1b6abf
Merge pull request #305970 from sternenseemann/spago-0.21.0
drupol May 12, 2024
5a81722
Merge master into haskell-updates
github-actions[bot] May 13, 2024
f7e9730
Merge pull request #307558 from trofi/haskell.packages.ghcjs.stm-fix-…
ncfavier May 13, 2024
640cf55
haskell.compiler.ghc910: init at 9.10.1
vaibhavsagar May 12, 2024
5c8f1fd
Merge pull request #311079 from alexfmpe/proto3-wire
ncfavier May 13, 2024
505712b
Merge pull request #308919 from alexfmpe/haskellPackages-sop
ncfavier May 13, 2024
8e00adc
haskellPackages.saltine: re-enable tests
alexfmpe May 13, 2024
551e05b
haskellPackages.hashing: jailbreak on 9.8
alexfmpe May 13, 2024
0f28cc2
top-level/release-haskell.nix: restore primitive builds
sternenseemann May 13, 2024
1c38791
Merge pull request #311403 from alexfmpe/hnix
maralorn May 13, 2024
105028c
Merge master into haskell-updates
github-actions[bot] May 14, 2024
35f2cd5
haskellPackages.nix-thunk: fix build and deps
alexfmpe May 14, 2024
8d465db
haskellPackages.dependent-sum-template: fix build
alexfmpe May 12, 2024
5da3c0c
haskellPackages.aeson-gadt-th: fix build
alexfmpe May 14, 2024
a19ebdd
Merge pull request #311542 from alexfmpe/nix-thunk
maralorn May 14, 2024
913d0db
Merge pull request #311547 from alexfmpe/aeson-gadt-th
maralorn May 14, 2024
e49079e
Merge master into haskell-updates
github-actions[bot] May 15, 2024
130bc7e
haskellPackages: regenerate package set based on current config
ncfavier May 15, 2024
bb13244
haskellPackages: mark builds failing on hydra as broken
ncfavier May 15, 2024
54b7ab5
Merge branch 'master' into haskell-updates
ncfavier May 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 65 additions & 7 deletions doc/languages-frameworks/haskell.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ completely incompatible with packages from `haskellPackages`.

Every haskell package set has its own haskell-aware `mkDerivation` which is used
to build its packages. Generally you won't have to interact with this builder
since [cabal2nix][cabal2nix] can generate packages
since [cabal2nix](#haskell-cabal2nix) can generate packages
using it for an arbitrary cabal package definition. Still it is useful to know
the parameters it takes when you need to
[override](#haskell-overriding-haskell-packages) a generated Nix expression.
Expand Down Expand Up @@ -1123,17 +1123,74 @@ for [this to work][optparse-applicative-completions].
Note that this feature is automatically disabled when cross-compiling, since it
requires executing the binaries in question.

## Import-from-Derivation helpers {#haskell-import-from-derivation}

### cabal2nix {#haskell-cabal2nix}

[`cabal2nix`][cabal2nix] can generate Nix package definitions for arbitrary
Haskell packages using [import from derivation][import-from-derivation].
`cabal2nix` will generate Nix expressions that look like this:

```nix
# cabal get mtl-2.2.1 && cd mtl-2.2.1 && cabal2nix .
{ mkDerivation, base, lib, transformers }:
mkDerivation {
pname = "mtl";
version = "2.2.1";
src = ./.;
libraryHaskellDepends = [ base transformers ];
homepage = "https://github.com/ekmett/mtl";
description = "Monad classes, using functional dependencies";
license = lib.licenses.bsd3;
}
```

This expression should be called with `haskellPackages.callPackage`, which will
supply [`haskellPackages.mkDerivation`](#haskell-mkderivation) and the Haskell
dependencies as arguments.

`callCabal2nix name src args`
: Create a package named `name` from the source derivation `src` using
`cabal2nix`.

`args` are extra arguments provided to `haskellPackages.callPackage`.

`callCabal2nixWithOptions name src opts args`
: Create a package named `name` from the source derivation `src` using
`cabal2nix`.

`opts` are extra options for calling `cabal2nix`. If `opts` is a string, it
will be used as extra command line arguments for `cabal2nix`, e.g. `--subpath
path/to/dir/containing/cabal-file`. Otherwise, `opts` should be an AttrSet
which can contain the following attributes:

`extraCabal2nixOptions`
: Extra command line arguments for `cabal2nix`.

`srcModifier`
: A function which is used to modify the given `src` instead of the default
filter.

The default source filter will remove all files from `src` except for
`.cabal` files and `package.yaml` files.

<!--

TODO(@NixOS/haskell): finish these planned sections
### Overriding the entire package set
`callHackage`
: TODO

`callHackageDirect`
: TODO

## Import-from-Derivation helpers
`developPackage`
: TODO

* `callCabal2nix`
* `callHackage`, `callHackageDirect`
* `developPackage`
-->

<!--

TODO(@NixOS/haskell): finish these planned sections
### Overriding the entire package set

## Contributing {#haskell-contributing}

Expand Down Expand Up @@ -1309,3 +1366,4 @@ relevant.
[profiling]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html
[search.nixos.org]: https://search.nixos.org
[turtle]: https://hackage.haskell.org/package/turtle
[import-from-derivation]: https://nixos.org/manual/nix/stable/language/import-from-derivation
8 changes: 4 additions & 4 deletions pkgs/data/misc/hackage/pin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commit": "4eb9a5fde06b5d7343665582243debaf1d77e0a9",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/4eb9a5fde06b5d7343665582243debaf1d77e0a9.tar.gz",
"sha256": "0dzyfr1gv79riy2vh840b5hqly8rs10zhj01zi9nfn7jd9pzql28",
"msg": "Update from Hackage at 2024-04-16T17:36:35Z"
"commit": "9e419b038d7108160caf4efc41ebd5dfc4d51821",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/9e419b038d7108160caf4efc41ebd5dfc4d51821.tar.gz",
"sha256": "1vqsxznsq6s1hfb3b7ghs0fqa1rapqccjcz5jy3h9w3dq4v3gfqz",
"msg": "Update from Hackage at 2024-04-27T10:57:54Z"
}
4 changes: 4 additions & 0 deletions pkgs/development/compilers/ghc/9.10.1.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import ./common-hadrian.nix rec {
version = "9.10.1";
sha256 = "bf386a302d4ee054791ffd51748900f15d71760fd199157922d120cc1f89e2f7";
}
77 changes: 49 additions & 28 deletions pkgs/development/compilers/ghc/common-hadrian.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
, xattr
, autoSignDarwinBinariesHook
, bash
, srcOnly

, libiconv ? null, ncurses
, glibcLocales ? null
Expand Down Expand Up @@ -145,25 +146,60 @@
return $ verbosity >= Verbose
''

, ghcSrc ? (if rev != null then fetchgit else fetchurl) ({
inherit url sha256;
} // lib.optionalAttrs (rev != null) {
inherit rev;
} // lib.optionalAttrs (postFetch != null) {
inherit postFetch;
})
, ghcSrc ?
srcOnly {
name = "ghc-${version}"; # -source appended by srcOnly
src =
(if rev != null then fetchgit else fetchurl) ({
inherit url sha256;
} // lib.optionalAttrs (rev != null) {
inherit rev;
} // lib.optionalAttrs (postFetch != null) {
inherit postFetch;
});

patches =
let
# Disable haddock generating pretty source listings to stay under 3GB on aarch64-linux
enableHyperlinkedSource =
lib.versionAtLeast version "9.8" ||
!(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux);
in
[
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
(if lib.versionAtLeast version "9.8"
then ./docs-sphinx-7-ghc98.patch
else ./docs-sphinx-7.patch )
]
++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
# when building with separate outputs.
#
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
]
# Prevents passing --hyperlinked-source to haddock. This is a custom
# workaround as we wait for this to be configurable via userSettings or
# similar. https://gitlab.haskell.org/ghc/ghc/-/issues/23625
++ lib.optionals (!enableHyperlinkedSource) [
# TODO(@sternenseemann): Doesn't apply for GHC >= 9.8
../../tools/haskell/hadrian/disable-hyperlinked-source.patch
]
# Incorrect bounds on Cabal in hadrian
# https://gitlab.haskell.org/ghc/ghc/-/issues/24100
++ lib.optionals (lib.elem version [ "9.8.1" "9.8.2" ]) [
../../tools/haskell/hadrian/hadrian-9.8.1-allow-Cabal-3.10.patch
];
}

# GHC's build system hadrian built from the GHC-to-build's source tree
# using our bootstrap GHC.
, hadrian ? import ../../tools/haskell/hadrian/make-hadrian.nix { inherit bootPkgs lib; } {
ghcSrc = ghcSrc;
inherit ghcSrc;
ghcVersion = version;
userSettings = hadrianUserSettings;
# Disable haddock generating pretty source listings to stay under 3GB on aarch64-linux
enableHyperlinkedSource =
# TODO(@sternenseemann): Disabling currently doesn't work with GHC >= 9.8
lib.versionAtLeast version "9.8" ||
!(stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isLinux);
}

, # Whether to build sphinx documentation.
Expand Down Expand Up @@ -269,21 +305,6 @@ stdenv.mkDerivation ({

enableParallelBuilding = true;

patches = [
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
(if lib.versionAtLeast version "9.8"
then ./docs-sphinx-7-ghc98.patch
else ./docs-sphinx-7.patch )
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
# when building with separate outputs.
#
# These cause problems as they're not eliminated by GHC's dead code
# elimination on aarch64-darwin. (see
# https://github.com/NixOS/nixpkgs/issues/140774 for details).
./Cabal-at-least-3.6-paths-fix-cycle-aarch64-darwin.patch
];

postPatch = ''
patchShebangs --build .
'';
Expand Down
Loading