Skip to content

Commit

Permalink
Merge pull request #440 from hercules-ci/nix-2.10
Browse files Browse the repository at this point in the history
Nix 2.10
  • Loading branch information
roberth authored Jul 21, 2022
2 parents 184d39f + ad9bd4a commit 9f042ce
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 14 deletions.
6 changes: 3 additions & 3 deletions flake.lock

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

8 changes: 3 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -315,6 +313,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
Expand All @@ -323,7 +322,9 @@
];
shellHook = ''
${o.shellHook or ""}
if [[ -z "''${IN_LORRI_SHELL:-}" ]]; then
${config.pre-commit.installationScript}
fi
'';
});
in
Expand Down Expand Up @@ -366,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
Expand Down
14 changes: 13 additions & 1 deletion hercules-ci-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ 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

### 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
Expand All @@ -29,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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 3 additions & 0 deletions hercules-ci-cnix-expr/src/Hercules/CNix/Expr.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions hercules-ci-cnix-store/hercules-ci-cnix-store.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions hercules-ci-cnix-store/src/Hercules/CNix/Store.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions nix/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
);
}
);

Expand Down
4 changes: 1 addition & 3 deletions nix/shellFor-cabal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f042ce

Please sign in to comment.