elmPackages.elm: 0.19.1 -> 0.19.2 (#541199)

This commit is contained in:
Marek Fajkus
2026-08-24 07:41:48 +02:00
committed by GitHub
13 changed files with 104 additions and 83 deletions

View File

@@ -10,10 +10,7 @@ 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 {
hs98Pkgs = import ./packages/ghc9_8 {
inherit
pkgs
lib
@@ -23,7 +20,7 @@ let
;
};
assembleScope = self: basics: (hs98Pkgs self).elmPkgs // (hs96Pkgs self).elmPkgs // basics;
assembleScope = self: basics: (hs98Pkgs self).elmPkgs // basics;
in
lib.makeScope pkgs.newScope (
self:

View File

@@ -6,16 +6,16 @@
buildNpmPackage rec {
pname = "elm-test";
version = "0.19.1-revision17";
version = "0.19.2-0";
src = fetchFromGitHub {
owner = "rtfeldman";
repo = "node-test-runner";
rev = version;
hash = "sha256-qmzmImTDH7CBFxEDtR+XydegnpuYiZuNF6eJ80I2fwM=";
hash = "sha256-Kta6O4EYeqqEmkRXs0yLzTL47RY8DiyAwszhjWi3xwU=";
};
npmDepsHash = "sha256-Yy53mGzARXRnPDLWnUevbnSCMSch1ecsvROu5C96WBA=";
npmDepsHash = "sha256-J1o5dsjyiDav5KELjFGibYETmJO6j8CmLzP7pg/tncM=";
postPatch = ''
sed -i '/elm-tooling install/d' package.json

View File

@@ -1,50 +0,0 @@
{
pkgs,
lib,
makeWrapper,
nodejs,
fetchElmDeps,
}:
self:
pkgs.haskell.packages.ghc96.override {
overrides =
self: super:
let
inherit (pkgs.haskell.lib.compose) overrideCabal;
elmPkgs = rec {
elm = overrideCabal (drv: {
# sadly with parallelism most of the time breaks compilation
enableParallelBuilding = false;
preConfigure = fetchElmDeps {
elmPackages = (import ../elm-srcs.nix);
elmVersion = drv.version;
registryDat = ../../registry.dat;
};
buildTools = drv.buildTools or [ ] ++ [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/elm \
--prefix PATH ':' ${lib.makeBinPath [ nodejs ]}
'';
description = "Delightful language for reliable webapps";
homepage = "https://elm-lang.org/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
turbomack
];
}) (self.callPackage ./elm { });
inherit fetchElmDeps;
elmVersion = elmPkgs.elm.version;
};
in
elmPkgs
// {
inherit elmPkgs;
ansi-wl-pprint = overrideCabal (drv: {
jailbreak = true;
}) (self.callPackage ./ansi-wl-pprint { });
};
}

View File

@@ -1,4 +1,10 @@
{ pkgs, lib }:
{
pkgs,
lib,
makeWrapper,
nodejs,
fetchElmDeps,
}:
self:
pkgs.haskell.packages.ghc98.override {
@@ -8,6 +14,39 @@ pkgs.haskell.packages.ghc98.override {
inherit (pkgs.haskell.lib.compose) justStaticExecutables overrideCabal;
elmPkgs = {
elm =
overrideCabal
(drv: {
# sadly with parallelism most of the time breaks compilation
enableParallelBuilding = false;
preConfigure = fetchElmDeps {
elmPackages = (import ../elm-srcs.nix);
elmVersion = drv.version;
registryDat = ../../registry.dat;
};
buildTools = drv.buildTools or [ ] ++ [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/elm \
--prefix PATH ':' ${lib.makeBinPath [ nodejs ]}
'';
description = "Delightful language for reliable webapps";
homepage = "https://elm-lang.org/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
turbomack
];
})
(
self.callPackage ./elm {
# note: only elm itself works with this older version
# elm-format needs the standard newer version
ansi-wl-pprint = overrideCabal (drv: {
jailbreak = true;
}) (self.callPackage ./ansi-wl-pprint { });
}
);
# Post-patch override taken from the upstream repository:
# https://github.com/avh4/elm-format/blob/e7e5da37716acbfb4954a88128b5cc72b2c911d9/package/nix/generate_derivation.sh
elm-format = justStaticExecutables (
@@ -28,6 +67,9 @@ pkgs.haskell.packages.ghc98.override {
];
}) (self.callPackage ./elm-format/elm-format.nix { })
);
inherit fetchElmDeps;
elmVersion = elmPkgs.elm.version;
};
in
elmPkgs

View File

@@ -22,7 +22,7 @@ mkDerivation {
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
rev = "4c5bfea5f47b38c1fd7ffa431c51c328a3ae5ba6";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/avh4-lib; echo source root reset to $sourceRoot";
@@ -55,5 +55,5 @@ mkDerivation {
testToolDepends = [ tasty-discover ];
doHaddock = false;
description = "Common code for haskell projects";
license = lib.licenses.bsd3;
license = lib.meta.getLicenseFromSpdxId "BSD-3-Clause";
}

View File

@@ -28,7 +28,7 @@ mkDerivation {
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
rev = "4c5bfea5f47b38c1fd7ffa431c51c328a3ae5ba6";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/elm-format-lib; echo source root reset to $sourceRoot";
@@ -69,5 +69,5 @@ mkDerivation {
testToolDepends = [ tasty-discover ];
doHaddock = false;
description = "Common code used by elm-format and elm-refactor";
license = lib.licenses.bsd3;
license = lib.meta.getLicenseFromSpdxId "BSD-3-Clause";
}

View File

@@ -13,7 +13,7 @@ mkDerivation {
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
rev = "4c5bfea5f47b38c1fd7ffa431c51c328a3ae5ba6";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/elm-format-markdown; echo source root reset to $sourceRoot";
@@ -25,5 +25,5 @@ mkDerivation {
];
doHaddock = false;
description = "Markdown parsing for Elm documentation comments";
license = lib.licenses.bsd3;
license = lib.meta.getLicenseFromSpdxId "BSD-3-Clause";
}

View File

@@ -23,7 +23,7 @@ mkDerivation {
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
rev = "4c5bfea5f47b38c1fd7ffa431c51c328a3ae5ba6";
fetchSubmodules = true;
};
postUnpack = "sourceRoot+=/elm-format-test-lib; echo source root reset to $sourceRoot";
@@ -58,5 +58,5 @@ mkDerivation {
testToolDepends = [ tasty-discover ];
doHaddock = false;
description = "Test helpers used by elm-format-tests and elm-refactor-tests";
license = lib.licenses.bsd3;
license = lib.meta.getLicenseFromSpdxId "BSD-3-Clause";
}

View File

@@ -26,7 +26,7 @@ mkDerivation {
src = fetchgit {
url = "https://github.com/avh4/elm-format";
sha256 = "13i1wgva6p9zsx1a7sfb3skc0rv187isb920chkhljyh48c12k8l";
rev = "d07fddc8c0eef412dba07be4ab8768d6abcca796";
rev = "4c5bfea5f47b38c1fd7ffa431c51c328a3ae5ba6";
fetchSubmodules = true;
};
isLibrary = false;
@@ -64,6 +64,6 @@ mkDerivation {
doHaddock = false;
homepage = "https://elm-lang.org";
description = "A source code formatter for Elm";
license = lib.licenses.bsd3;
license = lib.meta.getLicenseFromSpdxId "BSD-3-Clause";
mainProgram = "elm-format";
}

View File

@@ -0,0 +1,30 @@
commit d42c9fb8023dd00b0cd17d1de9bdbf492f2d7551
Author: Matt McHenry <github@matt.mchenryfamily.org>
Date: Tue Jul 7 22:20:19 2026
stub out support for new underlining modes in ansi-terminal 1.1
diff --git a/compiler/src/Reporting/Doc.hs b/compiler/src/Reporting/Doc.hs
index ccfb0d19..3ee16900 100644
--- a/compiler/src/Reporting/Doc.hs
+++ b/compiler/src/Reporting/Doc.hs
@@ -363,6 +363,9 @@ isUnderline underlining =
case underlining of
Ansi.SingleUnderline -> True
Ansi.DoubleUnderline -> False
+ Ansi.CurlyUnderline -> False
+ Ansi.DottedUnderline -> False
+ Ansi.DashedUnderline -> False
Ansi.NoUnderline -> False
@@ -372,6 +375,9 @@ toColor layer intensity color =
Ansi.Background ->
Nothing
+ Ansi.Underlining ->
+ Nothing
+
Ansi.Foreground ->
let
pick dull vivid =

View File

@@ -9,7 +9,6 @@
directory,
edit-distance,
fetchgit,
file-embed,
filelock,
filepath,
ghc-prim,
@@ -24,7 +23,6 @@
network,
parsec,
process,
raw-strings-qq,
scientific,
SHA,
snap-core,
@@ -38,13 +36,14 @@
}:
mkDerivation {
pname = "elm";
version = "0.19.1";
version = "0.19.2";
src = fetchgit {
url = "https://github.com/elm/compiler";
sha256 = "1h9jhwlv1pqqna5s09vd72arwhhjn0dlhv0w9xx5771x0xryxxg8";
rev = "2f6dd29258e880dbb7effd57a829a0470d8da48b";
sha256 = "0npadfvk5gyiifq4095yg7k8cr3hb28drdh07b77nxzwsqanp4s5";
rev = "48befde196cbcbdf459114e36c02b52c49b58050";
fetchSubmodules = true;
};
patches = [ ./ansi-terminal-1.1.patch ];
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
@@ -56,7 +55,6 @@ mkDerivation {
containers
directory
edit-distance
file-embed
filelock
filepath
ghc-prim
@@ -70,7 +68,6 @@ mkDerivation {
network
parsec
process
raw-strings-qq
scientific
SHA
snap-core
@@ -84,6 +81,6 @@ mkDerivation {
];
homepage = "https://elm-lang.org";
description = "The `elm` command line interface";
license = lib.licenses.bsd3;
license = lib.meta.getLicenseFromSpdxId "BSD-3-Clause";
mainProgram = "elm";
}

View File

@@ -1,5 +1,9 @@
#!/usr/bin/env nix-shell
#!nix-shell -p cabal2nix elm2nix -i bash ../../..
#!nix-shell -I nixpkgs=../../../..
#!nix-shell --pure -p nix cacert cabal2nix elm2nix nixfmt -i bash ../../../..
set -o errexit
set -o nounset
# Update all cabal packages.
for subpath in 'avh4-lib' 'elm-format-lib' 'elm-format-markdown' 'elm-format-test-lib'; do
@@ -7,13 +11,11 @@ for subpath in 'avh4-lib' 'elm-format-lib' 'elm-format-markdown' 'elm-format-tes
--subpath $subpath > packages/ghc9_8/elm-format/${subpath}.nix
done
cabal2nix --no-haddock 'https://github.com/avh4/elm-format' --revision '0.8.8' > packages/ghc9_8/elm-format/elm-format.nix
cabal2nix 'https://github.com/ekmett/ansi-wl-pprint' --revision 'v0.6.8.1' > packages/ghc9_6/ansi-wl-pprint/default.nix
cabal2nix 'https://github.com/ekmett/ansi-wl-pprint' --revision 'v0.6.8.1' > packages/ghc9_8/ansi-wl-pprint/default.nix
# We're building binaries from commit that npm installer is using since
# November 1st release called 0.19.1-6 in npm registry.
# We're building binaries from commit corresponding to https://github.com/elm/compiler/releases/tag/0.19.2.
# These binaries are built with newer ghc version and also support Aarch64 for Linux and Darwin.
# Upstream git tag for 0.19.1 is still pointing to original commit from 2019.
cabal2nix https://github.com/elm/compiler --revision 2f6dd29258e880dbb7effd57a829a0470d8da48b > packages/ghc9_6/elm/default.nix
cabal2nix https://github.com/elm/compiler --revision 48befde196cbcbdf459114e36c02b52c49b58050 > packages/ghc9_8/elm/default.nix
echo "need to manually copy registry.dat from an existing elm project"
#elm2nix snapshot > registry.dat
@@ -21,3 +23,6 @@ echo "need to manually copy registry.dat from an existing elm project"
pushd "$(nix-build -A elmPackages.elm.src --no-out-link ../../../..)/reactor"
elm2nix convert > $OLDPWD/packages/elm-srcs.nix
popd
# cabal2nix, elm2nix, etc. may not respect nixpkgs formatting rules
nixfmt .