From 8be8a9f4061461a32a44ff0a08eb9160fea2c6c6 Mon Sep 17 00:00:00 2001 From: Drew Hess Date: Sat, 17 Sep 2022 11:07:01 +0100 Subject: [PATCH] chore(nix): Bump dependencies. Switch back to the haskell.nix-provided HLS. Also, we can undo the workarounds needed for https://github.com/input-output-hk/haskell.nix/issues/1177 as that issue has now been fixed upstream. And one more thing: we need to disable the NixOS test framework for the time being until I can port it to the next NixOS test system. --- flake.lock | 188 ++++++++++++++--------------------------------------- flake.nix | 138 +++++++-------------------------------- 2 files changed, 73 insertions(+), 253 deletions(-) diff --git a/flake.lock b/flake.lock index 39a1e44a0..3c4d02fca 100644 --- a/flake.lock +++ b/flake.lock @@ -118,16 +118,15 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1632802058, - "narHash": "sha256-7IySNHriQjzOZ88DDk6VDPf1GoUaOrOeUdukY62o52o=", - "owner": "hamishmack", + "lastModified": 1635892615, + "narHash": "sha256-harGbMZr4hzat2BWBU+Y5OYXlu+fVz7E4WeQzHi5o8A=", + "owner": "input-output-hk", "repo": "flake-compat", - "rev": "5523c47f13259b981c49b26e28499724a5125fd8", + "rev": "eca47d3377946315596da653862d341ee5341318", "type": "github" }, "original": { - "owner": "hamishmack", - "ref": "hkm/pkgs-fetch", + "owner": "input-output-hk", "repo": "flake-compat", "type": "github" } @@ -213,11 +212,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1662772451, - "narHash": "sha256-ilkCYrbktOl1kvMJ/zRZaoS41AVabHgaeUNfpwvDgW4=", + "lastModified": 1665709909, + "narHash": "sha256-2eFMPR+N1LoPaM9UPWstYWVZl9vGC+5k1nhDfI7kzTU=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "18aa3d7550a3eee83a0aee1246406c9add46fd2e", + "rev": "8d7cdf2699f45b60cc82dc083a51a647c579870b", "type": "github" }, "original": { @@ -238,11 +237,11 @@ "sops-nix": "sops-nix" }, "locked": { - "lastModified": 1662770742, - "narHash": "sha256-xaOE/a37n1nHRMMmE0UFneXTQ04ahxVUBZKD5lrkOl8=", + "lastModified": 1664547349, + "narHash": "sha256-HqTsITPuySdb9Xmlnuo1JDoQ4KTqb8P0n6kj59QG/OU=", "owner": "hackworthltd", "repo": "hacknix", - "rev": "db9c74ecfbb0518508e2701ae35e0ce61be712bb", + "rev": "ed730b35040f293d06dbb402f552c3b1faacdb0a", "type": "github" }, "original": { @@ -251,22 +250,6 @@ "type": "github" } }, - "haskell-language-server": { - "flake": false, - "locked": { - "lastModified": 1662666864, - "narHash": "sha256-1fECkXiIt04RIFBu7hCDrGUOUgNVVn3rEzi/D7UbawI=", - "owner": "haskell", - "repo": "haskell-language-server", - "rev": "3fb4082f8038d573d7636a2d74aa1be70d317cc2", - "type": "github" - }, - "original": { - "owner": "haskell", - "repo": "haskell-language-server", - "type": "github" - } - }, "haskell-nix": { "inputs": { "HTTP": "HTTP", @@ -280,7 +263,6 @@ "hackage": "hackage", "hpc-coveralls": "hpc-coveralls", "hydra": "hydra", - "nix-tools": "nix-tools", "nixpkgs": [ "haskell-nix", "nixpkgs-unstable" @@ -294,11 +276,11 @@ "stackage": "stackage" }, "locked": { - "lastModified": 1662786284, - "narHash": "sha256-4ArqOMoul3PXeIO0BPfARBlJJ4dSYnRZl//cKzVcEww=", + "lastModified": 1665720227, + "narHash": "sha256-/CBSGguDF/AIhrFqRGFN/C8PB/wjWci2RJQueb0Qe8Q=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "20c33afad920746af56329f7a92423c244bfabbe", + "rev": "57cb1649c92e1d4bdbe443effd495ff2aa75277d", "type": "github" }, "original": { @@ -307,40 +289,6 @@ "type": "github" } }, - "hie-bios": { - "flake": false, - "locked": { - "lastModified": 1660060815, - "narHash": "sha256-yVQpvQcEne32X0z2zSRCpWSVcBv23vkUhE9Z8LW3hsk=", - "owner": "wz1000", - "repo": "hie-bios", - "rev": "aa73d3d2eb89df0003d2468a105e326d71b62cc7", - "type": "github" - }, - "original": { - "owner": "wz1000", - "repo": "hie-bios", - "rev": "aa73d3d2eb89df0003d2468a105e326d71b62cc7", - "type": "github" - } - }, - "hiedb": { - "flake": false, - "locked": { - "lastModified": 1661764567, - "narHash": "sha256-ZGcHydKfNNVeoRGQG+0jCrexwn4Gj93neWzNdsgSTkc=", - "owner": "wz1000", - "repo": "hiedb", - "rev": "67b92df2359558091df9102db5b701327308b930", - "type": "github" - }, - "original": { - "owner": "wz1000", - "repo": "hiedb", - "rev": "67b92df2359558091df9102db5b701327308b930", - "type": "github" - } - }, "hpc-coveralls": { "flake": false, "locked": { @@ -396,23 +344,6 @@ "type": "github" } }, - "lsp": { - "flake": false, - "locked": { - "lastModified": 1662291729, - "narHash": "sha256-KlL38v/75G9zrW7+IiUeiCxFfLJGm/EdFeWQRUikab8=", - "owner": "haskell", - "repo": "lsp", - "rev": "b0f8596887088b8ab65fc1015c773f45b47234ae", - "type": "github" - }, - "original": { - "owner": "haskell", - "repo": "lsp", - "rev": "b0f8596887088b8ab65fc1015c773f45b47234ae", - "type": "github" - } - }, "nix": { "inputs": { "lowdown-src": "lowdown-src", @@ -439,36 +370,19 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1662213991, - "narHash": "sha256-oTz2xnMIdVWY7Izgw48zv5iznSXNblTp376MN24oW4s=", - "owner": "hackworthltd", + "lastModified": 1664210064, + "narHash": "sha256-df6nKVZe/yAhmJ9csirTPahc0dldwm3HBhCVNA6qWr0=", + "owner": "LnL7", "repo": "nix-darwin", - "rev": "335e7ba231e5132f824dd31ee9d4f80c5599a4b1", + "rev": "02d2551c927b7d65ded1b3c7cd13da5cc7ae3fcf", "type": "github" }, "original": { - "owner": "hackworthltd", - "ref": "fixes-v18", + "owner": "LnL7", "repo": "nix-darwin", "type": "github" } }, - "nix-tools": { - "flake": false, - "locked": { - "lastModified": 1659569011, - "narHash": "sha256-wHS0H5+TERmDnPCfzH4A+rSR5TvjYMWus9BNeNAMyUM=", - "owner": "input-output-hk", - "repo": "nix-tools", - "rev": "555d57e1ea81b79945f2608aa261df20f6b602a5", - "type": "github" - }, - "original": { - "owner": "input-output-hk", - "repo": "nix-tools", - "type": "github" - } - }, "nixlib": { "locked": { "lastModified": 1636849918, @@ -538,11 +452,11 @@ }, "nixpkgs-2105": { "locked": { - "lastModified": 1655034179, - "narHash": "sha256-rf1/7AbzuYDw6+8Xvvf3PtEOygymLBrFsFxvext5ZjI=", + "lastModified": 1659914493, + "narHash": "sha256-lkA5X3VNMKirvA+SUzvEhfA7XquWLci+CGi505YFAIs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "046ee4af7a9f016a364f8f78eeaa356ba524ac31", + "rev": "022caabb5f2265ad4006c1fa5b1ebe69fb0c3faf", "type": "github" }, "original": { @@ -554,11 +468,11 @@ }, "nixpkgs-2111": { "locked": { - "lastModified": 1656782578, - "narHash": "sha256-1eMCBEqJplPotTo/SZ/t5HU6Sf2I8qKlZi9MX7jv9fw=", + "lastModified": 1659446231, + "narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "573603b7fdb9feb0eb8efc16ee18a015c667ab1b", + "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", "type": "github" }, "original": { @@ -570,11 +484,11 @@ }, "nixpkgs-2205": { "locked": { - "lastModified": 1657876628, - "narHash": "sha256-URmf0O2cQ/3heg2DJOeLyU/JmfVMqG4X5t9crQXMaeY=", + "lastModified": 1663981975, + "narHash": "sha256-TKaxWAVJR+a5JJauKZqibmaM5e/Pi5tBDx9s8fl/kSE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "549d82bdd40f760a438c3c3497c1c61160f3de55", + "rev": "309faedb8338d3ae8ad8f1043b3ccf48c9cc2970", "type": "github" }, "original": { @@ -586,11 +500,11 @@ }, "nixpkgs-22_05": { "locked": { - "lastModified": 1662221733, - "narHash": "sha256-dw1xjYyQ0JidXIpzeQh/gQX+ih1sJO1zBHKs5QSYp8Q=", + "lastModified": 1664201777, + "narHash": "sha256-cUW9DqELUNi1jNMwVSbfq4yl5YGyOfeu+UHUUImbby0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "013e8d86d9a3f33074c903c8ffcab0d34087b1ed", + "rev": "00f877f4927b6f7d7b75731b5a1e2ae7324eaf14", "type": "github" }, "original": { @@ -617,11 +531,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1657888067, - "narHash": "sha256-GnwJoFBTPfW3+mz7QEeJEEQ9OMHZOiIJ/qDhZxrlKh8=", + "lastModified": 1663905476, + "narHash": "sha256-0CSwRKaYravh9v6qSlBpM0gNg0UhKT2lL7Yn6Zbx7UM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "65fae659e31098ca4ac825a6fef26d890aaf3f4e", + "rev": "e14f9fb57315f0d4abde222364f19f88c77d2b79", "type": "github" }, "original": { @@ -633,11 +547,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1662096612, - "narHash": "sha256-R+Q8l5JuyJryRPdiIaYpO5O3A55rT+/pItBrKcy7LM4=", + "lastModified": 1664435807, + "narHash": "sha256-sYOAzHDloPQH48Nmp2hFf7mvVRv+AOlfQXNaCeBTykE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "21de2b973f9fee595a7a1ac4693efff791245c34", + "rev": "8ba120420fbdd9bd35b3a5366fa0206d8c99ade3", "type": "github" }, "original": { @@ -691,11 +605,11 @@ ] }, "locked": { - "lastModified": 1660830093, - "narHash": "sha256-HUhx3a82C7bgp2REdGFeHJdhEAzMGCk3V8xIvfBqg1I=", + "lastModified": 1663082609, + "narHash": "sha256-lmCCIu4dj59qbzkGKHQtolhpIEQMeAd2XUbXVPqgPYo=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "8cb8ea5f1c7bc2984f460587fddd5f2e558f6eb8", + "rev": "60cad1a326df17a8c6cf2bb23436609fdd83024e", "type": "github" }, "original": { @@ -714,11 +628,11 @@ ] }, "locked": { - "lastModified": 1660830093, - "narHash": "sha256-HUhx3a82C7bgp2REdGFeHJdhEAzMGCk3V8xIvfBqg1I=", + "lastModified": 1665584211, + "narHash": "sha256-Qc9zn43UjLpP823BP416hAsoaXugwWw+nKPVqsNhqdY=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "8cb8ea5f1c7bc2984f460587fddd5f2e558f6eb8", + "rev": "94b0f300dd9a23d4e851aa2a947a1511d3410e2d", "type": "github" }, "original": { @@ -732,11 +646,7 @@ "flake-compat": "flake-compat", "flake-utils": "flake-utils", "hacknix": "hacknix", - "haskell-language-server": "haskell-language-server", "haskell-nix": "haskell-nix", - "hie-bios": "hie-bios", - "hiedb": "hiedb", - "lsp": "lsp", "nixpkgs": [ "haskell-nix", "nixpkgs-unstable" @@ -753,11 +663,11 @@ "nixpkgs-22_05": "nixpkgs-22_05" }, "locked": { - "lastModified": 1662390490, - "narHash": "sha256-HnFHRFu0eoB0tLOZRjLgVfHzK+4bQzAmAmHSzOquuyI=", + "lastModified": 1664204020, + "narHash": "sha256-LAey3hr8b9EAt3n304Wt9Vm4uQFd8pSRtLX8leuYFDs=", "owner": "Mic92", "repo": "sops-nix", - "rev": "044ccfe24b349859cd9efc943e4465cc993ac84e", + "rev": "912f9ff41fd9353dec1f783170793699789fe9aa", "type": "github" }, "original": { @@ -769,11 +679,11 @@ "stackage": { "flake": false, "locked": { - "lastModified": 1662772551, - "narHash": "sha256-nv6u7nG2ep+BTGaOluEv/UY+Q8byCGPEHit5PvVI85U=", + "lastModified": 1665537461, + "narHash": "sha256-60tLFJ0poKp3IIPMvIDx3yzmjwrX7CngypfCQqV+oXE=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "f723a28a9dc39f10782338e0431fc2be578c3f3c", + "rev": "fbf47f75f32aedcdd97143ec59c578f403fae35f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 1c9dd71da..f1ed85248 100644 --- a/flake.nix +++ b/flake.nix @@ -18,18 +18,6 @@ pre-commit-hooks-nix.inputs.nixpkgs.follows = "nixpkgs"; # Fixes aarch64-darwin support. pre-commit-hooks-nix.inputs.flake-utils.follows = "flake-utils"; - - # Temporary workaround for HLS issues until the next release. - haskell-language-server.url = github:haskell/haskell-language-server; - haskell-language-server.flake = false; - - # Temporary fixes for HLS. - hiedb.url = github:wz1000/hiedb/67b92df2359558091df9102db5b701327308b930; - hiedb.flake = false; - hie-bios.url = github:wz1000/hie-bios/aa73d3d2eb89df0003d2468a105e326d71b62cc7; - hie-bios.flake = false; - lsp.url = github:haskell/lsp/b0f8596887088b8ab65fc1015c773f45b47234ae; - lsp.flake = false; }; outputs = @@ -39,7 +27,6 @@ , hacknix , flake-utils , pre-commit-hooks-nix - , haskell-language-server , ... }@inputs: let @@ -60,57 +47,6 @@ in builtins.trace "Nix Primer version is ${v}" "git-${v}"; - # Workaround for https://github.com/input-output-hk/haskell.nix/issues/1177. - exceptionsWorkaround = version: { - inherit version; - modules = [ - ({ lib, ... }: { - reinstallableLibGhc = true; - }) - ]; - }; - - # https://github.com/input-output-hk/haskell.nix/issues/1177 - nonReinstallablePkgs = [ - "rts" - "ghc-heap" - "ghc-prim" - "integer-gmp" - "integer-simple" - "base" - "deepseq" - "array" - "ghc-boot-th" - "pretty" - "template-haskell" - "ghc-bignum" - "exceptions" - "stm" - "ghc-boot" - "ghc" - "Cabal" - "Win32" - "array" - "binary" - "bytestring" - "containers" - "directory" - "filepath" - "ghc-boot" - "ghc-compact" - "ghc-prim" - "hpc" - "mtl" - "parsec" - "process" - "text" - "time" - "transformers" - "unix" - "xhtml" - "terminfo" - ]; - ghcVersion = "ghc924"; # We must keep the weeder version in sync with the version of @@ -156,31 +92,10 @@ inherit version; }); - # Temporary workaround for HLS issues until the next release. - hls = (final.haskell-nix.cabalProject' { - compiler-nix-name = ghcVersion; - src = haskell-language-server; - sha256map."https://github.com/pepeiborra/ekg-json"."7a0af7a8fd38045fd15fb13445bdcc7085325460" = "fVwKxGgM0S4Kv/4egVAAiAjV7QB5PBqMVMCfsv7otIQ="; - - modules = [ - { - inherit nonReinstallablePkgs; - } - ]; - - # Temporary fixes for HLS's git pins. - inputMap."https://github.com/wz1000/hiedb" = inputs.hiedb; - inputMap."https://github.com/wz1000/hie-bios" = inputs.hie-bios; - inputMap."https://github.com/haskell/lsp" = inputs.lsp; - }).hsPkgs.haskell-language-server.components.exes.haskell-language-server; - primer = final.haskell-nix.cabalProject { compiler-nix-name = ghcVersion; src = ./.; modules = [ - { - inherit nonReinstallablePkgs; - } { # We want -Werror for Nix builds (primarily for CI). packages = @@ -270,13 +185,11 @@ tools = { ghcid = "latest"; - - # Temporary workaround for HLS issues until the next release. - #haskell-language-server = "latest"; + haskell-language-server = "latest"; cabal = "latest"; - hlint = exceptionsWorkaround "latest"; - weeder = exceptionsWorkaround weederVersion; + hlint = "latest"; + weeder = weederVersion; fourmolu = fourmoluVersion; @@ -289,9 +202,6 @@ }; buildInputs = (with final; [ - # Temporary workaround for HLS issues until the next release. - hls - nixpkgs-fmt postgresql openapi-generator-cli @@ -449,7 +359,6 @@ inherit primer-service-docker-image; inherit (ghc8107Tools) cabal-edit cabal-fmt; - inherit hls; } ) ]; @@ -477,7 +386,7 @@ weeder = let - weederTool = pkgs.haskell-nix.tool ghcVersion "weeder" (exceptionsWorkaround weederVersion); + weederTool = pkgs.haskell-nix.tool ghcVersion "weeder" weederVersion; getLibHIE = package: pkgs.lib.optional (package.components ? library) { name = "${package.identifier.name}-library"; path = package.components.library.hie; }; @@ -519,7 +428,7 @@ # Override the default nix-pre-commit-hooks tools with the version # we're using. haskellNixTools = pkgs.haskell-nix.tools ghcVersion { - hlint = exceptionsWorkaround "latest"; + hlint = "latest"; fourmolu = fourmoluVersion; # Not yet working with GHC 9.2.2. @@ -700,30 +609,31 @@ checks.x86_64-linux checks.aarch64-linux checks.aarch64-darwin - tests.x86_64-linux - tests.aarch64-linux + # tests.x86_64-linux + # tests.aarch64-linux devShell ]); meta.description = "Required CI builds"; }; } - // forAllTestSystems (system: { - tests = - let - pkgs = pkgsFor system; - in - (hacknix.lib.testing.nixos.importFromDirectory ./nixos-tests - { - inherit system pkgs; - } - { - inherit (pkgs) primer-service-docker-image; - inherit (pkgs) primer-sqitch pg_prove primer-pgtap-tests; - inherit (pkgs.lib.primer) defaultServicePort; - inherit version; - }); - }); + # // forAllTestSystems (system: { + # tests = + # let + # pkgs = pkgsFor system; + # in + # (hacknix.lib.testing.nixos.importFromDirectory ./nixos-tests + # { + # inherit system pkgs; + # } + # { + # inherit (pkgs) primer-service-docker-image; + # inherit (pkgs) primer-sqitch pg_prove primer-pgtap-tests; + # inherit (pkgs.lib.primer) defaultServicePort; + # inherit version; + # }); + # }) + ; ciJobs = hacknix.lib.flakes.recurseIntoHydraJobs self.hydraJobs; };