Skip to content

Commit

Permalink
Merge pull request #412 from hercules-ci/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
roberth authored Apr 8, 2022
2 parents fc94c45 + 8c1ce54 commit e820ebd
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 35 deletions.
34 changes: 8 additions & 26 deletions flake.lock

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

12 changes: 9 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
description = "Hercules CI Agent";

inputs.nixos-unstable.url = "github:hercules-ci/nixpkgs/haskell-updates-ghc-9.0-stack";
inputs.nixos-unstable.url = "github:NixOS/nixpkgs";
inputs.nix-darwin.url = "github:LnL7/nix-darwin"; # test only
inputs.flake-compat.url = "github:edolstra/flake-compat";
inputs.flake-compat.flake = false;
inputs.pre-commit-hooks-nix.url = "github:hercules-ci/pre-commit-hooks.nix/flakeModule";
inputs.flake-modules-core.url = "github:hercules-ci/flake-modules-core";
inputs.flake-modules-core.inputs.nixpkgs.follows = "nixos-unstable";
Expand All @@ -16,6 +14,7 @@
, ...
}:
let
inherit (nixos-unstable.legacyPackages.x86_64-linux) emptyFile;
debug = false;
ifDebug = f:
if debug then f else x: x;
Expand Down Expand Up @@ -225,6 +224,13 @@
};
};
};

# Disabled checks

# Error: https://hercules-ci.com/accounts/github/hercules-ci/derivations/%2Fnix%2Fstore%2Fi9x1mv2m95l4y4yzsgb9qgg39m4c9ql7-python3.9-pre-commit-2.18.1.drv/log?via-job=3a8af400-acee-42a1-9fb0-0ae6af20133b
# PR: https://github.com/NixOS/nixpkgs/pull/167879
checks.x86_64-darwin.pre-commit = lib.mkForce emptyFile;
devShell.x86_64-darwin = lib.mkForce emptyFile;
};
perSystem = system: { config, pkgs, ... }:
let
Expand Down
9 changes: 7 additions & 2 deletions nix/flake-compat.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
let
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
inherit (lock.nodes.flake-compat.locked) owner repo rev narHash;
# lock = builtins.fromJSON (builtins.readFile ../flake.lock);
# inherit (lock.nodes.flake-compat.locked) owner repo rev narHash;
owner = "edolstra";
repo = "flake-compat";
rev = "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7";
narHash = "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=";

flake-compat = builtins.fetchTarball {
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
sha256 = narHash;
Expand Down
18 changes: 14 additions & 4 deletions nix/packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ let
addBuildTool
addSetupDepends
allowInconsistentDependencies
appendConfigureFlags
appendPatch
disableLibraryProfiling
enableDWARFDebugging
Expand All @@ -33,6 +34,11 @@ let
then stdPkg
else altPkg;

addCompactUnwind =
if pkgs.stdenv.hostPlatform.isDarwin
then x: appendConfigureFlags x [ "--ghc-option=-fcompact-unwind" ]
else x: x;

internal =
rec {
inherit pkgs;
Expand Down Expand Up @@ -85,7 +91,9 @@ let
overrideCabal
(
addBuildDepends
(enableDWARFDebugging basePkg)
(enableDWARFDebugging
(addCompactUnwind basePkg)
)
[ pkgs.makeWrapper pkgs.boost ]
)
(
Expand Down Expand Up @@ -142,9 +150,11 @@ let
generateOptparseApplicativeCompletion "hci" (
justStaticExecutables (
haskell.lib.disableLibraryProfiling (
callPkg super "hercules-ci-cli" ../hercules-ci-cli {
hercules-ci-agent = self.hercules-ci-agent_lib;
}
addCompactUnwind (
callPkg super "hercules-ci-cli" ../hercules-ci-cli {
hercules-ci-agent = self.hercules-ci-agent_lib;
}
)
)
)
)
Expand Down

0 comments on commit e820ebd

Please sign in to comment.