From 2ce6cdb88feabe48cfb4c16787caa3670c7d4640 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 22 May 2021 00:15:39 +0200 Subject: [PATCH] haskellPackages.sbv_7_13: pin dependency crackNum to < 3.0 3.0 for some removed its library, so we need to retain a version prior to that for building sbv_7_13 (which we need for petrinizer). --- .../haskell-modules/configuration-common.nix | 16 +++++++++------- .../configuration-hackage2nix/main.yaml | 1 + .../haskell-modules/hackage-packages.nix | 18 ++++++++++++++++++ 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 545273bd2d0d..fdc9bebf4382 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1831,13 +1831,15 @@ self: super: { doCheck = pkgs.stdenv.targetPlatform.system == "x86_64-linux"; }; - # Fix build failure by picking patch from 8.5, - # we need this version of sbv for petrinizer - sbv_7_13 = appendPatch super.sbv_7_13 - (pkgs.fetchpatch { - url = "https://github.com/LeventErkok/sbv/commit/57014b9c7c67dd9b63619a996e2c66e32c33c958.patch"; - sha256 = "10npa8nh2413n6p6qld795qfkbld08icm02bspmk93y0kabpgmgm"; - }); + # * Fix build failure by picking patch from 8.5, we need + # this version of sbv for petrinizer + # * Pin version of crackNum that still exposes its library + sbv_7_13 = appendPatch (super.sbv_7_13.override { + crackNum = self.crackNum_2_4; + }) (pkgs.fetchpatch { + url = "https://github.com/LeventErkok/sbv/commit/57014b9c7c67dd9b63619a996e2c66e32c33c958.patch"; + sha256 = "10npa8nh2413n6p6qld795qfkbld08icm02bspmk93y0kabpgmgm"; + }); # Too strict bounds on dimensional # https://github.com/enomsg/science-constants-dimensional/pull/1 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index c4676a5c3b68..ab7648a5acb8 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -114,6 +114,7 @@ extra-packages: - refinery == 0.3.* # required by hls-tactics-plugin-1.0.0.0 - resolv == 0.1.1.2 # required to build cabal-install-3.0.0.0 with pre ghc-8.8.x - sbv == 7.13 # required for pkgs.petrinizer + - crackNum < 3.0 # 2021-05-21: 3.0 removed the lib which sbv 7.13 uses - gi-gdk == 3.0.24 # 2021-05-07: For haskell-gi 0.25 without gtk4 - gi-gtk < 4.0 # 2021-05-07: For haskell-gi 0.25 without gtk4 - gi-gdkx11 == 3.0.11 # 2021-05-07: For haskell-gi 0.25 without gtk4 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index faa5443afd4b..3b241ebb4117 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -64754,6 +64754,24 @@ self: { broken = true; }) {crack = null;}; + "crackNum_2_4" = callPackage + ({ mkDerivation, array, base, FloatingHex }: + mkDerivation { + pname = "crackNum"; + version = "2.4"; + sha256 = "1fa9rlknmilc8rnm7yvmjrbc9jydpvk30gj7lq79nqbifig6229a"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ array base FloatingHex ]; + executableHaskellDepends = [ array base FloatingHex ]; + description = "Crack various integer, floating-point data formats"; + license = lib.licenses.bsd3; + platforms = [ + "armv7l-linux" "i686-linux" "x86_64-darwin" "x86_64-linux" + ]; + hydraPlatforms = lib.platforms.none; + }) {}; + "crackNum" = callPackage ({ mkDerivation, base, directory, filepath, libBF, process, sbv , tasty, tasty-golden