From 7deab629b5579ea700ba7a9b8fbb42d6e1609aa8 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 27 Jun 2022 22:17:14 +0200 Subject: [PATCH 1/9] dev: Support newer lorri --- flake.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flake.nix b/flake.nix index 30619539..5737fe24 100644 --- a/flake.nix +++ b/flake.nix @@ -315,6 +315,7 @@ pkgs.nixpkgs-fmt # pkgs.haskell.packages.ghc8107.stack pkgs.haskellPackages.stack + pkgs.pre-commit # pkgs.valgrind (broken on x86_64-darwin) ] ++ lib.optionals shellWithHaskell [ haskellPackages.haskell-language-server @@ -323,7 +324,9 @@ ]; shellHook = '' ${o.shellHook or ""} + if [[ -z "''${IN_LORRI_SHELL:-}" ]]; then ${config.pre-commit.installationScript} + fi ''; }); in From 7436c8b69224068a8b8bef377f5c8a9c0f82ba04 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 12 Jul 2022 12:22:47 +0200 Subject: [PATCH 2/9] hercules-ci-cnix-store: Allow build with Nix 2.10 --- hercules-ci-cnix-store/hercules-ci-cnix-store.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hercules-ci-cnix-store/hercules-ci-cnix-store.cabal b/hercules-ci-cnix-store/hercules-ci-cnix-store.cabal index 6a884108..86eb8b3c 100644 --- a/hercules-ci-cnix-store/hercules-ci-cnix-store.cabal +++ b/hercules-ci-cnix-store/hercules-ci-cnix-store.cabal @@ -76,8 +76,8 @@ library include-dirs: include pkgconfig-depends: - nix-store >= 2.4 && < 2.10 - , nix-main >= 2.4 && < 2.10 + nix-store >= 2.4 && < 2.11 + , nix-main >= 2.4 && < 2.11 install-includes: hercules-ci-cnix/store.hxx hs-source-dirs: src From dd0adf28cab70b342c7feb50352635c334cf50b3 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 21 Jul 2022 08:19:43 +0200 Subject: [PATCH 3/9] hercules-ci-agent: Note Nix 2.10 support in changelog --- hercules-ci-agent/CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hercules-ci-agent/CHANGELOG.md b/hercules-ci-agent/CHANGELOG.md index 45ee8351..46464a39 100644 --- a/hercules-ci-agent/CHANGELOG.md +++ b/hercules-ci-agent/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + + - Nix 2.10 support + ## [0.9.6] - 2022-06-21 ### Added From e8e1177df2999eb02455dd95b99be302730ee891 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 12 Jul 2022 12:25:23 +0200 Subject: [PATCH 4/9] dev: Work around macro missing in IDE --- .../Hercules/Agent/Worker/Build/Prefetched.hs | 3 +++ hercules-ci-cnix-expr/src/Hercules/CNix/Expr.hs | 3 +++ hercules-ci-cnix-store/src/Hercules/CNix/Store.hs | 3 +++ 3 files changed, 9 insertions(+) diff --git a/hercules-ci-agent/hercules-ci-agent-worker/Hercules/Agent/Worker/Build/Prefetched.hs b/hercules-ci-agent/hercules-ci-agent-worker/Hercules/Agent/Worker/Build/Prefetched.hs index 0d3679df..39691e29 100644 --- a/hercules-ci-agent/hercules-ci-agent-worker/Hercules/Agent/Worker/Build/Prefetched.hs +++ b/hercules-ci-agent/hercules-ci-agent-worker/Hercules/Agent/Worker/Build/Prefetched.hs @@ -1,6 +1,9 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} +#ifdef __GHCIDE__ +# define NIX_IS_AT_LEAST(mm,m,p) 1 +#endif -- This implements an optimized routine to build from a remote derivation. -- It is not in the "CNix" tree because it seems to be too specific for general use. diff --git a/hercules-ci-cnix-expr/src/Hercules/CNix/Expr.hs b/hercules-ci-cnix-expr/src/Hercules/CNix/Expr.hs index 7ac79169..406f6aab 100644 --- a/hercules-ci-cnix-expr/src/Hercules/CNix/Expr.hs +++ b/hercules-ci-cnix-expr/src/Hercules/CNix/Expr.hs @@ -8,6 +8,9 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} +#ifdef __GHCIDE__ +# define NIX_IS_AT_LEAST(mm,m,p) 1 +#endif module Hercules.CNix.Expr ( init, diff --git a/hercules-ci-cnix-store/src/Hercules/CNix/Store.hs b/hercules-ci-cnix-store/src/Hercules/CNix/Store.hs index 0519a013..73440df2 100644 --- a/hercules-ci-cnix-store/src/Hercules/CNix/Store.hs +++ b/hercules-ci-cnix-store/src/Hercules/CNix/Store.hs @@ -4,6 +4,9 @@ {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} +#ifdef __GHCIDE__ +# define NIX_IS_AT_LEAST(mm,m,p) 1 +#endif module Hercules.CNix.Store ( module Hercules.CNix.Store, From 4af4ef199d48ac9b6720ccbd0e61a6f7a3d00f26 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 12 Jul 2022 12:27:00 +0200 Subject: [PATCH 5/9] dev: Use shellFor.extraDependencies (cleanup) --- nix/shellFor-cabal.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nix/shellFor-cabal.nix b/nix/shellFor-cabal.nix index ba1fca5e..161f0989 100644 --- a/nix/shellFor-cabal.nix +++ b/nix/shellFor-cabal.nix @@ -21,10 +21,8 @@ haskellPackages.shellFor { # not to confuse the stack repl + hie-bios + hls setup. # p.hercules-ci-cnix-store # p.cachix - - # TODO: https://github.com/NixOS/nixpkgs/pull/164305 - { getCabalDeps.libraryHaskellDepends = [ haskellPackages.releaser ]; outPath = "/nix/store/shellFor-cabal-dummy-out-path"; } ]; + extraDependencies = p: { libraryHaskellDepends = [ p.releaser ]; }; buildInputs = [ pkgs.boost pkgs.nlohmann_json # FIXME remove From 1a3a251b9f6810646524bd17353006ddcc558504 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 20 Jul 2022 23:29:42 +0200 Subject: [PATCH 6/9] Update nixpkgs --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index a9e0c1bd..1a85909a 100644 --- a/flake.lock +++ b/flake.lock @@ -57,11 +57,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1655567057, - "narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=", + "lastModified": 1658161305, + "narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e0a42267f73ea52adc061a64650fddc59906fc99", + "rev": "e4d49de45a3b5dbcb881656b4e3986e666141ea9", "type": "github" }, "original": { From 09e80b7ac72333567252d5a4a48fa02ea0f493f4 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 21 Jul 2022 07:52:14 +0200 Subject: [PATCH 7/9] dev: Remove unused fourmolu from HLS --- nix/packages.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nix/packages.nix b/nix/packages.nix index 467c3c5c..d23de555 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -213,6 +213,13 @@ let rio = haskell.lib.dontCheck super.rio; hie-bios = haskell.lib.compose.appendPatch ./hie-bios.patch super.hie-bios; + + # Dodge build failures of components we don't need. + haskell-language-server = haskell.lib.compose.appendConfigureFlags [ "-f-fourmolu" ] ( + super.haskell-language-server.override { + hls-fourmolu-plugin = null; + } + ); } ); From 1641ce0113e543ac0d21584cf7b080a868461722 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 21 Jul 2022 08:15:54 +0200 Subject: [PATCH 8/9] Remove nix_2_7 variants --- flake.nix | 5 ----- hercules-ci-agent/CHANGELOG.md | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 5737fe24..dc11811b 100644 --- a/flake.nix +++ b/flake.nix @@ -273,8 +273,6 @@ packages.hercules-ci-agent = pkgs.hercules-ci-agent; # packages.hercules-ci-agent-nixUnstable = config.variants.nixUnstable.packages.hercules-ci-agent; # packages.hercules-ci-cli-nixUnstable = config.variants.nixUnstable.packages.hercules-ci-cli; - packages.hercules-ci-agent-nix_2_7 = config.variants.nix_2_7.packages.hercules-ci-agent; - packages.hercules-ci-cli-nix_2_7 = config.variants.nix_2_7.packages.hercules-ci-cli; pre-commit.pkgs = pkgs; pre-commit.settings = { hooks = { @@ -369,9 +367,6 @@ # variants.nixUnstable.extraOverlay = final: prev: { # nix = addDebug inputs.nix.defaultPackage.${prev.stdenv.hostPlatform.system}; # }; - variants.nix_2_7.extraOverlay = final: prev: { - nix = addDebug prev.nixVersions.nix_2_7; - }; }; options = { # Set by variants diff --git a/hercules-ci-agent/CHANGELOG.md b/hercules-ci-agent/CHANGELOG.md index 46464a39..7109903f 100644 --- a/hercules-ci-agent/CHANGELOG.md +++ b/hercules-ci-agent/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Nix 2.10 support +### Removed + + - `-nix_2_7` variants. Nixpkgs has stopped offering older versions of Nix. If + you need an older version, you could inject an older Nixpkgs into this flake + using `hercules-ci-agent.inputs.nixpkgs.follows = ...`. + ## [0.9.6] - 2022-06-21 ### Added From ad9bd4a5768318af5e0877c6f1c3ca131ea604b5 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 21 Jul 2022 08:16:26 +0200 Subject: [PATCH 9/9] doc: Fix changelog typo --- hercules-ci-agent/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hercules-ci-agent/CHANGELOG.md b/hercules-ci-agent/CHANGELOG.md index 7109903f..12e9dd96 100644 --- a/hercules-ci-agent/CHANGELOG.md +++ b/hercules-ci-agent/CHANGELOG.md @@ -41,7 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Workaround for cachix#406 (add `login` to `netrc`) - A crash in `inline-c-cpp` exception handling (`inline-c-cpp` update) - Towards the error "Could not push logs within 10 minutes after completion" - - Add a timeout to prevent in case of a stuck handshake + - Add a timeout to prevent hang in case of a stuck handshake - Enforce log limit on client side as well in case of excessive log spam and an upload bottleneck ### Removed