From b0d3044823591c4947a82cd43f0d3e17b3abece4 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 30 Mar 2022 18:39:05 +0200 Subject: [PATCH] haskellPackages.graphql: convert assert on hspec into warning We should only make use of asserts to assert a property about the *current* attribute in order to make it possible for downstream users to change versions of packages: When a downstream user changes the package an attribute points to, the assert is removed as the attribute is swapped out, so asserting something about itself is okay. However, when it asserts a property about another package, changing that other package may break the package unexpectedly, with no better workaround then passing in an empty `configurationCommon` overlay. See also: https://github.com/NixOS/nixpkgs/pull/166425 --- pkgs/development/haskell-modules/configuration-common.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 1d92ee361f2..dfa47f2a82c 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2240,11 +2240,11 @@ self: super: { # Release 1.0.0.0 added version bounds (was unrestricted before), # but with too strict lower bounds for our lts-18. # Disable aeson for now, future release should support it - graphql = assert versionOlder self.hspec.version "2.9.0"; + graphql = assert super.graphql.version == "1.0.2.0"; appendConfigureFlags [ "-f-json" - ] (doJailbreak super.graphql); + ] (lib.warnIf (lib.versionAtLeast self.hspec.version "2.9.0") "@NixOS/haskell: Remove jailbreak for graphql" doJailbreak super.graphql); # https://github.com/ajscholl/basic-cpuid/pull/1 basic-cpuid = appendPatch (fetchpatch {