From e6cf0980db2a901aa9ba116e3d5ec00c6929e232 Mon Sep 17 00:00:00 2001 From: sternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org> Date: Sat, 5 Jun 2021 01:05:49 +0200 Subject: [PATCH] haskellPackages.diagrams-lib: pin to < 1.4.4 While diagrams-lib 1.4.4 doesn't per se require us to update any diagrams lib to 1.5.0 it would require monoid-extras 0.6 which would force us to update diagrams-core to 1.5.0, thus breaking haskellPackages.diagrams. Since we can just keep the patch we fetch and downgrade to 1.4.3, we can continue sitting out the slow update cycle of the diagrams universe. --- .../haskell-modules/configuration-common.nix | 2 ++ .../configuration-hackage2nix/main.yaml | 1 + .../haskell-modules/hackage-packages.nix | 34 +++++++++++++++++++ 3 files changed, 37 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index d4a51216dc68..f0c275c32fc6 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -715,6 +715,8 @@ self: super: { diagrams-svg = doJailbreak super.diagrams-svg; diagrams-contrib = doJailbreak super.diagrams-contrib; # Apply patch from master to add compat with optparse-applicative >= 0.16. + # We unfortunately can't upgrade to 1.4.4 which includes this patch yet + # since it would require monoid-extras 0.6 which breaks other diagrams libs. diagrams-lib = doJailbreak (appendPatch super.diagrams-lib (pkgs.fetchpatch { url = "https://github.com/diagrams/diagrams-lib/commit/4b9842c3e3d653be69af19778970337775e2404d.patch"; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 3680c0446820..3cdb1b4b7dd7 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -84,6 +84,7 @@ default-package-overrides: # We can keep this pin at most until base 4.15 - monoid-extras < 0.6 - diagrams-core < 1.5.0 + - diagrams-lib < 1.4.4 # 2021-05-11: Pin for hls 1.1.0 - ghcide == 1.2.* - hls-plugin-api == 1.1.0.0 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index ff8e55e51f89..c10984beff3c 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -74425,6 +74425,39 @@ self: { }) {}; "diagrams-lib" = callPackage + ({ mkDerivation, active, adjunctions, array, base, bytestring + , cereal, colour, containers, criterion, data-default-class + , deepseq, diagrams-core, diagrams-solve, directory, distributive + , dual-tree, exceptions, filepath, fingertree, fsnotify, hashable + , intervals, JuicyPixels, lens, linear, monoid-extras, mtl + , numeric-extras, optparse-applicative, process, profunctors + , QuickCheck, semigroups, tagged, tasty, tasty-hunit + , tasty-quickcheck, text, transformers, unordered-containers + }: + mkDerivation { + pname = "diagrams-lib"; + version = "1.4.3"; + sha256 = "0gqrcyjyp3p78vmfxvhfjbkkl2xvwcv3qyyinbdcmalb5zb8vyy6"; + revision = "1"; + editedCabalFile = "0cqhqm2nz2ls00pfhx8hz6z6g17qhl380h24wp4d6l5msiw7gxq4"; + libraryHaskellDepends = [ + active adjunctions array base bytestring cereal colour containers + data-default-class diagrams-core diagrams-solve directory + distributive dual-tree exceptions filepath fingertree fsnotify + hashable intervals JuicyPixels lens linear monoid-extras mtl + optparse-applicative process profunctors semigroups tagged text + transformers unordered-containers + ]; + testHaskellDepends = [ + base deepseq diagrams-solve distributive lens numeric-extras + QuickCheck tasty tasty-hunit tasty-quickcheck + ]; + benchmarkHaskellDepends = [ base criterion diagrams-core ]; + description = "Embedded domain-specific language for declarative graphics"; + license = lib.licenses.bsd3; + }) {}; + + "diagrams-lib_1_4_4" = callPackage ({ mkDerivation, active, adjunctions, array, base, bytestring , cereal, colour, containers, criterion, data-default-class , deepseq, diagrams-core, diagrams-solve, directory, distributive @@ -74453,6 +74486,7 @@ self: { benchmarkHaskellDepends = [ base criterion diagrams-core ]; description = "Embedded domain-specific language for declarative graphics"; license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; }) {}; "diagrams-pandoc" = callPackage