Skip to content

Commit

Permalink
add fourmolu 0.17 (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-martin authored Jan 31, 2025
1 parent d4ded7b commit dc71903
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
1 change: 1 addition & 0 deletions main/fourmolu/checks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ in
fourmolu-0-13-1 = versionCheck "0.13.1" packages.fourmolu-0-13-1;
fourmolu-0-14-0 = versionCheck "0.14.0" packages.fourmolu-0-14-0;
fourmolu-0-16-2 = versionCheck "0.16.2" packages.fourmolu-0-16-2;
fourmolu-0-17-0 = versionCheck "0.17.0" packages.fourmolu-0-17-0;
}
33 changes: 33 additions & 0 deletions main/fourmolu/haskell-packages/fourmolu-0.17.0.cabal.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{ mkDerivation, aeson, ansi-terminal, array, base, binary
, bytestring, Cabal-syntax, choice, containers, deepseq, Diff
, directory, file-embed, filepath, ghc-lib-parser, hspec
, hspec-discover, hspec-megaparsec, lib, megaparsec, MemoTrie, mtl
, optparse-applicative, path, path-io, pretty, process, QuickCheck
, scientific, syb, temporary, terminal-size, text, th-env, yaml
}:
mkDerivation {
pname = "fourmolu";
version = "0.17.0.0";
sha256 = "1a3a8c39de4f489ab045c6e0094b633c8d35552efe220f2424350697c58defd9";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson ansi-terminal array base binary bytestring Cabal-syntax
choice containers deepseq Diff directory file-embed filepath
ghc-lib-parser megaparsec MemoTrie mtl scientific syb text
];
executableHaskellDepends = [
base Cabal-syntax containers directory filepath ghc-lib-parser
optparse-applicative terminal-size text th-env yaml
];
testHaskellDepends = [
base bytestring Cabal-syntax choice containers Diff directory
filepath ghc-lib-parser hspec hspec-megaparsec megaparsec path
path-io pretty process QuickCheck temporary text yaml
];
testToolDepends = [ hspec-discover ];
homepage = "https://github.com/fourmolu/fourmolu";
description = "A formatter for Haskell source code";
license = lib.licenses.bsd3;
mainProgram = "fourmolu";
}
33 changes: 31 additions & 2 deletions main/fourmolu/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@
let
inherit (builtins) getFlake;

versions = v0-13 // v0-14 // v0-16 // { fourmolu-default = versions.fourmolu-0-13-x; };
versions =
v0-13
// v0-14
// v0-16
// v0-17
// {
fourmolu-default = versions.fourmolu-0-17-x;
};

v0-13 =
let
Expand Down Expand Up @@ -77,7 +84,7 @@ let

fourmolu-0-16-2 =
justStaticExecutables
(haskell.packages.ghc9101.override {
(haskell.packages.ghc910.override {
overrides = self: super: {
fourmolu =
overrideCabal (super.callPackage ./haskell-packages/fourmolu-0.16.2.cabal.nix { })
Expand All @@ -88,5 +95,27 @@ let
}).fourmolu;
};

v0-17 =
let
nixpkgs = inputs.nixpkgs-24-11.legacyPackages.${system};
inherit (nixpkgs) haskell;
inherit (haskell.lib) justStaticExecutables overrideCabal;
in
rec {
fourmolu-0-17-x = fourmolu-0-17-0;

fourmolu-0-17-0 =
justStaticExecutables
(haskell.packages.ghc910.override {
overrides = self: super: {
fourmolu =
overrideCabal (super.callPackage ./haskell-packages/fourmolu-0.17.0.cabal.nix { })
(drv: {
doCheck = false;
});
};
}).fourmolu;
};

in
versions

0 comments on commit dc71903

Please sign in to comment.