From 851097b5f2e55125a7a02d09b2b46f2f49debb41 Mon Sep 17 00:00:00 2001 From: Samuel Balco Date: Fri, 9 Feb 2024 16:26:43 +0000 Subject: [PATCH] Warn when nixpkgs from haskell and llvm backends diverge (#3971) --- flake.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index e1f34a98e90..7e0e55c4f21 100644 --- a/flake.nix +++ b/flake.nix @@ -95,16 +95,18 @@ "aarch64-darwin" ] (system: let - pkgs = import nixpkgs { - inherit system; - - # Temporarily required until a bug on pyOpenSSL is resolved for aarch64-darwin - # https://github.com/NixOS/nixpkgs/pull/172397 - config.allowBroken = system == "aarch64-darwin"; - overlays = - [ (final: prev: { llvm-backend-build-type = "FastBuild"; }) ] - ++ allOverlays; - }; + pkgs = nixpkgs.lib.trivial.warnIf (llvm-backend.inputs.nixpkgs.rev + != haskell-backend.inputs.nixpkgs.rev) + "The version of nixpkgs in Haskell backend and LLVM backend has diverged!" + import nixpkgs { + inherit system; + # Temporarily required until a bug on pyOpenSSL is resolved for aarch64-darwin + # https://github.com/NixOS/nixpkgs/pull/172397 + config.allowBroken = system == "aarch64-darwin"; + overlays = + [ (final: prev: { llvm-backend-build-type = "FastBuild"; }) ] + ++ allOverlays; + }; haskell-backend-bins = pkgs.symlinkJoin { name = "kore-${haskell-backend.sourceInfo.shortRev or "local"}";