Skip to content

Commit

Permalink
Removed all unnecessary package overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten authored and MonaMayrhofer committed Mar 26, 2024
1 parent 1e4c4e3 commit ebebd39
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 80 deletions.
23 changes: 0 additions & 23 deletions NixSupport/haskell-packages/ghc-exactprint_1_8_0_0.nix

This file was deleted.

15 changes: 0 additions & 15 deletions NixSupport/haskell-packages/ghc-syntax-highlighter.nix

This file was deleted.

35 changes: 5 additions & 30 deletions NixSupport/mkGhcCompiler.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ let
in
builtins.listToAttrs (map toPackage names);

ihpDontCheckPackages = [ "mmark" "mmark-ext" "mutable-containers" "hiedb" "hls-fourmolu-plugin" "relude" "inflections" "hls-hlint-plugin" "fourmolu_0_15_0_0" "pcre-heavy"];
ihpDoJailbreakPackages = [ "haskell-to-elm" "ip" "ghc-syntax-highlighter" "relude" "hs-brotli" "tuples" "singletons-th" "singletons-base" "inflections" "postgresql-simple" "chell" "zigzag" "typerep-map" "relude" "bytebuild" "connection" "microlens" "microlens-th" "hls-hlint-plugin" "hlint" "stripe-concepts" "string-random" "stripe-signature"];
ihpDontHaddockPackages = [ ];
ihpDontCheckPackages = [];
ihpDoJailbreakPackages = [
"inflections" # Can be removed after https://github.com/NixOS/nixpkgs/pull/298337 is merged
];
ihpDontHaddockPackages = [];
in ghcCompiler.override {
overrides = composeExtensionsList [
generatedOverrides
Expand All @@ -53,33 +55,6 @@ in ghcCompiler.override {
(makeOverrides pkgs.haskell.lib.dontHaddock dontHaddockPackages)
manualOverrides

(self: super: { apply-refact_0_14_0_0 = super.apply-refact_0_14_0_0.override { ghc-exactprint = self.ghc-exactprint_1_8_0_0; }; })
(self: super: { haskell-language-server = pkgs.haskell.lib.appendConfigureFlag (super.haskell-language-server.override { ghc-exactprint = self.ghc-exactprint_1_8_0_0; fourmolu = self.fourmolu_0_15_0_0; stylish-haskell = self.stylish-haskell_0_14_6_0; apply-refact = self.apply-refact_0_14_0_0; ormolu = self.ormolu_0_7_4_0; hlint = self.hlint_3_8; }) "--enable-executable-dynamic"; })
(self: super: { ormolu_0_7_4_0 = if pkgs.system == "aarch64-darwin" then pkgs.haskell.lib.overrideCabal super.ormolu_0_7_4_0 (_: { enableSeparateBinOutput = false; }) else super.ormolu_0_7_4_0; })
(self: super: { ghc-syntax-highlighter = super.ghc-syntax-highlighter_0_0_11_0; })
(self: super: { retrie = super.retrie.override { ghc-exactprint = self.ghc-exactprint_1_8_0_0; }; })

(self: super: { websockets = super.websockets_0_13_0_0; })
(self: super: {
minio-hs = (pkgs.haskell.lib.overrideCabal super.minio-hs (_: {
patches = [
(pkgs.fetchpatch {
name = "use-crypoton-connection.patch";
url = "https://github.com/minio/minio-hs/commit/786cf1881f0b62b7539e63547e76afc3c1ade36a.patch";
sha256 = "sha256-zw0/jhKzShpqV1sUyxWTl73sQOzm6kA/yQOZ9n0L1Ag";
}) ];
})).override { connection = super.crypton-connection; };


smtp-mail = (pkgs.haskell.lib.overrideCabal super.smtp-mail (_: {
patches = [
(pkgs.fetchpatch {
url = "https://github.com/jhickner/smtp-mail/commit/4c724c80814ab1da7c37256a6c10e04c88b9af95.patch";
sha256 = "sha256-rCyY4rB/wLspeAbLw1jji5BykYFLnmTjLiUyNkiEXmw";
}) ];
})).override { connection = super.crypton-connection; };
})

# (self: super: { fourmolu_0_15_0_0 = super.fourmolu_0_15_0_0.override { hlint = self.ghc-exactprint_1_8_0_0; }; })
];
}
2 changes: 1 addition & 1 deletion devenv-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ that is defined in flake-module.nix
'';

languages.haskell.stack = null; # Stack is not used in IHP
languages.haskell.languageServer = null;
languages.haskell.languageServer = ghcCompiler.haskell-language-server;
};
};
}
2 changes: 1 addition & 1 deletion flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ ihpFlake:
then ghcCompiler.ghc.withHoogle
else ghcCompiler.ghc.withPackages) cfg.haskellPackages;

languages.haskell.languageServer = null;
languages.haskell.languageServer = ghcCompiler.haskell-language-server;
languages.haskell.stack = null; # Stack is not used in IHP

scripts.start.exec = ''
Expand Down
14 changes: 7 additions & 7 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
description = "IHP is a modern batteries-included haskell web framework, built on top of Haskell and Nix.";

inputs = {
# TODO use nixpkgs-unstable and just .lock a version?
# Waiting for https://github.com/NixOS/nixpkgs/pull/296909
nixpkgs.url = "github:NixOS/nixpkgs?rev=d899609c2a22bbd345d2ed200c6ebc08a772ccc9";
nixpkgs.url = "github:NixOS/nixpkgs/haskell-updates";

# pre-defined set of default target systems
systems.url = "github:nix-systems/default";
Expand Down

0 comments on commit ebebd39

Please sign in to comment.