summary refs log tree commit diff
path: root/pkgs/development/haskell-modules
diff options
context:
space:
mode:
authorsternenseemann <sternenseemann@systemli.org>2022-03-30 18:39:05 +0200
committersternenseemann <sternenseemann@systemli.org>2022-03-30 18:39:05 +0200
commitb0d3044823591c4947a82cd43f0d3e17b3abece4 (patch)
treea6dd48c5269ed10fd13c544d45c06792788a292d /pkgs/development/haskell-modules
parent01c08ff8bfd5737a03ded559c4653effcbbea1eb (diff)
downloadnixpkgs-b0d3044823591c4947a82cd43f0d3e17b3abece4.tar
nixpkgs-b0d3044823591c4947a82cd43f0d3e17b3abece4.tar.gz
nixpkgs-b0d3044823591c4947a82cd43f0d3e17b3abece4.tar.bz2
nixpkgs-b0d3044823591c4947a82cd43f0d3e17b3abece4.tar.lz
nixpkgs-b0d3044823591c4947a82cd43f0d3e17b3abece4.tar.xz
nixpkgs-b0d3044823591c4947a82cd43f0d3e17b3abece4.tar.zst
nixpkgs-b0d3044823591c4947a82cd43f0d3e17b3abece4.zip
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
Diffstat (limited to 'pkgs/development/haskell-modules')
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix4
1 files 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 {