diff --git a/NixSupport/haskell-packages/ghc-exactprint_1_8_0_0.nix b/NixSupport/haskell-packages/ghc-exactprint_1_8_0_0.nix deleted file mode 100644 index 2f6ea9923..000000000 --- a/NixSupport/haskell-packages/ghc-exactprint_1_8_0_0.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ mkDerivation, base, bytestring, Cabal-syntax, containers - , data-default, Diff, directory, extra, fail, filepath, free, ghc - , ghc-boot, ghc-paths, HUnit, mtl, ordered-containers, silently - , syb, lib - }: - mkDerivation { - pname = "ghc-exactprint"; - version = "1.8.0.0"; - sha256 = "10j98rnn69wig6xks1x5xq19730225ksz3il93x8zniddsn40v8v"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - base bytestring containers data-default directory fail filepath - free ghc ghc-boot mtl ordered-containers syb - ]; - testHaskellDepends = [ - base bytestring Cabal-syntax containers data-default Diff directory - extra fail filepath ghc ghc-boot ghc-paths HUnit mtl - ordered-containers silently syb - ]; - description = "ExactPrint for GHC"; - license = lib.licenses.bsd3; - } \ No newline at end of file diff --git a/NixSupport/haskell-packages/ghc-syntax-highlighter.nix b/NixSupport/haskell-packages/ghc-syntax-highlighter.nix deleted file mode 100644 index 094101008..000000000 --- a/NixSupport/haskell-packages/ghc-syntax-highlighter.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ mkDerivation, base, ghc-lib-parser, hspec, hspec-discover, lib -, text -}: -mkDerivation { - pname = "ghc-syntax-highlighter"; - version = "0.0.10.0"; - sha256 = "145xjyraqd62k5amyqi9028rr9v2lgz3irmgz5v2hppza1i5qy72"; - enableSeparateDataOutput = true; - libraryHaskellDepends = [ base ghc-lib-parser text ]; - testHaskellDepends = [ base hspec text ]; - testToolDepends = [ hspec-discover ]; - homepage = "https://github.com/mrkkrp/ghc-syntax-highlighter"; - description = "Syntax highlighter for Haskell using the lexer of GHC"; - license = lib.licenses.bsd3; -} \ No newline at end of file diff --git a/NixSupport/mkGhcCompiler.nix b/NixSupport/mkGhcCompiler.nix index 41b8d2e25..3ca9401b7 100644 --- a/NixSupport/mkGhcCompiler.nix +++ b/NixSupport/mkGhcCompiler.nix @@ -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 @@ -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; }; }) ]; } diff --git a/devenv-module.nix b/devenv-module.nix index 7eebecfe8..e4e271458 100644 --- a/devenv-module.nix +++ b/devenv-module.nix @@ -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; }; }; } diff --git a/flake-module.nix b/flake-module.nix index fc7afeffb..2609238b9 100644 --- a/flake-module.nix +++ b/flake-module.nix @@ -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 = '' diff --git a/flake.lock b/flake.lock index 4000995e2..39d84acc7 100644 --- a/flake.lock +++ b/flake.lock @@ -35,11 +35,11 @@ "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1711099683, - "narHash": "sha256-jH1JKhGQ6aC+GlEl8SvrFTy1FEVA85IcbkQemeEYFaA=", + "lastModified": 1711175482, + "narHash": "sha256-llShiYcLHug8sJUCgBJ4TnQEZXfBnTS1oYYKeXf4t44=", "owner": "cachix", "repo": "devenv", - "rev": "4e446c65d2295d12d1503424aa352d28e7e32c7b", + "rev": "4cd98abe9b509a1f69a7a5f78a831400a20d289f", "type": "github" }, "original": { @@ -1049,17 +1049,17 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1711066351, - "narHash": "sha256-xCSnQNr2izUVC/9SF2S8XHVs09Ox8FIYKs0QBZFN6cg=", + "lastModified": 1711411942, + "narHash": "sha256-xY4gqwF9i7PFHhpWIdtUjUsp/bFG7EtHtg0cwqXm4Jw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d899609c2a22bbd345d2ed200c6ebc08a772ccc9", + "rev": "39a71cf239c585c3b740f94760ed20695acfcc35", "type": "github" }, "original": { "owner": "NixOS", + "ref": "haskell-updates", "repo": "nixpkgs", - "rev": "d899609c2a22bbd345d2ed200c6ebc08a772ccc9", "type": "github" } }, diff --git a/flake.nix b/flake.nix index f39525351..39288ad45 100644 --- a/flake.nix +++ b/flake.nix @@ -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";