Skip to content

Commit

Permalink
Merge pull request #266650 from NixOS/haskell-updates
Browse files Browse the repository at this point in the history
haskellPackages: update stackage and hackage
  • Loading branch information
expipiplus1 authored Nov 20, 2023
2 parents 6315a2a + 537bedd commit 3fb937a
Show file tree
Hide file tree
Showing 33 changed files with 3,130 additions and 1,782 deletions.
38 changes: 38 additions & 0 deletions pkgs/by-name/ch/changelog-d/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
callPackage,
lib,
haskell,
haskellPackages,
}:

let
hsPkg = haskellPackages.changelog-d;

addCompletions = haskellPackages.generateOptparseApplicativeCompletions ["changelog-d"];

haskellModifications =
lib.flip lib.pipe [
addCompletions
haskell.lib.justStaticExecutables
];

mkDerivationOverrides = finalAttrs: oldAttrs: {

version = oldAttrs.version + "-git-${lib.strings.substring 0 7 oldAttrs.src.rev}";

# nix-shell ./maintainers/scripts/update.nix --argstr package changelog-d
passthru.updateScript = lib.getExe (callPackage ./updateScript.nix { });

# nix-build -A changelog-d.tests
passthru.tests = {
basic = callPackage ./tests/basic.nix { changelog-d = finalAttrs.finalPackage; };
};

meta = oldAttrs.meta // {
homepage = "https://codeberg.org/fgaz/changelog-d";
maintainers = [ lib.maintainers.roberth ];
};

};
in
(haskellModifications hsPkg).overrideAttrs mkDerivationOverrides
25 changes: 25 additions & 0 deletions pkgs/by-name/ch/changelog-d/tests/basic.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ runCommand, changelog-d }:

runCommand "changelog-d-basic-test" {
nativeBuildInputs = [ changelog-d ];
} ''
mkdir changelogs
cat > changelogs/config <<EOF
organization: NixOS
repository: boondoggle
EOF
cat > changelogs/a <<EOF
synopsis: Support numbers with incrementing base-10 digits
issues: #1234
description: {
This didn't work before.
}
EOF
changelog-d changelogs >$out
cat -n $out
echo Checking the generated output
set -x
grep -F 'Support numbers with incrementing base-10 digits' $out >/dev/null
grep -F 'https://github.com/NixOS/boondoggle/issues/1234' $out >/dev/null
set +x
''
12 changes: 12 additions & 0 deletions pkgs/by-name/ch/changelog-d/updateScript.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ writeShellApplication, cabal2nix }:

writeShellApplication {
name = "update-changelog-d";
runtimeInputs = [
cabal2nix
];
text = ''
cd pkgs/development/misc/haskell/changelog-d
cabal2nix https://codeberg.org/fgaz/changelog-d >default.nix
'';
}
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": "49d09494dd24eae895fe1260e2c26157f740e451",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/49d09494dd24eae895fe1260e2c26157f740e451.tar.gz",
"sha256": "1f0m4wni61v6679ya0mb9mw3vxhak9yvjxjm6wfs7wryayb4i5ba",
"msg": "Update from Hackage at 2023-10-21T19:49:07Z"
"commit": "f4111a737432472002a38495b14b930255705d6a",
"url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/f4111a737432472002a38495b14b930255705d6a.tar.gz",
"sha256": "0q1nhk821fdwxmidsd9mnd77ml4c05f7rnmd80g4s876s65ldi5q",
"msg": "Update from Hackage at 2023-11-10T11:27:19Z"
}
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.0.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.2.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.2.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.2.6.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.2.7.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.2.8.nix
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
# fix hyperlinked haddock sources: https://github.com/haskell/haddock/pull/1482
(fetchpatch {
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.4.2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.4.3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/compilers/ghc/9.4.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})
# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/compilers/ghc/9.4.5.nix
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ stdenv.mkDerivation (rec {
url = "https://gitlab.haskell.org/ghc/ghc/-/commit/10e94a556b4f90769b7fd718b9790d58ae566600.patch";
sha256 = "0kmhfamr16w8gch0lgln2912r8aryjky1hfcda3jkcwa5cdzgjdv";
})

# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/compilers/ghc/9.4.6.nix
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ stdenv.mkDerivation (rec {
extraPrefix = "libraries/Cabal/";
sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
})

# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch

# Work around a type not being defined when including Rts.h in bytestring's cbits
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/compilers/ghc/9.4.7.nix
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ stdenv.mkDerivation (rec {
extraPrefix = "libraries/Cabal/";
sha256 = "sha256-yRQ6YmMiwBwiYseC5BsrEtDgFbWvst+maGgDtdD0vAY=";
})

# Fix docs build with Sphinx >= 7 https://gitlab.haskell.org/ghc/ghc/-/issues/24129
./docs-sphinx-7.patch
] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [
# Prevent the paths module from emitting symbols that we don't use
Expand Down
Loading

0 comments on commit 3fb937a

Please sign in to comment.