From 926a9d90cf2168889c4e3fff4d0b28b3878f6dd5 Mon Sep 17 00:00:00 2001 From: Viacheslav Lotsmanov Date: Fri, 29 Jul 2022 03:33:55 +0300 Subject: [PATCH] Pin overridden Haskell dependencies So that applied patches always work --- nix/data-diverse.nix | 16 ++++++++++++++++ nix/proto3-suite.nix | 39 +++++++++++++++++++++++++++++++++++++++ nix/proto3-wire.nix | 21 +++++++++++++++++++++ release.nix | 10 +++++----- 4 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 nix/data-diverse.nix create mode 100644 nix/proto3-suite.nix create mode 100644 nix/proto3-wire.nix diff --git a/nix/data-diverse.nix b/nix/data-diverse.nix new file mode 100644 index 0000000..1681ab8 --- /dev/null +++ b/nix/data-diverse.nix @@ -0,0 +1,16 @@ +{ mkDerivation, base, containers, criterion, deepseq, ghc-prim +, hspec, lib, tagged +}: +mkDerivation { + pname = "data-diverse"; + version = "4.7.0.0"; + sha256 = "sha256-w82WWNWbShoYYtDFvJHgQUb1vxEehGmgUOpq4SZaizE="; + libraryHaskellDepends = [ + base containers deepseq ghc-prim tagged + ]; + testHaskellDepends = [ base hspec tagged ]; + benchmarkHaskellDepends = [ base criterion ]; + homepage = "https://github.com/louispan/data-diverse#readme"; + description = "Extensible records and polymorphic variants"; + license = lib.licenses.bsd3; +} diff --git a/nix/proto3-suite.nix b/nix/proto3-suite.nix new file mode 100644 index 0000000..c2e5ff4 --- /dev/null +++ b/nix/proto3-suite.nix @@ -0,0 +1,39 @@ +{ mkDerivation, aeson, aeson-pretty, attoparsec, base +, base64-bytestring, binary, bytestring, cereal, containers +, contravariant, deepseq, doctest, filepath, foldl +, generic-arbitrary, hashable, haskell-src, hedgehog +, insert-ordered-containers, lens, lib, mtl, neat-interpolation +, optparse-applicative, optparse-generic, parsec, parsers, pretty +, pretty-show, proto3-wire, QuickCheck, quickcheck-instances +, range-set-list, safe, swagger2, system-filepath, tasty +, tasty-hedgehog, tasty-hunit, tasty-quickcheck, text, time +, transformers, turtle, vector +}: +mkDerivation { + pname = "proto3-suite"; + version = "0.5.0"; + sha256 = "sha256-lcm+En6esErjAvfycogkc7ixSXVpjdAz7dTJIIZPwCc="; + isLibrary = true; + isExecutable = true; + enableSeparateDataOutput = true; + libraryHaskellDepends = [ + aeson aeson-pretty attoparsec base base64-bytestring binary + bytestring cereal containers contravariant deepseq filepath foldl + hashable haskell-src insert-ordered-containers lens mtl + neat-interpolation parsec parsers pretty pretty-show proto3-wire + QuickCheck quickcheck-instances safe swagger2 system-filepath text + time transformers turtle vector + ]; + executableHaskellDepends = [ + base containers mtl optparse-applicative optparse-generic + proto3-wire range-set-list system-filepath text turtle + ]; + testHaskellDepends = [ + aeson attoparsec base base64-bytestring bytestring cereal + containers deepseq doctest generic-arbitrary hedgehog mtl + pretty-show proto3-wire QuickCheck swagger2 tasty tasty-hedgehog + tasty-hunit tasty-quickcheck text transformers turtle vector + ]; + description = "A higher-level API to the proto3-wire library"; + license = lib.licenses.asl20; +} diff --git a/nix/proto3-wire.nix b/nix/proto3-wire.nix new file mode 100644 index 0000000..ab6c3a6 --- /dev/null +++ b/nix/proto3-wire.nix @@ -0,0 +1,21 @@ +{ mkDerivation, base, bytestring, cereal, containers, deepseq +, doctest, ghc-prim, hashable, lib, parameterized, primitive +, QuickCheck, safe, tasty, tasty-hunit, tasty-quickcheck, text +, transformers, unordered-containers, vector +}: +mkDerivation { + pname = "proto3-wire"; + version = "1.2.2"; + sha256 = "sha256-jUCVNqiaAYfwV2cRlm0u9F1DrKt7ajocXuEvbQGtv7k="; + libraryHaskellDepends = [ + base bytestring cereal containers deepseq ghc-prim hashable + parameterized primitive QuickCheck safe text transformers + unordered-containers vector + ]; + testHaskellDepends = [ + base bytestring cereal doctest QuickCheck tasty tasty-hunit + tasty-quickcheck text transformers vector + ]; + description = "A low-level implementation of the Protocol Buffers (version 3) wire format"; + license = lib.licenses.asl20; +} diff --git a/release.nix b/release.nix index d039b6b..571bdfd 100644 --- a/release.nix +++ b/release.nix @@ -227,7 +227,7 @@ let hsPkgsOverridden = pkgs: pkgs.haskellPackages.extend (self: super: { data-diverse = - pkgs.lib.pipe super.data-diverse [ + pkgs.lib.pipe (self.callPackage nix/data-diverse.nix {}) [ # Patch for GHC 9.x support (hsAddPatch pkgs (pkgs.fetchpatch { url = "https://github.com/louispan/data-diverse/commit/4033c90c44dab5824f76d64b7128bb6dea2b5dc7.patch"; @@ -239,13 +239,13 @@ let ]; proto3-wire = - pkgs.lib.pipe super.proto3-wire [ - (hsAddPatch pkgs ./nix/proto3-wire.patch) + pkgs.lib.pipe (self.callPackage nix/proto3-wire.nix {}) [ + (hsAddPatch pkgs nix/proto3-wire.patch) ]; proto3-suite = - pkgs.lib.pipe super.proto3-suite [ - (hsAddPatch pkgs ./nix/proto3-suite.patch) + pkgs.lib.pipe (self.callPackage nix/proto3-suite.nix {}) [ + (hsAddPatch pkgs nix/proto3-suite.patch) pkgs.haskell.lib.dontCheck # 4 out of 74 tests failed ]; });