Skip to content

Commit

Permalink
haskell.packages.ghc822/844: Move version-pinned packages to configur…
Browse files Browse the repository at this point in the history
…ation-ghc
  • Loading branch information
artempyanykh committed Feb 13, 2019
1 parent 646c09f commit e159c83
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 171 deletions.
53 changes: 48 additions & 5 deletions pkgs/development/haskell-modules/configuration-ghc-8.2.x.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, haskellLib }:
{ pkgs, haskellLib, stdenv }:

with haskellLib;

Expand Down Expand Up @@ -44,9 +44,35 @@ self: super: {
text = self.text_1_2_3_1;

# Make sure we can still build Cabal 1.x.
Cabal_1_24_2_0 = overrideCabal super.Cabal_1_24_2_0 (drv: {
prePatch = "sed -i -e 's/process.*< 1.5,/process,/g' Cabal.cabal";
});
Cabal_1_24_2_0 = self.callPackage
({ mkDerivation, array, base, base-compat, base-orphans, binary
, bytestring, containers, deepseq, Diff, directory, filepath
, integer-logarithms, mtl, optparse-applicative, parsec, pretty
, process, QuickCheck, tagged, tar, tasty, tasty-golden
, tasty-hunit, tasty-quickcheck, text, time, transformers
, tree-diff, unix
}:
mkDerivation {
pname = "Cabal";
version = "1.24.2.0";
sha256 = "b7d0eb8e3503fbca460c0a6ca5c88352cecfe1b69e0bbc79827872134ed86340";
setupHaskellDepends = [ mtl parsec ];
libraryHaskellDepends = [
array base binary bytestring containers deepseq directory filepath
mtl parsec pretty process text time transformers unix
];
testHaskellDepends = [
array base base-compat base-orphans bytestring containers deepseq
Diff directory filepath integer-logarithms optparse-applicative
pretty process QuickCheck tagged tar tasty tasty-golden tasty-hunit
tasty-quickcheck text tree-diff
];
doCheck = false;
description = "A framework for packaging Haskell software";
license = stdenv.lib.licenses.bsd3;
hydraPlatforms = stdenv.lib.platforms.none;
prePatch = "sed -i -e 's/process.*< 1.5,/process,/g' Cabal.cabal && sed -i -e 's/time.*< 1.8/time/g' Cabal.cabal";
}) {};

# Build with the latest Cabal version, which works best albeit not perfectly.
jailbreak-cabal = super.jailbreak-cabal.override { Cabal = self.Cabal_2_2_0_1; };
Expand Down Expand Up @@ -90,7 +116,24 @@ self: super: {
cabal2nix = super.cabal2nix.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; });
cabal2spec = super.cabal2spec.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; });
distribution-nixpkgs = super.distribution-nixpkgs.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; });
hackage-db_2_0_1 = super.hackage-db_2_0_1.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; });
hackage-db_2_0_1 = (self.callPackage
({ mkDerivation, aeson, base, bytestring, Cabal, containers
, directory, filepath, tar, time, utf8-string
}:
mkDerivation {
pname = "hackage-db";
version = "2.0.1";
sha256 = "13ggj72i8dxwh3qwznnqxbr00nvsbapyyhzx5zybfacddnpw3aph";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson base bytestring Cabal containers directory filepath tar time
utf8-string
];
description = "Access Hackage's package database via Data.Map";
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ peti ];
}) {}).overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; });
stack = super.stack.overrideScope (self: super: { Cabal = self.Cabal_2_2_0_1; });

# GHC 8.2 doesn't have semigroups included by default
Expand Down
43 changes: 38 additions & 5 deletions pkgs/development/haskell-modules/configuration-ghc-8.4.x.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, haskellLib }:
{ pkgs, haskellLib, stdenv }:

with haskellLib;

Expand Down Expand Up @@ -65,12 +65,45 @@ self: super: {
stack = (doJailbreak super.stack).override {
Cabal = self.Cabal_2_4_1_0;
hpack = self.hpack_0_31_1.override { Cabal = self.Cabal_2_4_1_0; };
yaml = self.yaml_0_11_0_0;
hackage-security = self.hackage-security.override { Cabal = self.Cabal_2_4_1_0; };
};
hpack_0_31_1 = super.hpack_0_31_1.override {
yaml = self.yaml_0_11_0_0;
};
hpack_0_31_1 = self.callPackage
({ mkDerivation, aeson, base, bifunctors, bytestring, Cabal
, containers, cryptonite, deepseq, directory, filepath, Glob, hspec
, hspec-discover, http-client, http-client-tls, http-types, HUnit
, infer-license, interpolate, mockery, pretty, QuickCheck
, scientific, template-haskell, temporary, text, transformers
, unordered-containers, vector, yaml
}:
mkDerivation {
pname = "hpack";
version = "0.31.1";
sha256 = "0fipbmmj4x588z7vh635mizhym9krydfxr49bgaf7xir4fsb4fmc";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson base bifunctors bytestring Cabal containers cryptonite
deepseq directory filepath Glob http-client http-client-tls
http-types infer-license pretty scientific text transformers
unordered-containers vector yaml
];
executableHaskellDepends = [
aeson base bifunctors bytestring Cabal containers cryptonite
deepseq directory filepath Glob http-client http-client-tls
http-types infer-license pretty scientific text transformers
unordered-containers vector yaml
];
testHaskellDepends = [
aeson base bifunctors bytestring Cabal containers cryptonite
deepseq directory filepath Glob hspec http-client http-client-tls
http-types HUnit infer-license interpolate mockery pretty
QuickCheck scientific template-haskell temporary text transformers
unordered-containers vector yaml
];
testToolDepends = [ hspec-discover ];
description = "A modern format for Haskell packages";
license = stdenv.lib.licenses.mit;
}) {};

# https://github.com/pikajude/stylish-cabal/issues/11
stylish-cabal = generateOptparseApplicativeCompletion "stylish-cabal" (super.stylish-cabal.overrideScope (self: super: {
Expand Down
86 changes: 0 additions & 86 deletions pkgs/development/haskell-modules/hackage-packages.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

73 changes: 0 additions & 73 deletions pkgs/development/python-modules/sphinx/1_7_9.nix

This file was deleted.

2 changes: 0 additions & 2 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4103,8 +4103,6 @@ in {

sphinx = callPackage ../development/python-modules/sphinx { };

sphinx_1_7_9 = callPackage ../development/python-modules/sphinx/1_7_9.nix { };

sphinx-argparse = callPackage ../development/python-modules/sphinx-argparse { };

sphinxcontrib-websupport = callPackage ../development/python-modules/sphinxcontrib-websupport { };
Expand Down

0 comments on commit e159c83

Please sign in to comment.