forked from mirrors/nixpkgs
Merge pull request #219057 from avh4/elm-format-0.8.6
elm-format: 0.8.5 -> 0.8.6
This commit is contained in:
commit
a87b99a3c7
|
@ -7,7 +7,8 @@ let
|
|||
|
||||
fetchElmDeps = pkgs.callPackage ./fetchElmDeps.nix { };
|
||||
|
||||
hsPkgs = self: pkgs.haskell.packages.ghc810.override {
|
||||
# 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 {
|
||||
elm = overrideCabal (drv: {
|
||||
|
@ -31,20 +32,6 @@ let
|
|||
maintainers = with maintainers; [ domenkozar turbomack ];
|
||||
}) (self.callPackage ./packages/elm.nix { });
|
||||
|
||||
/*
|
||||
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;
|
||||
doCheck = assert (drv.version == "0.8.5"); false; # golden tests fail with optparse-applicative 0.17
|
||||
|
||||
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 = licenses.bsd3;
|
||||
maintainers = with maintainers; [ avh4 turbomack ];
|
||||
}) (self.callPackage ./packages/elm-format.nix {}));
|
||||
|
||||
elmi-to-json = justStaticExecutables (overrideCabal (drv: {
|
||||
prePatch = ''
|
||||
substituteInPlace package.yaml --replace "- -Werror" ""
|
||||
|
@ -84,23 +71,48 @@ let
|
|||
# aeson 2.0.3.0 does not build with attoparsec_0_13_2_5
|
||||
aeson = self.aeson_1_5_6_0;
|
||||
|
||||
# Needed for elm-format
|
||||
# elm-instrument needs this
|
||||
indents = self.callPackage ./packages/indents.nix {};
|
||||
bimap = self.callPackage ./packages/bimap.nix {};
|
||||
|
||||
# elm-instrument's tests depend on an old version of elm-format, but we set doCheck to false for other reasons above
|
||||
elm-format = null;
|
||||
};
|
||||
};
|
||||
|
||||
# Haskell packages that require ghc 9.2
|
||||
hs92Pkgs = self: pkgs.haskell.packages.ghc92.override {
|
||||
overrides = self: super: with pkgs.haskell.lib.compose; with lib;
|
||||
let elmPkgs = rec {
|
||||
/*
|
||||
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;
|
||||
|
||||
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 = licenses.bsd3;
|
||||
maintainers = with maintainers; [ avh4 turbomack ];
|
||||
}) (self.callPackage ./packages/elm-format.nix {}));
|
||||
};
|
||||
in elmPkgs // {
|
||||
inherit elmPkgs;
|
||||
|
||||
# Needed for elm-format
|
||||
avh4-lib = doJailbreak (self.callPackage ./packages/avh4-lib.nix {});
|
||||
elm-format-lib = doJailbreak (self.callPackage ./packages/elm-format-lib.nix {});
|
||||
# We need tasty-hspec < 1.1.7 and hspec-golden < 0.2 to build elm-format-lib
|
||||
tasty-hspec = self.tasty-hspec_1_1_6;
|
||||
hspec-golden = self.hspec-golden_0_1_0_3;
|
||||
|
||||
# We need hspec hspec_core, hspec_discover < 2.8 for tasty-hspec == 1.1.6
|
||||
hspec = self.hspec_2_7_10;
|
||||
hspec-core = self.hspec-core_2_7_10;
|
||||
hspec-discover = self.hspec-discover_2_7_10;
|
||||
hspec-meta = self.hspec-meta_2_7_8;
|
||||
|
||||
elm-format-test-lib = self.callPackage ./packages/elm-format-test-lib.nix {};
|
||||
elm-format-markdown = self.callPackage ./packages/elm-format-markdown.nix {};
|
||||
|
||||
# elm-format requires text >= 2.0
|
||||
text = self.text_2_0_1;
|
||||
# elm-format-lib requires hspec-golden < 0.2
|
||||
hspec-golden = self.hspec-golden_0_1_0_3;
|
||||
# unorderd-container's tests indirectly depend on text < 2.0
|
||||
unordered-containers = overrideCabal (drv: { doCheck = false; }) super.unordered-containers;
|
||||
# relude-1.1.0.0's tests depend on hedgehog < 1.2, which indirectly depends on text < 2.0
|
||||
relude = overrideCabal (drv: { doCheck = false; }) super.relude;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -122,7 +134,7 @@ in lib.makeScope pkgs.newScope (self: with self; {
|
|||
`patchNpmElm` function also defined in `packages/lib.nix`.
|
||||
*/
|
||||
elmLib = let
|
||||
hsElmPkgs = hsPkgs self;
|
||||
hsElmPkgs = hs810Pkgs self;
|
||||
in import ./packages/lib.nix {
|
||||
inherit lib;
|
||||
inherit (pkgs) writeScriptBin stdenv;
|
||||
|
@ -141,7 +153,7 @@ in lib.makeScope pkgs.newScope (self: with self; {
|
|||
maintainers = [ maintainers.turbomack ];
|
||||
};
|
||||
};
|
||||
} // (hsPkgs self).elmPkgs // (with elmLib; with (hsPkgs self).elmPkgs; {
|
||||
} // (hs810Pkgs self).elmPkgs // (hs92Pkgs self).elmPkgs // (with elmLib; with (hs810Pkgs self).elmPkgs; {
|
||||
elm-verify-examples = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples // {
|
||||
meta = with lib; nodePkgs.elm-verify-examples.meta // {
|
||||
description = "Verify examples in your docs";
|
||||
|
|
|
@ -1,26 +1,26 @@
|
|||
{ mkDerivation, ansi-terminal, ansi-wl-pprint, array, base, bimap
|
||||
, binary, bytestring, containers, directory, fetchgit, filepath
|
||||
, lib, mtl, process, relude, tasty, tasty-discover, tasty-hspec
|
||||
, tasty-hunit, text
|
||||
, lib, mtl, pooled-io, process, relude, tasty, tasty-discover
|
||||
, tasty-hspec, tasty-hunit, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "avh4-lib";
|
||||
version = "0.0.0.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/avh4/elm-format";
|
||||
sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6";
|
||||
rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be";
|
||||
sha256 = "1aiq3mv2ycv6bal5hnz6k33bzmnnidzxxs5b6z9y6lvmr0lbf3j4";
|
||||
rev = "7e80dd48dd9b30994e43f4804b2ea7118664e8e0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/avh4-lib; echo source root reset to $sourceRoot";
|
||||
libraryHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint array base bimap binary bytestring
|
||||
containers directory filepath mtl process relude text
|
||||
containers directory filepath mtl pooled-io process relude text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint array base bimap binary bytestring
|
||||
containers directory filepath mtl process relude tasty tasty-hspec
|
||||
tasty-hunit text
|
||||
containers directory filepath mtl pooled-io process relude tasty
|
||||
tasty-hspec tasty-hunit text
|
||||
];
|
||||
testToolDepends = [ tasty-discover ];
|
||||
doHaddock = false;
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
{ mkDerivation, ansi-terminal, ansi-wl-pprint, array, avh4-lib
|
||||
, base, bimap, binary, bytestring, containers, directory
|
||||
{ mkDerivation, aeson, ansi-terminal, ansi-wl-pprint, array
|
||||
, avh4-lib, base, bimap, binary, bytestring, containers, directory
|
||||
, elm-format-markdown, elm-format-test-lib, fetchgit, filepath
|
||||
, indents, json, lib, mtl, optparse-applicative, parsec, process
|
||||
, relude, split, tasty, tasty-discover, tasty-hspec, tasty-hunit
|
||||
, text
|
||||
, ghc-prim, hspec, lib, mtl, optparse-applicative, process, relude
|
||||
, split, tasty, tasty-discover, tasty-hspec, tasty-hunit, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-format-lib";
|
||||
version = "0.0.0.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/avh4/elm-format";
|
||||
sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6";
|
||||
rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be";
|
||||
sha256 = "1aiq3mv2ycv6bal5hnz6k33bzmnnidzxxs5b6z9y6lvmr0lbf3j4";
|
||||
rev = "7e80dd48dd9b30994e43f4804b2ea7118664e8e0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/elm-format-lib; echo source root reset to $sourceRoot";
|
||||
libraryHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint array avh4-lib base bimap binary
|
||||
aeson ansi-terminal ansi-wl-pprint array avh4-lib base bimap binary
|
||||
bytestring containers directory elm-format-markdown filepath
|
||||
indents json mtl optparse-applicative parsec process relude text
|
||||
ghc-prim mtl optparse-applicative process relude text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
ansi-terminal ansi-wl-pprint array avh4-lib base bimap binary
|
||||
aeson ansi-terminal ansi-wl-pprint array avh4-lib base bimap binary
|
||||
bytestring containers directory elm-format-markdown
|
||||
elm-format-test-lib filepath indents json mtl optparse-applicative
|
||||
parsec process relude split tasty tasty-hspec tasty-hunit text
|
||||
elm-format-test-lib filepath ghc-prim hspec mtl
|
||||
optparse-applicative process relude split tasty tasty-hspec
|
||||
tasty-hunit text
|
||||
];
|
||||
testToolDepends = [ tasty-discover ];
|
||||
doHaddock = false;
|
||||
|
|
|
@ -4,8 +4,8 @@ mkDerivation {
|
|||
version = "0.0.0.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/avh4/elm-format";
|
||||
sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6";
|
||||
rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be";
|
||||
sha256 = "1aiq3mv2ycv6bal5hnz6k33bzmnnidzxxs5b6z9y6lvmr0lbf3j4";
|
||||
rev = "7e80dd48dd9b30994e43f4804b2ea7118664e8e0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/elm-format-markdown; echo source root reset to $sourceRoot";
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
{ mkDerivation, avh4-lib, base, containers, fetchgit, filepath
|
||||
, hspec-core, hspec-golden, lib, mtl, split, tasty, tasty-discover
|
||||
, tasty-hspec, tasty-hunit, text
|
||||
, hspec, hspec-core, hspec-golden, lib, mtl, split, tasty
|
||||
, tasty-discover, tasty-hspec, tasty-hunit, text
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "elm-format-test-lib";
|
||||
version = "0.0.0.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/avh4/elm-format";
|
||||
sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6";
|
||||
rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be";
|
||||
sha256 = "1aiq3mv2ycv6bal5hnz6k33bzmnnidzxxs5b6z9y6lvmr0lbf3j4";
|
||||
rev = "7e80dd48dd9b30994e43f4804b2ea7118664e8e0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/elm-format-test-lib; echo source root reset to $sourceRoot";
|
||||
libraryHaskellDepends = [
|
||||
avh4-lib base containers filepath hspec-core hspec-golden mtl split
|
||||
tasty tasty-hspec tasty-hunit text
|
||||
avh4-lib base containers filepath hspec hspec-core hspec-golden mtl
|
||||
split tasty tasty-hspec tasty-hunit text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
avh4-lib base containers filepath hspec-core hspec-golden mtl split
|
||||
tasty tasty-hspec tasty-hunit text
|
||||
avh4-lib base containers filepath hspec hspec-core hspec-golden mtl
|
||||
split tasty tasty-hspec tasty-hunit text
|
||||
];
|
||||
testToolDepends = [ tasty-discover ];
|
||||
doHaddock = false;
|
||||
|
|
|
@ -1,33 +1,35 @@
|
|||
{ mkDerivation, ansi-wl-pprint, avh4-lib, base, bimap, cmark
|
||||
, containers, elm-format-lib, elm-format-test-lib, fetchgit, json
|
||||
, lib, mtl, optparse-applicative, parsec, QuickCheck, quickcheck-io
|
||||
, relude, tasty, tasty-hspec, tasty-hunit, tasty-quickcheck, text
|
||||
{ mkDerivation, aeson, ansi-wl-pprint, avh4-lib, base, bimap
|
||||
, bytestring, containers, elm-format-lib, elm-format-test-lib
|
||||
, fetchgit, hspec, lib, mtl, optparse-applicative, QuickCheck
|
||||
, quickcheck-io, relude, tasty, tasty-hspec, tasty-hunit
|
||||
, tasty-quickcheck, text
|
||||
}:
|
||||
mkDerivation rec {
|
||||
pname = "elm-format";
|
||||
version = "0.8.5";
|
||||
version = "0.8.6";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/avh4/elm-format";
|
||||
sha256 = "0bcjkcs1dy1csz0mpk7d4b5wf93fsj9p86x8fp42mb0pipdd0bh6";
|
||||
rev = "80f15d85ee71e1663c9b53903f2b5b2aa444a3be";
|
||||
sha256 = "1aiq3mv2ycv6bal5hnz6k33bzmnnidzxxs5b6z9y6lvmr0lbf3j4";
|
||||
rev = "7e80dd48dd9b30994e43f4804b2ea7118664e8e0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = false;
|
||||
isExecutable = true;
|
||||
executableHaskellDepends = [
|
||||
ansi-wl-pprint avh4-lib base containers elm-format-lib json
|
||||
optparse-applicative relude text
|
||||
aeson ansi-wl-pprint avh4-lib base bytestring containers
|
||||
elm-format-lib optparse-applicative relude text
|
||||
];
|
||||
testHaskellDepends = [
|
||||
ansi-wl-pprint avh4-lib base bimap cmark containers elm-format-lib
|
||||
elm-format-test-lib json mtl optparse-applicative parsec QuickCheck
|
||||
quickcheck-io relude tasty tasty-hspec tasty-hunit tasty-quickcheck
|
||||
text
|
||||
aeson ansi-wl-pprint avh4-lib base bimap bytestring containers
|
||||
elm-format-lib elm-format-test-lib hspec mtl optparse-applicative
|
||||
QuickCheck quickcheck-io relude tasty tasty-hspec tasty-hunit
|
||||
tasty-quickcheck text
|
||||
];
|
||||
doHaddock = false;
|
||||
homepage = "https://elm-lang.org";
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue