elmPackages.elm-format: 0.8.7 -> 0.8.8

This release officially supports GHC 9.6.

To avoid dependency conflicts with the elm compiler (see ansi-wl-pprint), elm-format is now built with GHC 9.8.

The GHC 9.4 elm package overrides have been removed.
This commit is contained in:
Sander 2025-06-23 15:21:37 +02:00
parent cdb6712fb6
commit dd23e181c8
No known key found for this signature in database
GPG Key ID: D1A763BC84F34603
8 changed files with 67 additions and 72 deletions

View File

@ -8,6 +8,9 @@
let
fetchElmDeps = pkgs.callPackage ./lib/fetchElmDeps.nix { };
# Haskell packages that require ghc 9.8
hs98Pkgs = import ./packages/ghc9_8 { inherit pkgs lib; };
# Haskell packages that require ghc 9.6
hs96Pkgs = import ./packages/ghc9_6 {
inherit
@ -19,9 +22,6 @@ let
;
};
# Haskell packages that require ghc 9.4
hs94Pkgs = import ./packages/ghc9_4 { inherit pkgs lib; };
# Patched, originally npm-downloaded, packages
patchedNodePkgs = import ./packages/node {
inherit
@ -34,7 +34,7 @@ let
assembleScope =
self: basics:
(hs96Pkgs self).elmPkgs // (hs94Pkgs self).elmPkgs // (patchedNodePkgs self) // basics;
(hs98Pkgs self).elmPkgs // (hs96Pkgs self).elmPkgs // (patchedNodePkgs self) // basics;
in
lib.makeScope pkgs.newScope (
self:

View File

@ -1,53 +0,0 @@
{ pkgs, lib }:
self:
pkgs.haskell.packages.ghc94.override {
overrides =
self: super:
let
inherit (pkgs.haskell.lib.compose) justStaticExecutables overrideCabal doJailbreak;
elmPkgs = {
/*
The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
`package/nix/build.sh`
*/
elm-format = justStaticExecutables (
overrideCabal (drv: {
jailbreak = true;
doHaddock = false;
postPatch = ''
mkdir -p ./generated
cat <<EOHS > ./generated/Build_elm_format.hs
module Build_elm_format where
gitDescribe :: String
gitDescribe = "${drv.version}"
EOHS
'';
description = "Formats Elm source code according to a standard set of rules based on the official Elm Style Guide";
homepage = "https://github.com/avh4/elm-format";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
avh4
turbomack
];
}) (self.callPackage ./elm-format/elm-format.nix { })
);
};
fixHaddock = overrideCabal (_: {
configureFlags = [ "--ghc-option=-Wno-error=unused-packages" ];
doHaddock = false;
});
in
elmPkgs
// {
inherit elmPkgs;
# Needed for elm-format
avh4-lib = fixHaddock (doJailbreak (self.callPackage ./elm-format/avh4-lib.nix { }));
elm-format-lib = fixHaddock (doJailbreak (self.callPackage ./elm-format/elm-format-lib.nix { }));
elm-format-test-lib = fixHaddock (self.callPackage ./elm-format/elm-format-test-lib.nix { });
elm-format-markdown = fixHaddock (self.callPackage ./elm-format/elm-format-markdown.nix { });
};
}

View File

@ -0,0 +1,36 @@
{ pkgs, lib }:
self:
pkgs.haskell.packages.ghc98.override {
overrides =
self: super:
let
inherit (pkgs.haskell.lib.compose) justStaticExecutables overrideCabal;
elmPkgs = {
/*
The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
`package/nix/build.sh`
*/
elm-format = justStaticExecutables (
overrideCabal (drv: {
homepage = "https://github.com/avh4/elm-format";
maintainers = with lib.maintainers; [
avh4
turbomack
];
}) (self.callPackage ./elm-format/elm-format.nix { })
);
};
in
elmPkgs
// {
inherit elmPkgs;
# Needed for elm-format
avh4-lib = self.callPackage ./elm-format/avh4-lib.nix { };
elm-format-lib = self.callPackage ./elm-format/elm-format-lib.nix { };
elm-format-test-lib = self.callPackage ./elm-format/elm-format-test-lib.nix { };
elm-format-markdown = self.callPackage ./elm-format/elm-format-markdown.nix { };
};
}

View File

@ -13,7 +13,6 @@
relude,
tasty,
tasty-discover,
tasty-hspec,
tasty-hunit,
text,
}:
@ -22,8 +21,8 @@ mkDerivation {
version = "0.0.0.1";
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/avh4-lib; echo source root reset to $sourceRoot";
@ -50,11 +49,11 @@ mkDerivation {
process
relude
tasty
tasty-hspec
tasty-hunit
text
];
testToolDepends = [ tasty-discover ];
doHaddock = false;
description = "Common code for haskell projects";
license = lib.licenses.bsd3;
}

View File

@ -27,8 +27,8 @@ mkDerivation {
version = "0.0.0.1";
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/elm-format-lib; echo source root reset to $sourceRoot";
@ -67,6 +67,7 @@ mkDerivation {
text
];
testToolDepends = [ tasty-discover ];
doHaddock = false;
description = "Common code used by elm-format and elm-refactor";
license = lib.licenses.bsd3;
}

View File

@ -12,8 +12,8 @@ mkDerivation {
version = "0.0.0.1";
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/elm-format-markdown; echo source root reset to $sourceRoot";
@ -23,6 +23,7 @@ mkDerivation {
mtl
text
];
doHaddock = false;
description = "Markdown parsing for Elm documentation comments";
license = lib.licenses.bsd3;
}

View File

@ -22,8 +22,8 @@ mkDerivation {
version = "0.0.0.1";
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/elm-format-test-lib; echo source root reset to $sourceRoot";
@ -56,6 +56,7 @@ mkDerivation {
text
];
testToolDepends = [ tasty-discover ];
doHaddock = false;
description = "Test helpers used by elm-format-tests and elm-refactor-tests";
license = lib.licenses.bsd3;
}

View File

@ -20,13 +20,13 @@
tasty-quickcheck,
text,
}:
mkDerivation {
mkDerivation rec {
pname = "elm-format";
version = "0.8.7";
version = "0.8.8";
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "04l1bn4w8q3ifd6mc4mfrqxfbihmqnpfjdn6gr0x2jqcasjbk0bi";
rev = "b5cca4c26b473dab06e5d73b98148637e4770d45";
sha256 = "0klhnfvy1l6mck46qwk6pp4d66cvj0m5w91ylghdcr4fb6ka1gp0";
rev = "b06902f1e450f8be1e7b318caab7ccb1950893fa";
fetchSubmodules = true;
};
isLibrary = false;
@ -61,8 +61,18 @@ mkDerivation {
tasty-quickcheck
text
];
doHaddock = false;
homepage = "https://elm-lang.org";
description = "Source code formatter for Elm";
description = "A source code formatter for Elm";
license = lib.licenses.bsd3;
mainProgram = "elm-format";
postPatch = ''
mkdir -p ./generated
cat <<EOHS > ./generated/Build_elm_format.hs
module Build_elm_format where
gitDescribe :: String
gitDescribe = "${version}"
EOHS
'';
}