From 44da7759f62059885c04b5a34ff57c0ae86bbec6 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 3 Apr 2022 22:02:42 +0200 Subject: [PATCH 1/6] nixpkgs: haskell-updates 2022-03-16 -> master --- flake.lock | 11 +++++------ flake.nix | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 90bcb9b5..db557f30 100644 --- a/flake.lock +++ b/flake.lock @@ -71,16 +71,15 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1647445921, - "narHash": "sha256-lNPvVxLLSN6V9nbEzh1XJpusI4W1M1QHBQVEVqkg1+Q=", - "owner": "hercules-ci", + "lastModified": 1649014612, + "narHash": "sha256-gJBss4NDhyH21tywYduTxnhbmyJj0C6RBD/8Ze2ABzQ=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "70e6eb9ec8d548b836f8dedbf63d86a6bd737dc3", + "rev": "1ddbc47dc7439f50d12e8daabd01efaa78320e39", "type": "github" }, "original": { - "owner": "hercules-ci", - "ref": "haskell-updates-ghc-9.0-stack", + "owner": "NixOS", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 2cafd06c..d3bcd178 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,7 @@ { 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; From d615f5262abe86dd5c6f1a06f3003f081e766de8 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 3 Apr 2022 22:06:21 +0200 Subject: [PATCH 2/6] Hardcode flake-compat for smaller user lockfiles --- flake.nix | 2 -- nix/flake-compat.nix | 9 +++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index d3bcd178..b6ee0e39 100644 --- a/flake.nix +++ b/flake.nix @@ -3,8 +3,6 @@ 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"; diff --git a/nix/flake-compat.nix b/nix/flake-compat.nix index c8044b37..b6dcbaa3 100644 --- a/nix/flake-compat.nix +++ b/nix/flake-compat.nix @@ -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; From 294bd49d75c982cf3cacea6b16d7a56f8710132a Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 3 Apr 2022 22:09:22 +0200 Subject: [PATCH 3/6] Update nix-darwin (test dep), recreate lock file --- flake.lock | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/flake.lock b/flake.lock index db557f30..46af7191 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1641205782, - "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-modules-core": { "inputs": { "nixpkgs": [ @@ -56,11 +40,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1647173930, - "narHash": "sha256-8oca3Pc68VrCp8HeOtHmzs5g0rdQnPO9beDEEZJ02W0=", + "lastModified": 1648278671, + "narHash": "sha256-1WrR9ex+rKTjZtODNUZQhkWYUprtfOkjOyo9YWL2NMs=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "17fbc68a6110edbff67e55f7450230a697ecb17e", + "rev": "4fdbb8168f61d31d3f90bb0d07f48de709c4fe79", "type": "github" }, "original": { @@ -134,7 +118,6 @@ }, "root": { "inputs": { - "flake-compat": "flake-compat", "flake-modules-core": "flake-modules-core", "nix-darwin": "nix-darwin", "nixos-unstable": "nixos-unstable", From c1d189634eb41dd2d9de00e3d8ebbf4a46dca7d1 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 8 Apr 2022 13:50:26 +0200 Subject: [PATCH 4/6] nixpkgs: update --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 46af7191..084bf1c4 100644 --- a/flake.lock +++ b/flake.lock @@ -55,11 +55,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1649014612, - "narHash": "sha256-gJBss4NDhyH21tywYduTxnhbmyJj0C6RBD/8Ze2ABzQ=", + "lastModified": 1649417654, + "narHash": "sha256-IKC+25OiNIGPIGs0iBg/gx1lrGR4N5MGe5x+sGi7vzw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1ddbc47dc7439f50d12e8daabd01efaa78320e39", + "rev": "5df8b35e4f4074bd8b77eed10b267b6e5d029d6c", "type": "github" }, "original": { From 389e6f296d8de1d19bf09574b441299db45d8653 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 8 Apr 2022 13:51:12 +0200 Subject: [PATCH 5/6] Add -fcompact-unwind on darwin --- nix/packages.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/nix/packages.nix b/nix/packages.nix index 1582a832..1e79c7c5 100644 --- a/nix/packages.nix +++ b/nix/packages.nix @@ -17,6 +17,7 @@ let addBuildTool addSetupDepends allowInconsistentDependencies + appendConfigureFlags appendPatch disableLibraryProfiling enableDWARFDebugging @@ -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; @@ -85,7 +91,9 @@ let overrideCabal ( addBuildDepends - (enableDWARFDebugging basePkg) + (enableDWARFDebugging + (addCompactUnwind basePkg) + ) [ pkgs.makeWrapper pkgs.boost ] ) ( @@ -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; + } + ) ) ) ) From 8c1ce54bf8280dbb6de712a3730fdfdda108488a Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 8 Apr 2022 16:13:45 +0200 Subject: [PATCH 6/6] Disable builds affected by nixpkgs#167879 --- flake.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flake.nix b/flake.nix index b6ee0e39..ec97c4c9 100644 --- a/flake.nix +++ b/flake.nix @@ -14,6 +14,7 @@ , ... }: let + inherit (nixos-unstable.legacyPackages.x86_64-linux) emptyFile; debug = false; ifDebug = f: if debug then f else x: x; @@ -223,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