From 7f96754e4ce403e3c690d74609a4339674469259 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Wed, 8 Dec 2021 15:57:15 +0000 Subject: [PATCH 1/3] Fix the nix build Bumped nixpkgs, removed some unnecessary overrides, added a few newly needed ones. --- configuration-ghc-901.nix | 61 ++++----------------------------------- flake.lock | 6 ++-- flake.nix | 13 ++------- 3 files changed, 11 insertions(+), 69 deletions(-) diff --git a/configuration-ghc-901.nix b/configuration-ghc-901.nix index 0b2878408f..e8e977cd03 100644 --- a/configuration-ghc-901.nix +++ b/configuration-ghc-901.nix @@ -12,63 +12,14 @@ let hpkgsOverride = hself: hsuper: with pkgs.haskell.lib; - let - dependent-sum-src = pkgs.fetchFromGitHub { - owner = "anka-213"; - repo = "dependent-sum"; - rev = "8cf4c7fbc3bfa2be475a17bb7c94a1e1e9a830b5"; - sha256 = "WtxTB6ufTZC6SxOtGSfhlO4mY0y9eWejMSa0yUJ7dHQ="; - }; - in { - - blaze-textual = hself.callCabal2nix "blaze-textual" - (builtins.fetchTarball { - url = "https://hackage.haskell.org/package/blaze-textual-0.2.2.1/blaze-textual-0.2.2.1.tar.gz"; - sha256 = "1nyhc9mrnxsl21ksnpp0ryki4wgk49r581yy504g2gjq6x3bkb59"; - }) { }; - - hie-bios = hself.callCabal2nix "hie-bios" - (builtins.fetchTarball { - url = "https://hackage.haskell.org/package/hie-bios-0.7.6/hie-bios-0.7.6.tar.gz"; - sha256 = "0w4rhy4b3jnci9m27l79c8n28wl56x49bmhdn7pvf88mx9srjcvq"; - }) { }; - - th-extras = hself.callCabal2nix "th-extras" (pkgs.fetchFromGitHub { - owner = "anka-213"; - repo = "th-extras"; - rev = "57a97b4df128eb7b360e8ab9c5759392de8d1659"; - sha256 = "Qtha1ge/C0L+uFcV2dZ5xpG59DCxQT7LuK/OYfiM4Pk="; - }) { }; - - dependent-sum = - hself.callCabal2nix "dependent-sum" "${dependent-sum-src}/dependent-sum" - { }; - - dependent-sum-template = hself.callCabal2nix "dependent-sum-template" - "${dependent-sum-src}/dependent-sum-template" { }; - - hlint = hself.hlint_3_3_1; - - ghc-lib-parser = hself.ghc-lib-parser_9_0_1_20210324; - - ghc-lib-parser-ex = hself.ghc-lib-parser-ex_9_0_0_4; - - ormolu = hself.ormolu_0_2_0_0; - - diagrams-core = hself.diagrams-core_1_5_0; - - diagrams-lib = hself.diagrams-lib_1_4_4; - - dual-tree = hself.dual-tree_0_2_3_0; - - monoid-extras = hself.monoid-extras_0_6; + { # Released on hackage, but not in nixpkgs yet - operational = hself.callCabal2nix "operational" (pkgs.fetchFromGitHub { - owner = "HeinrichApfelmus"; - repo = "operational"; - rev = "2b33e0055066cf92a302ee2c32058dfa44ac8882"; - sha256 = "sha256-nwB4vssm4wUTkVryjQVb3peOwR6js7vdekkbaWedHNI="; + primitive-extras = hself.callCabal2nix "primitive-extras" (pkgs.fetchFromGitHub { + owner = "metrix-ai"; + repo = "primitive-extras"; + rev = "c758d7366b99d85889cb13425fc0140879f8b936"; + sha256 = "sha256-vTT7svbM7IkhyxYx2xQ8p1ptoYe+ndcMN5+j9qx++7E="; }) { }; # Re-generate HLS drv excluding some plugins diff --git a/flake.lock b/flake.lock index ed2b424993..a96ea2b123 100644 --- a/flake.lock +++ b/flake.lock @@ -49,11 +49,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1630887066, - "narHash": "sha256-0ecIlrLsNIIa+zrNmzXXmbMBLZlmHU/aWFsa4bq99Hk=", + "lastModified": 1638249621, + "narHash": "sha256-5sm83bBBg/U6rALZy/IwITtYY4rJJ5mn4z1Tt5W8FT8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e47a07e9f2d7ed999f2c7943b0896f5f7321ca3", + "rev": "af21d41260846fb9c9840a75e310e56dfe97d6a3", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 39a19ef1bf..364f746c03 100644 --- a/flake.nix +++ b/flake.nix @@ -68,17 +68,8 @@ # Don't use `callHackage`, it requires us to override `all-cabal-hashes` tweaks = hself: hsuper: with haskell.lib; { - hiedb = hself.callCabal2nix "hiedb" - (builtins.fetchTarball { - url = "https://hackage.haskell.org/package/hiedb-0.4.1.0/hiedb-0.4.1.0.tar.gz"; - sha256 = "11s7lfkd6fc3zf3kgyp3jhicbhxpn6jp0yjahl8d28hicwr2qdpi"; - }) { }; - - lsp = hself.lsp_1_2_0_1; - - lsp-types = hself.lsp-types_1_3_0_1; - - lsp-test = hself.lsp-test_0_14_0_1; + # Patches don't apply + github = overrideCabal hsuper.github (drv: { patches = []; }); }; hlsSources = From c0a4200d6bfbaeab147e94320e2fa30cde8c8e0d Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Thu, 9 Dec 2021 12:32:59 +0000 Subject: [PATCH 2/3] Add override for hiedb --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index 364f746c03..8079398d10 100644 --- a/flake.nix +++ b/flake.nix @@ -70,6 +70,8 @@ with haskell.lib; { # Patches don't apply github = overrideCabal hsuper.github (drv: { patches = []; }); + # We need an older version + hiedb = hself.hiedb_0_4_1_0; }; hlsSources = From b05db1377c0ecec547acafc852fd68a600e7c691 Mon Sep 17 00:00:00 2001 From: Michael Peyton Jones Date: Thu, 9 Dec 2021 19:38:11 +0000 Subject: [PATCH 3/3] Pull in old implicit-hie-cradle --- flake.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/flake.nix b/flake.nix index 8079398d10..bb3aedc62b 100644 --- a/flake.nix +++ b/flake.nix @@ -72,6 +72,12 @@ github = overrideCabal hsuper.github (drv: { patches = []; }); # We need an older version hiedb = hself.hiedb_0_4_1_0; + + implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle" + (builtins.fetchTarball { + url = "https://hackage.haskell.org/package/implicit-hie-cradle-0.3.0.5/implicit-hie-cradle-0.3.0.5.tar.gz"; + sha256 = "15a7g9x6cjk2b92hb2wilxx4550msxp1pmk5a2shiva821qaxnfq"; + }) { }; }; hlsSources =