diff --git a/pkgs/development/compilers/elm/default.nix b/pkgs/development/compilers/elm/default.nix index c1b530471c3b..6fc37cc58db8 100644 --- a/pkgs/development/compilers/elm/default.nix +++ b/pkgs/development/compilers/elm/default.nix @@ -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: diff --git a/pkgs/development/compilers/elm/packages/ghc9_4/default.nix b/pkgs/development/compilers/elm/packages/ghc9_4/default.nix deleted file mode 100644 index 2f44db00458e..000000000000 --- a/pkgs/development/compilers/elm/packages/ghc9_4/default.nix +++ /dev/null @@ -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 < ./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 { }); - }; -} diff --git a/pkgs/development/compilers/elm/packages/ghc9_8/default.nix b/pkgs/development/compilers/elm/packages/ghc9_8/default.nix new file mode 100644 index 000000000000..0e8cf8749d96 --- /dev/null +++ b/pkgs/development/compilers/elm/packages/ghc9_8/default.nix @@ -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 { }; + }; +} diff --git a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/avh4-lib.nix b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/avh4-lib.nix similarity index 84% rename from pkgs/development/compilers/elm/packages/ghc9_4/elm-format/avh4-lib.nix rename to pkgs/development/compilers/elm/packages/ghc9_8/elm-format/avh4-lib.nix index 472afd58b6e8..ac2963015b39 100644 --- a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/avh4-lib.nix +++ b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/avh4-lib.nix @@ -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; } diff --git a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-lib.nix b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-lib.nix similarity index 88% rename from pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-lib.nix rename to pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-lib.nix index 823c2c3f2729..1431976b603a 100644 --- a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-lib.nix +++ b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-lib.nix @@ -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; } diff --git a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-markdown.nix b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-markdown.nix similarity index 78% rename from pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-markdown.nix rename to pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-markdown.nix index 4d3420da3f6c..639870aa4671 100644 --- a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-markdown.nix +++ b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-markdown.nix @@ -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; } diff --git a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-test-lib.nix b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-test-lib.nix similarity index 87% rename from pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-test-lib.nix rename to pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-test-lib.nix index c9ddc2b25293..48c86d2e3c37 100644 --- a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format-test-lib.nix +++ b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format-test-lib.nix @@ -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; } diff --git a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format.nix b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format.nix similarity index 69% rename from pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format.nix rename to pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format.nix index 7a8cf08f644d..b7a805abb57b 100644 --- a/pkgs/development/compilers/elm/packages/ghc9_4/elm-format/elm-format.nix +++ b/pkgs/development/compilers/elm/packages/ghc9_8/elm-format/elm-format.nix @@ -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 < ./generated/Build_elm_format.hs + module Build_elm_format where + + gitDescribe :: String + gitDescribe = "${version}" + EOHS + ''; }