mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
Merge pull request #277326 from turboMaCk/elm-ghc-update
elmPackages.elm: use ghc96
This commit is contained in:
commit
f3d56826dd
@ -7,8 +7,8 @@
|
||||
let
|
||||
fetchElmDeps = pkgs.callPackage ./fetchElmDeps.nix { };
|
||||
|
||||
# Haskell packages that require ghc 8.10
|
||||
hs810Pkgs = self: pkgs.haskell.packages.ghc810.override {
|
||||
# Haskell packages that require ghc 9.6
|
||||
hs96Pkgs = self: pkgs.haskell.packages.ghc96.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let elmPkgs = rec {
|
||||
elm = overrideCabal (drv: {
|
||||
@ -20,7 +20,6 @@ let
|
||||
registryDat = ./registry.dat;
|
||||
};
|
||||
buildTools = drv.buildTools or [] ++ [ makeWrapper ];
|
||||
jailbreak = true;
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/elm \
|
||||
--prefix PATH ':' ${lib.makeBinPath [ nodejs ]}
|
||||
@ -32,6 +31,18 @@ let
|
||||
maintainers = with maintainers; [ domenkozar turbomack ];
|
||||
}) (self.callPackage ./packages/elm.nix { });
|
||||
|
||||
inherit fetchElmDeps;
|
||||
elmVersion = elmPkgs.elm.version;
|
||||
};
|
||||
in elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
};
|
||||
};
|
||||
|
||||
# Haskell packages that require ghc 8.10
|
||||
hs810Pkgs = self: pkgs.haskell.packages.ghc810.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let elmPkgs = rec {
|
||||
elmi-to-json = justStaticExecutables (overrideCabal (drv: {
|
||||
prePatch = ''
|
||||
substituteInPlace package.yaml --replace "- -Werror" ""
|
||||
@ -58,9 +69,6 @@ let
|
||||
license = licenses.bsd3;
|
||||
maintainers = [ maintainers.turbomack ];
|
||||
}) (self.callPackage ./packages/elm-instrument.nix {}));
|
||||
|
||||
inherit fetchElmDeps;
|
||||
elmVersion = elmPkgs.elm.version;
|
||||
};
|
||||
in elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
@ -131,7 +139,7 @@ in lib.makeScope pkgs.newScope (self: with self; {
|
||||
`patchNpmElm` function also defined in `packages/lib.nix`.
|
||||
*/
|
||||
elmLib = let
|
||||
hsElmPkgs = hs810Pkgs self;
|
||||
hsElmPkgs = (hs810Pkgs self) // (hs96Pkgs self);
|
||||
in import ./packages/lib.nix {
|
||||
inherit lib;
|
||||
inherit (pkgs) writeScriptBin stdenv;
|
||||
@ -143,7 +151,7 @@ in lib.makeScope pkgs.newScope (self: with self; {
|
||||
elm-test-rs = callPackage ./packages/elm-test-rs.nix { };
|
||||
|
||||
elm-test = callPackage ./packages/elm-test.nix { };
|
||||
} // (hs810Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (with elmLib; with (hs810Pkgs self).elmPkgs; {
|
||||
} // (hs96Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (hs810Pkgs self).elmPkgs // (with elmLib; with (hs96Pkgs self).elmPkgs; {
|
||||
elm-verify-examples = let
|
||||
patched = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples // {
|
||||
meta = with lib; nodePkgs.elm-verify-examples.meta // {
|
||||
|
@ -3,8 +3,7 @@
|
||||
{elmPackages, registryDat, elmVersion}:
|
||||
|
||||
let
|
||||
makeDotElm = import ./makeDotElm.nix {inherit stdenv lib fetchurl registryDat;};
|
||||
|
||||
makeDotElm = import ./makeDotElm.nix { inherit stdenv lib fetchurl registryDat; };
|
||||
in
|
||||
''
|
||||
export ELM_HOME=`pwd`/.elm
|
||||
|
@ -11,8 +11,8 @@ mkDerivation {
|
||||
version = "0.19.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/elm/compiler";
|
||||
sha256 = "1rdg3xp3js9xadclk3cdypkscm5wahgsfmm4ldcw3xswzhw6ri8w";
|
||||
rev = "c9aefb6230f5e0bda03205ab0499f6e4af924495";
|
||||
sha256 = "1h9jhwlv1pqqna5s09vd72arwhhjn0dlhv0w9xx5771x0xryxxg8";
|
||||
rev = "2f6dd29258e880dbb7effd57a829a0470d8da48b";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = false;
|
||||
|
@ -8,9 +8,8 @@ mkDerivation {
|
||||
version = "1.3.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/stoeffel/elmi-to-json";
|
||||
sha256 = "11j56vcyhijkwi9hzggkwwmxlhzhgm67ab2m7kxkhcbbqgpasa8n";
|
||||
rev = "ae40d1aa1e3d6878f2af514e611d44890e7abc1e";
|
||||
fetchSubmodules = true;
|
||||
rev = "bd18efb59d247439b362272b480e67a16a4e424e";
|
||||
sha256 = "sha256-9fScXRSyTkqzeXwh/Jjza6mnENCThlU6KI366CLFcgY=";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
|
Binary file not shown.
@ -1,9 +1,15 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -p cabal2nix elm2nix -i bash ../../..
|
||||
|
||||
cabal2nix https://github.com/elm/compiler --revision c9aefb6230f5e0bda03205ab0499f6e4af924495 > packages/elm.nix
|
||||
# We're building binaries from commit that npm installer is using since
|
||||
# November 1st release called 0.19.1-6 in npm registry.
|
||||
# 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/elm.nix
|
||||
|
||||
echo "need to manually copy registry.dat from an existing elm project"
|
||||
#elm2nix snapshot > registry.dat
|
||||
|
||||
pushd "$(nix-build -A elmPackages.elm.src --no-out-link ../../../..)/reactor"
|
||||
elm2nix convert > $OLDPWD/packages/elm-srcs.nix
|
||||
popd
|
||||
|
Loading…
Reference in New Issue
Block a user