Merge pull request #103038 from NixOS/haskell-updates
Update Haskell package set (plus other fixes)
This commit is contained in:
commit
afe87caf9a
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
let
|
||||
|
||||
inherit (import ./fixed-points.nix {}) makeExtensible;
|
||||
inherit (import ./fixed-points.nix { inherit lib; }) makeExtensible;
|
||||
|
||||
lib = makeExtensible (self: let
|
||||
callLibs = file: import file { lib = self; };
|
||||
|
@ -69,7 +69,7 @@ let
|
|||
importJSON importTOML warn info showWarnings nixpkgsVersion version mod compare
|
||||
splitByAndCompare functionArgs setFunctionArgs isFunction toHexString toBaseDigits;
|
||||
inherit (self.fixedPoints) fix fix' converge extends composeExtensions
|
||||
makeExtensible makeExtensibleWithCustomName;
|
||||
composeManyExtensions makeExtensible makeExtensibleWithCustomName;
|
||||
inherit (self.attrsets) attrByPath hasAttrByPath setAttrByPath
|
||||
getAttrFromPath attrVals attrValues getAttrs catAttrs filterAttrs
|
||||
filterAttrsRecursive foldAttrs collect nameValuePair mapAttrs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ lib, ... }:
|
||||
rec {
|
||||
# Compute the fixed point of the given function `f`, which is usually an
|
||||
# attribute set that expects its final, non-recursive representation as an
|
||||
|
@ -77,6 +77,15 @@ rec {
|
|||
super' = super // fApplied;
|
||||
in fApplied // g self super';
|
||||
|
||||
# Compose several extending functions of the type expected by 'extends' into
|
||||
# one where changes made in preceding functions are made available to
|
||||
# subsequent ones.
|
||||
#
|
||||
# composeManyExtensions : [packageSet -> packageSet -> packageSet] -> packageSet -> packageSet -> packageSet
|
||||
# ^final ^prev ^overrides ^final ^prev ^overrides
|
||||
composeManyExtensions =
|
||||
lib.foldr (x: y: composeExtensions x y) (self: super: {});
|
||||
|
||||
# Create an overridable, recursive attribute set. For example:
|
||||
#
|
||||
# nix-repl> obj = makeExtensible (self: { })
|
||||
|
|
|
@ -87,6 +87,26 @@ runTests {
|
|||
expected = true;
|
||||
};
|
||||
|
||||
testComposeManyExtensions0 = {
|
||||
expr = let obj = makeExtensible (self: { foo = true; });
|
||||
emptyComposition = composeManyExtensions [];
|
||||
composed = obj.extend emptyComposition;
|
||||
in composed.foo;
|
||||
expected = true;
|
||||
};
|
||||
|
||||
testComposeManyExtensions =
|
||||
let f = self: super: { bar = false; baz = true; };
|
||||
g = self: super: { bar = super.baz or false; };
|
||||
h = self: super: { qux = super.bar or false; };
|
||||
obj = makeExtensible (self: { foo = self.qux; });
|
||||
in {
|
||||
expr = let composition = composeManyExtensions [f g h];
|
||||
composed = obj.extend composition;
|
||||
in composed.foo;
|
||||
expected = (obj.extend (composeExtensions f (composeExtensions g h))).foo;
|
||||
};
|
||||
|
||||
testBitAnd = {
|
||||
expr = (bitAnd 3 10);
|
||||
expected = 2;
|
||||
|
|
|
@ -85,6 +85,11 @@ self: super: {
|
|||
url = "https://github.com/hercules-ci/optparse-applicative/compare/0.15.1...hercules-ci:0.15.1-nixpkgs-compgen.diff";
|
||||
sha256 = "1bcp6b7gvc8pqbn1n1ybhizkkl5if7hk9ipgl746vk08v0d3xxql";
|
||||
});
|
||||
optparse-applicative_0_16_0_0 = appendPatch super.optparse-applicative_0_16_0_0 (pkgs.fetchpatch {
|
||||
name = "optparse-applicative-0.15.1-hercules-ci-compgen.diff";
|
||||
url = "https://github.com/hercules-ci/optparse-applicative/compare/0.15.1...hercules-ci:0.15.1-nixpkgs-compgen.diff";
|
||||
sha256 = "1bcp6b7gvc8pqbn1n1ybhizkkl5if7hk9ipgl746vk08v0d3xxql";
|
||||
});
|
||||
|
||||
# Fix test trying to access /home directory
|
||||
shell-conduit = overrideCabal super.shell-conduit (drv: {
|
||||
|
@ -335,7 +340,7 @@ self: super: {
|
|||
# Needs the latest version of vty and brick.
|
||||
matterhorn = super.matterhorn.overrideScope (self: super: {
|
||||
brick = self.brick_0_57;
|
||||
vty = self.vty_5_31;
|
||||
vty = self.vty_5_32;
|
||||
});
|
||||
|
||||
memcache = dontCheck super.memcache;
|
||||
|
@ -1224,14 +1229,6 @@ self: super: {
|
|||
sha256 = "0xbfhzhzg94b4r5qy5dg1c40liswwpqarrc2chcwgfbfnrmwkfc2";
|
||||
});
|
||||
|
||||
# this will probably need to get updated with every ghcide update,
|
||||
# we need an override because ghcide is tracking haskell-lsp closely.
|
||||
ghcide = dontCheck (super.ghcide.overrideScope (self: super: {
|
||||
hie-bios = dontCheck super.hie-bios_0_7_1;
|
||||
lsp-test = dontCheck self.lsp-test_0_11_0_7;
|
||||
}));
|
||||
implicit-hie-cradle = super.implicit-hie-cradle.override { hie-bios = dontCheck super.hie-bios_0_7_1; };
|
||||
|
||||
# hasn‘t bumped upper bounds
|
||||
# upstream: https://github.com/obsidiansystems/which/pull/6
|
||||
which = doJailbreak super.which;
|
||||
|
@ -1256,25 +1253,7 @@ self: super: {
|
|||
patch = doJailbreak super.patch;
|
||||
|
||||
# Tests disabled and broken override needed because of missing lib chrome-test-utils: https://github.com/reflex-frp/reflex-dom/issues/392
|
||||
# Tests disabled because of very old dep: https://github.com/reflex-frp/reflex-dom/issues/393
|
||||
reflex-dom-core = doDistribute (unmarkBroken (dontCheck (appendPatches super.reflex-dom-core [
|
||||
# Upstream PR: https://github.com/reflex-frp/reflex-dom/pull/388
|
||||
# Fix upper bounds
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/reflex-frp/reflex-dom/commit/5ef04d8e478f410d2c63603b84af052c9273a533.patch";
|
||||
sha256 ="0d0b819yh8mqw8ih5asdi9qcca2kmggfsi8gf22akfw1n7xvmavi";
|
||||
stripLen = 2;
|
||||
extraPrefix = "";
|
||||
})
|
||||
# Upstream PR: https://github.com/reflex-frp/reflex-dom/pull/394
|
||||
# Bump dependent-map
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://github.com/reflex-frp/reflex-dom/commit/695bd17d5dcdb1bf321ee8858670731637f651db.patch";
|
||||
sha256 ="0llky3i37rakgsw9vqaqmwryv7s91w8ph8xjkh83nxjs14p5zfyk";
|
||||
stripLen = 2;
|
||||
extraPrefix = "";
|
||||
})
|
||||
])));
|
||||
reflex-dom-core = doDistribute (unmarkBroken (dontCheck super.reflex-dom-core));
|
||||
|
||||
# add unreleased commit fixing version constraint as a patch
|
||||
# Can be removed if https://github.com/lpeterse/haskell-utc/issues/8 is resolved
|
||||
|
@ -1425,7 +1404,7 @@ self: super: {
|
|||
skylighting-core = doDistribute super.skylighting-core_0_10_0_3;
|
||||
hslua = doDistribute self.hslua_1_1_2;
|
||||
jira-wiki-markup = doDistribute self.jira-wiki-markup_1_3_2;
|
||||
pandoc = doDistribute self.pandoc_2_11_1;
|
||||
pandoc = doDistribute self.pandoc_2_11_1_1;
|
||||
# jailbreaking pandoc-citeproc because it has not bumped upper bound on pandoc
|
||||
pandoc-citeproc = doJailbreak (doDistribute self.pandoc-citeproc_0_17_0_2);
|
||||
pandoc-types = doDistribute self.pandoc-types_1_22;
|
||||
|
@ -1435,34 +1414,73 @@ self: super: {
|
|||
domain-auth = dontCheck super.domain-auth;
|
||||
|
||||
# stack-2.5.1 needs a more current version of pantry to compile
|
||||
pantry = self.pantry_0_5_1_3;
|
||||
pantry = self.pantry_0_5_1_4;
|
||||
|
||||
# Too tight version bounds, see https://github.com/haskell-hvr/microaeson/pull/4
|
||||
microaeson = doJailbreak super.microaeson;
|
||||
|
||||
autoapply = super.autoapply.override { th-desugar = self.th-desugar_1_11; };
|
||||
|
||||
# binary-instances needs the latest version.
|
||||
time-compat = self.time-compat_1_9_4;
|
||||
|
||||
# - Deps are required during the build for testing and also during execution,
|
||||
# so add them to build input and also wrap the resulting binary so they're in
|
||||
# PATH.
|
||||
update-nix-fetchgit = let deps = [ pkgs.git pkgs.nix pkgs.nix-prefetch-git ];
|
||||
in generateOptparseApplicativeCompletion "update-nix-fetchgit" (overrideCabal
|
||||
(addTestToolDepends (super.update-nix-fetchgit.overrideScope (self: super: {
|
||||
optparse-generic = self.optparse-generic_1_4_4;
|
||||
optparse-applicative = self.optparse-applicative_0_16_0_0;
|
||||
})) deps) (drv: {
|
||||
buildTools = drv.buildTools or [ ] ++ [ pkgs.makeWrapper ];
|
||||
postInstall = drv.postInstall or "" + ''
|
||||
wrapProgram "$out/bin/update-nix-fetchgit" --prefix 'PATH' ':' "${
|
||||
pkgs.lib.makeBinPath deps
|
||||
}"
|
||||
'';
|
||||
}));
|
||||
|
||||
optparse-generic_1_4_4 = super.optparse-generic_1_4_4.override {
|
||||
optparse-applicative = self.optparse-applicative_0_16_0_0;
|
||||
};
|
||||
|
||||
# Our quickcheck-instances is too old for the newer binary-instances, but
|
||||
# quickcheck-instances is only used in the tests of binary-instances.
|
||||
binary-instances = dontCheck super.binary-instances;
|
||||
|
||||
# INSERT NEW OVERRIDES ABOVE THIS LINE
|
||||
} // (let
|
||||
inherit (self) hls-ghcide hls-brittany;
|
||||
hlsScopeOverride = self: super: {
|
||||
# haskell-language-server uses its own fork of ghcide
|
||||
# Test disabled: it seems to freeze (is it just that it takes a long time ?)
|
||||
ghcide = dontCheck hls-ghcide;
|
||||
# we are faster than stack here
|
||||
# fourmolu can‘t compile with an older aeson
|
||||
localOverride = name: value: doDistribute (value.overrideScope (self: super: {
|
||||
aeson = dontCheck super.aeson_1_5_2_0;
|
||||
}));
|
||||
in pkgs.lib.mapAttrs localOverride {
|
||||
# tons of overrides for bleeding edge versions for ghcide and hls
|
||||
# overriding aeson on all of them to prevent double compilations
|
||||
# this shouldn‘t break anything because nearly all their reverse deps are
|
||||
# in this list or marked as broken anyways
|
||||
haskell-language-server = dontCheck super.haskell-language-server;
|
||||
fourmolu = dontCheck super.fourmolu;
|
||||
stylish-haskell = super.stylish-haskell_0_12_2_0;
|
||||
ghcide = dontCheck (appendPatch super.ghcide (pkgs.fetchpatch {
|
||||
# 2020-11-13: Bumping bounds via an already upstream merged change
|
||||
# https://github.com/haskell/ghcide/pull/905
|
||||
url = https://github.com/haskell/ghcide/commit/9b8aaf9b06846571cc0b5d46680e686e4f9153a3.patch;
|
||||
sha256 = "0j8980dmvwjcs72ahq2zc14hwkyd5ybgzyy1az3zq5flp383fai6";
|
||||
includes = [ "ghcide.cabal" ];
|
||||
}));
|
||||
refinery = super.refinery_0_3_0_0;
|
||||
data-tree-print = doJailbreak super.data-tree-print;
|
||||
ghc-exactprint = dontCheck super.ghc-exactprint_0_6_3_3;
|
||||
hie-bios = dontCheck super.hie-bios_0_7_1;
|
||||
lsp-test = dontCheck super.lsp-test_0_11_0_7;
|
||||
# fourmolu can‘t compile with an older aeson
|
||||
aeson = dontCheck super.aeson_1_5_2_0;
|
||||
# brittany has an aeson upper bound of 1.5
|
||||
brittany = hls-brittany;
|
||||
data-tree-print = doJailbreak super.data-tree-print;
|
||||
ghc-exactprint = dontCheck super.ghc-exactprint_0_6_3_2;
|
||||
};
|
||||
in {
|
||||
haskell-language-server = dontCheck (super.haskell-language-server.overrideScope hlsScopeOverride);
|
||||
hls-ghcide = dontCheck (super.hls-ghcide.overrideScope hlsScopeOverride);
|
||||
hls-brittany = dontCheck (super.hls-brittany.overrideScope hlsScopeOverride);
|
||||
fourmolu = dontCheck (super.fourmolu.overrideScope hlsScopeOverride);
|
||||
hls-plugin-api = super.hls-plugin-api;
|
||||
hls-hlint-plugin = super.hls-hlint-plugin;
|
||||
implicit-hie-cradle = super.implicit-hie-cradle;
|
||||
# the hls brittany is objectively better, because there hasn‘t been a
|
||||
# brittany release in a while and this version works with 8.10.
|
||||
# And we need to build it anyways.
|
||||
brittany = dontCheck super.hls-brittany;
|
||||
}
|
||||
) // import ./configuration-tensorflow.nix {inherit pkgs haskellLib;} self super
|
||||
|
|
|
@ -111,9 +111,6 @@ self: super: {
|
|||
sha256 = "0rgzrq0513nlc1vw7nw4km4bcwn4ivxcgi33jly4a7n3c1r32v1f";
|
||||
});
|
||||
|
||||
# Only 0.8 is compatible with ghc 8.10 https://hackage.haskell.org/package/apply-refact/changelog
|
||||
apply-refact = super.apply-refact_0_8_0_0;
|
||||
|
||||
# https://github.com/commercialhaskell/pantry/issues/21
|
||||
pantry = appendPatch super.pantry (pkgs.fetchpatch {
|
||||
name = "add-cabal-3.2.x-support.patch";
|
||||
|
|
|
@ -91,7 +91,4 @@ self: super: {
|
|||
|
||||
# ghc versions prior to 8.8.x needs additional dependency to compile successfully.
|
||||
ghc-lib-parser-ex = addBuildDepend super.ghc-lib-parser-ex self.ghc-lib-parser;
|
||||
|
||||
# Only 0.6 is compatible with ghc 8.6 https://hackage.haskell.org/package/apply-refact/changelog
|
||||
apply-refact = super.apply-refact_0_6_0_0;
|
||||
}
|
||||
|
|
|
@ -69,7 +69,6 @@ self: super: {
|
|||
integer-logarithms = doJailbreak super.integer-logarithms;
|
||||
lucid = doJailbreak super.lucid;
|
||||
parallel = doJailbreak super.parallel;
|
||||
quickcheck-instances = doJailbreak super.quickcheck-instances;
|
||||
setlocale = doJailbreak super.setlocale;
|
||||
split = doJailbreak super.split;
|
||||
system-fileio = doJailbreak super.system-fileio;
|
||||
|
@ -105,9 +104,6 @@ self: super: {
|
|||
# of issues with Cabal 3.x.
|
||||
darcs = dontDistribute super.darcs;
|
||||
|
||||
# Only 0.7 is compatible with ghc 8.7 https://hackage.haskell.org/package/apply-refact/changelog
|
||||
apply-refact = super.apply-refact_0_7_0_0;
|
||||
|
||||
# The package needs the latest Cabal version.
|
||||
cabal-install-parsers = super.cabal-install-parsers.overrideScope (self: super: { Cabal = self.Cabal_3_2_1_0; });
|
||||
|
||||
|
|
|
@ -2546,10 +2546,6 @@ extra-packages:
|
|||
- aeson-pretty < 0.8 # required by elm compiler
|
||||
- Agda == 2.6.1 # allows the agdaPackage set to be fixed to this version so that it won't break when another agda version is released.
|
||||
- ansi-terminal == 0.10.3 # required by cabal-plan, and policeman in ghc-8.8.x
|
||||
- apply-refact < 0.4 # newer versions don't work with GHC 8.0.x
|
||||
- apply-refact == 0.6.0.0 # works with GHC 8.6.x https://hackage.haskell.org/package/apply-refact/changelog
|
||||
- apply-refact == 0.7.0.0 # works with GHC 8.8.x https://hackage.haskell.org/package/apply-refact/changelog
|
||||
- apply-refact == 0.8.0.0 # works with GHC 8.10.x https://hackage.haskell.org/package/apply-refact/changelog
|
||||
- binary > 0.7 && < 0.8 # keep a 7.x major release around for older compilers
|
||||
- binary > 0.8 && < 0.9 # keep a 8.x major release around for older compilers
|
||||
- Cabal == 2.2.* # required for jailbreak-cabal etc.
|
||||
|
@ -2590,8 +2586,6 @@ extra-packages:
|
|||
- mtl-prelude < 2 # required for to build postgrest on mtl 2.1.x platforms
|
||||
- network == 2.6.3.1 # newer versions don't compile with GHC 7.4.x and below
|
||||
- network == 3.0.* # required by network-bsd, HTTP, and many others (2019-04-30)
|
||||
- ormolu == 0.0.5.0 # required by haskell-language-server
|
||||
- pandoc-types == 1.21 # required by for pandoc_2_10_1
|
||||
- pantry == 0.2.0.0 # required by stack-2.1.3.1
|
||||
- parallel == 3.2.0.3 # newer versions don't work with GHC 6.12.3
|
||||
- patience ^>= 0.1 # required by chell-0.4.x
|
||||
|
@ -3324,6 +3318,7 @@ broken-packages:
|
|||
- bdd
|
||||
- bdo
|
||||
- beam
|
||||
- beam-automigrate
|
||||
- beam-core
|
||||
- beam-migrate
|
||||
- beam-mysql
|
||||
|
@ -3932,7 +3927,6 @@ broken-packages:
|
|||
- cmt
|
||||
- cmv
|
||||
- cnc-spec-compiler
|
||||
- co-log
|
||||
- co-log-polysemy-formatting
|
||||
- co-log-sys
|
||||
- Coadjute
|
||||
|
@ -3990,7 +3984,6 @@ broken-packages:
|
|||
- commsec
|
||||
- commsec-keyexchange
|
||||
- ComonadSheet
|
||||
- compact
|
||||
- compact-map
|
||||
- compact-mutable
|
||||
- compact-mutable-vector
|
||||
|
@ -7287,6 +7280,7 @@ broken-packages:
|
|||
- language-lua-qq
|
||||
- language-lua2
|
||||
- language-mixal
|
||||
- language-Modula2
|
||||
- language-ninja
|
||||
- language-oberon
|
||||
- language-objc
|
||||
|
@ -7731,6 +7725,7 @@ broken-packages:
|
|||
- mcl
|
||||
- mcm
|
||||
- mcmaster-gloss-examples
|
||||
- mcmc
|
||||
- mcmc-samplers
|
||||
- mcmc-synthesis
|
||||
- mcpi
|
||||
|
@ -8563,6 +8558,7 @@ broken-packages:
|
|||
- pbc4hs
|
||||
- PBKDF2
|
||||
- pcap-enumerator
|
||||
- pcapng
|
||||
- pcd-loader
|
||||
- pcf
|
||||
- pcf-font
|
||||
|
@ -8774,14 +8770,14 @@ broken-packages:
|
|||
- polysemy-http
|
||||
- polysemy-kvstore-jsonfile
|
||||
- polysemy-methodology
|
||||
- polysemy-optics
|
||||
- polysemy-methodology-composite
|
||||
- polysemy-path
|
||||
- polysemy-RandomFu
|
||||
- polysemy-resume
|
||||
- polysemy-test
|
||||
- polysemy-time
|
||||
- polysemy-vinyl
|
||||
- polysemy-webserver
|
||||
- polysemy-zoo
|
||||
- polyseq
|
||||
- polytypeable
|
||||
- polytypeable-utils
|
||||
|
@ -10777,7 +10773,6 @@ broken-packages:
|
|||
- typelevel-tensor
|
||||
- TypeNat
|
||||
- typeparams
|
||||
- typerep-map
|
||||
- types-compat
|
||||
- typesafe-precure
|
||||
- typescript-docs
|
||||
|
@ -11517,4 +11512,4 @@ broken-packages:
|
|||
- zuramaru
|
||||
- Zwaluw
|
||||
- zxcvbn-dvorak
|
||||
- zxcvbn-hs
|
||||
- zxcvbn-h
|
||||
|
|
|
@ -654,7 +654,7 @@ self: super: builtins.intersectAttrs super {
|
|||
# Tests require internet
|
||||
http-download = dontCheck super.http-download;
|
||||
pantry = dontCheck super.pantry;
|
||||
pantry_0_5_1_3 = dontCheck super.pantry_0_5_1_3;
|
||||
pantry_0_5_1_4 = dontCheck super.pantry_0_5_1_4;
|
||||
|
||||
# gtk2hs-buildtools is listed in setupHaskellDepends, but we
|
||||
# need it during the build itself, too.
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -86,11 +86,11 @@ rec {
|
|||
future.
|
||||
|
||||
Instead of jailbreaking, you can patch the cabal file.
|
||||
|
||||
|
||||
Note that jailbreaking at this time, doesn't lift bounds on
|
||||
conditional branches.
|
||||
conditional branches.
|
||||
https://github.com/peti/jailbreak-cabal/issues/7 has further details.
|
||||
|
||||
|
||||
*/
|
||||
doJailbreak = drv: overrideCabal drv (drv: { jailbreak = true; });
|
||||
|
||||
|
@ -156,6 +156,9 @@ rec {
|
|||
addBuildDepend = drv: x: addBuildDepends drv [x];
|
||||
addBuildDepends = drv: xs: overrideCabal drv (drv: { buildDepends = (drv.buildDepends or []) ++ xs; });
|
||||
|
||||
addTestToolDepend = drv: x: addTestToolDepends drv [x];
|
||||
addTestToolDepends = drv: xs: overrideCabal drv (drv: { testToolDepends = (drv.testToolDepends or []) ++ xs; });
|
||||
|
||||
addPkgconfigDepend = drv: x: addPkgconfigDepends drv [x];
|
||||
addPkgconfigDepends = drv: xs: overrideCabal drv (drv: { pkgconfigDepends = (drv.pkgconfigDepends or []) ++ xs; });
|
||||
|
||||
|
@ -232,6 +235,31 @@ rec {
|
|||
fixupPhase = ":";
|
||||
});
|
||||
|
||||
/* Create a documentation tarball suitable for uploading to Hackage instead
|
||||
of building the package.
|
||||
*/
|
||||
documentationTarball = pkg:
|
||||
pkgs.lib.overrideDerivation pkg (drv: {
|
||||
name = "${drv.name}-docs";
|
||||
# Like sdistTarball, disable the "doc" output here.
|
||||
outputs = [ "out" ];
|
||||
buildPhase = ''
|
||||
runHook preHaddock
|
||||
./Setup haddock --for-hackage
|
||||
runHook postHaddock
|
||||
'';
|
||||
haddockPhase = ":";
|
||||
checkPhase = ":";
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out"
|
||||
tar --format=ustar \
|
||||
-czf "$out/${drv.name}-docs.tar.gz" \
|
||||
-C dist/doc/html "${drv.name}-docs"
|
||||
runHook postInstall
|
||||
'';
|
||||
});
|
||||
|
||||
/* Use the gold linker. It is a linker for ELF that is designed
|
||||
"to run as fast as possible on modern systems"
|
||||
*/
|
||||
|
|
|
@ -221,30 +221,56 @@ in package-set { inherit pkgs stdenv callPackage; } self // {
|
|||
# , overrides : Defaulted (HaskellPackageOverrideSet)
|
||||
# , modifier : Defaulted
|
||||
# , returnShellEnv : Defaulted
|
||||
# , withHoogle : Defaulted
|
||||
# , cabal2nixOptions : Defaulted
|
||||
# } -> NixShellAwareDerivation
|
||||
#
|
||||
# Given a path to a haskell package directory, an optional package name
|
||||
# which defaults to the base name of the path, an optional set of source
|
||||
# overrides as appropriate for the 'packageSourceOverrides' function, an
|
||||
# optional set of arbitrary overrides, and an optional haskell package
|
||||
# modifier, return a derivation appropriate for nix-build or nix-shell to
|
||||
# build that package.
|
||||
#
|
||||
# If 'returnShellEnv' is true this returns a derivation which will give you
|
||||
# an environment suitable for developing the listed packages with an
|
||||
# incremental tool like cabal-install.
|
||||
#
|
||||
# If 'withHoogle' is true (the default if a shell environment is requested)
|
||||
# then 'ghcWithHoogle' is used to generate the derivation (instead of
|
||||
# 'ghcWithPackages'), see the documentation there for more information.
|
||||
#
|
||||
# 'cabal2nixOptions' can contain extra command line arguments to pass to
|
||||
# 'cabal2nix' when generating the package derivation, for example setting
|
||||
# a cabal flag with '--flag=myflag'.
|
||||
developPackage =
|
||||
{ root
|
||||
, name ? builtins.baseNameOf root
|
||||
, source-overrides ? {}
|
||||
, overrides ? self: super: {}
|
||||
, modifier ? drv: drv
|
||||
, returnShellEnv ? pkgs.lib.inNixShell }:
|
||||
, returnShellEnv ? pkgs.lib.inNixShell
|
||||
, withHoogle ? returnShellEnv
|
||||
, cabal2nixOptions ? "" }:
|
||||
let drv =
|
||||
(extensible-self.extend
|
||||
(pkgs.lib.composeExtensions
|
||||
(self.packageSourceOverrides source-overrides)
|
||||
overrides))
|
||||
.callCabal2nix name root {};
|
||||
in if returnShellEnv then (modifier drv).env else modifier drv;
|
||||
.callCabal2nixWithOptions name root cabal2nixOptions {};
|
||||
in if returnShellEnv
|
||||
then (modifier drv).envFunc {inherit withHoogle;}
|
||||
else modifier drv;
|
||||
|
||||
ghcWithPackages = selectFrom: withPackages (selectFrom self);
|
||||
|
||||
# Put 'hoogle' into the derivation's PATH with a database containing all
|
||||
# the package's dependencies; run 'hoogle server --local' in a shell to
|
||||
# host a search engine for the dependencies.
|
||||
#
|
||||
# To reload the Hoogle server automatically on .cabal file changes try
|
||||
# this:
|
||||
# echo *.cabal | entr -r -- nix-shell --run 'hoogle server --local'
|
||||
ghcWithHoogle = selectFrom:
|
||||
let
|
||||
packages = selectFrom self;
|
||||
|
|
|
@ -22,8 +22,9 @@ self: super: {
|
|||
# HLS and its fork of ghcide that it uses
|
||||
# both are auto-generated by pkgs/development/tools/haskell/haskell-language-server/update.sh
|
||||
haskell-language-server = self.callPackage ../tools/haskell/haskell-language-server { };
|
||||
hls-ghcide = self.callPackage ../tools/haskell/haskell-language-server/hls-ghcide.nix { };
|
||||
hls-brittany = self.callPackage ../tools/haskell/haskell-language-server/hls-brittany.nix { };
|
||||
hls-hlint-plugin = self.callPackage ../tools/haskell/haskell-language-server/hls-hlint-plugin.nix { };
|
||||
hls-tactics-plugin = self.callPackage ../tools/haskell/haskell-language-server/hls-tactics-plugin.nix { };
|
||||
|
||||
nix-output-monitor = self.callPackage ../../tools/nix/nix-output-monitor { };
|
||||
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
{ mkDerivation, aeson, base, binary, blaze-markup, brittany
|
||||
, bytestring, containers, data-default, deepseq, directory, extra
|
||||
, fetchgit, filepath, fingertree, floskell, fourmolu, ghc
|
||||
, ghc-boot-th, ghc-exactprint, ghc-paths, ghc-source-gen, ghcide
|
||||
, gitrev, hashable, haskell-lsp, hie-bios, hls-plugin-api, hslogger
|
||||
, fetchgit, filepath, floskell, fourmolu, ghc, ghc-boot-th
|
||||
, ghc-paths, ghcide, gitrev, hashable, haskell-lsp, hie-bios
|
||||
, hls-hlint-plugin, hls-plugin-api, hls-tactics-plugin, hslogger
|
||||
, hspec, hspec-core, lens, lsp-test, mtl, optparse-applicative
|
||||
, optparse-simple, ormolu, process, refinery, regex-tdfa, retrie
|
||||
, safe-exceptions, shake, stdenv, stm, stylish-haskell, syb, tasty
|
||||
, optparse-simple, ormolu, process, regex-tdfa, retrie
|
||||
, safe-exceptions, shake, stdenv, stm, stylish-haskell, tasty
|
||||
, tasty-ant-xml, tasty-expected-failure, tasty-golden, tasty-hunit
|
||||
, tasty-rerun, temporary, text, time, transformers
|
||||
, unordered-containers, yaml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "haskell-language-server";
|
||||
version = "0.5.0.0";
|
||||
version = "0.6.0.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/haskell/haskell-language-server.git";
|
||||
sha256 = "1qi762fa72487i8fspxmr8xizm9n2s1shxsvnvsl67vj9if573r9";
|
||||
rev = "3ca2a6cd267f373aae19f59e1cf9e04b6524eff3";
|
||||
sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj";
|
||||
rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
|
@ -29,12 +29,12 @@ mkDerivation {
|
|||
];
|
||||
executableHaskellDepends = [
|
||||
aeson base binary brittany bytestring containers deepseq directory
|
||||
extra filepath fingertree floskell fourmolu ghc ghc-boot-th
|
||||
ghc-exactprint ghc-paths ghc-source-gen ghcide gitrev hashable
|
||||
haskell-lsp hie-bios hls-plugin-api hslogger lens mtl
|
||||
optparse-applicative optparse-simple ormolu process refinery
|
||||
regex-tdfa retrie safe-exceptions shake stylish-haskell syb
|
||||
temporary text time transformers unordered-containers
|
||||
extra filepath floskell fourmolu ghc ghc-boot-th ghc-paths ghcide
|
||||
gitrev hashable haskell-lsp hie-bios hls-hlint-plugin
|
||||
hls-plugin-api hls-tactics-plugin hslogger lens mtl
|
||||
optparse-applicative optparse-simple ormolu process regex-tdfa
|
||||
retrie safe-exceptions shake stylish-haskell temporary text time
|
||||
transformers unordered-containers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson base blaze-markup bytestring containers data-default
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
{ mkDerivation, aeson, array, async, base, base16-bytestring
|
||||
, binary, bytestring, Chart, Chart-diagrams, containers
|
||||
, cryptohash-sha1, data-default, deepseq, diagrams, diagrams-svg
|
||||
, directory, extra, fetchgit, filepath, fingertree, fuzzy, ghc
|
||||
, ghc-boot, ghc-boot-th, ghc-check, ghc-paths
|
||||
, ghc-typelits-knownnat, gitrev, Glob, haddock-library, hashable
|
||||
, haskell-lsp, haskell-lsp-types, hie-bios, hslogger
|
||||
, implicit-hie-cradle, lens, lsp-test, mtl, network-uri
|
||||
, optparse-applicative, prettyprinter, prettyprinter-ansi-terminal
|
||||
, process, QuickCheck, quickcheck-instances
|
||||
, record-dot-preprocessor, record-hasfield, regex-tdfa
|
||||
, rope-utf16-splay, safe, safe-exceptions, shake, sorted-list
|
||||
, stdenv, stm, syb, tasty, tasty-expected-failure, tasty-hunit
|
||||
, tasty-quickcheck, tasty-rerun, text, time, transformers, unix
|
||||
, unordered-containers, utf8-string, yaml
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ghcide";
|
||||
version = "0.4.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/haskell/ghcide";
|
||||
sha256 = "0zv14mvfhmwwkhyzkr38qpvyffa8ywzp41lr1k55pbrc5b10fjr6";
|
||||
rev = "0bfce3114c28bd00f7bf5729c32ec0f23a8d8854";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson array async base base16-bytestring binary bytestring
|
||||
containers cryptohash-sha1 data-default deepseq directory extra
|
||||
filepath fingertree fuzzy ghc ghc-boot ghc-boot-th ghc-check
|
||||
ghc-paths Glob haddock-library hashable haskell-lsp
|
||||
haskell-lsp-types hie-bios hslogger implicit-hie-cradle mtl
|
||||
network-uri prettyprinter prettyprinter-ansi-terminal regex-tdfa
|
||||
rope-utf16-splay safe safe-exceptions shake sorted-list stm syb
|
||||
text time transformers unix unordered-containers utf8-string
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
aeson base bytestring containers data-default directory extra
|
||||
filepath gitrev hashable haskell-lsp haskell-lsp-types hie-bios
|
||||
lens lsp-test optparse-applicative process safe-exceptions text
|
||||
unordered-containers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson base binary bytestring containers directory extra filepath
|
||||
ghc ghc-typelits-knownnat haddock-library haskell-lsp
|
||||
haskell-lsp-types lens lsp-test network-uri optparse-applicative
|
||||
process QuickCheck quickcheck-instances record-dot-preprocessor
|
||||
record-hasfield rope-utf16-splay safe safe-exceptions shake tasty
|
||||
tasty-expected-failure tasty-hunit tasty-quickcheck tasty-rerun
|
||||
text
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
aeson base Chart Chart-diagrams diagrams diagrams-svg directory
|
||||
extra filepath shake text yaml
|
||||
];
|
||||
homepage = "https://github.com/haskell/ghcide#readme";
|
||||
description = "The core of an IDE";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{ mkDerivation, aeson, apply-refact, base, binary, bytestring
|
||||
, containers, data-default, deepseq, Diff, directory, extra
|
||||
, fetchgit, filepath, ghc, ghc-lib, ghc-lib-parser-ex, ghcide
|
||||
, hashable, haskell-lsp, hlint, hls-plugin-api, hslogger, lens
|
||||
, regex-tdfa, shake, stdenv, temporary, text, transformers
|
||||
, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "hls-hlint-plugin";
|
||||
version = "0.1.0.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/haskell/haskell-language-server.git";
|
||||
sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj";
|
||||
rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/plugins/hls-hlint-plugin; echo source root reset to $sourceRoot";
|
||||
libraryHaskellDepends = [
|
||||
aeson apply-refact base binary bytestring containers data-default
|
||||
deepseq Diff directory extra filepath ghc ghc-lib ghc-lib-parser-ex
|
||||
ghcide hashable haskell-lsp hlint hls-plugin-api hslogger lens
|
||||
regex-tdfa shake temporary text transformers unordered-containers
|
||||
];
|
||||
description = "Hlint integration plugin with Haskell Language Server";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{ mkDerivation, aeson, base, checkers, containers, deepseq
|
||||
, directory, extra, fetchgit, filepath, fingertree, generic-lens
|
||||
, ghc, ghc-boot-th, ghc-exactprint, ghc-source-gen, ghcide
|
||||
, haskell-lsp, hie-bios, hls-plugin-api, hspec, lens, mtl
|
||||
, QuickCheck, refinery, retrie, shake, stdenv, syb, text
|
||||
, transformers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "hls-tactics-plugin";
|
||||
version = "0.5.1.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/haskell/haskell-language-server.git";
|
||||
sha256 = "027fq6752024wzzq9izsilm5lkq9gmpxf82rixbimbijw0yk4pwj";
|
||||
rev = "372a12e797069dc3ac4fa33dcaabe3b992999d7c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/plugins/tactics; echo source root reset to $sourceRoot";
|
||||
libraryHaskellDepends = [
|
||||
aeson base containers deepseq directory extra filepath fingertree
|
||||
generic-lens ghc ghc-boot-th ghc-exactprint ghc-source-gen ghcide
|
||||
haskell-lsp hls-plugin-api lens mtl refinery retrie shake syb text
|
||||
transformers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base checkers containers ghc hie-bios hls-plugin-api hspec mtl
|
||||
QuickCheck
|
||||
];
|
||||
homepage = "https://github.com/isovector/hls-tactics-plugin#readme";
|
||||
description = "LSP server for GHC";
|
||||
license = "unknown";
|
||||
hydraPlatforms = stdenv.lib.platforms.none;
|
||||
}
|
|
@ -15,24 +15,6 @@ set -eo pipefail
|
|||
# This is the directory of this update.sh script.
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
# ===========================
|
||||
# ghcide fork on https://github.com/wz1000/ghcide
|
||||
# ===========================
|
||||
|
||||
# ghcide derivation created with cabal2nix.
|
||||
ghcide_derivation_file="${script_dir}/hls-ghcide.nix"
|
||||
|
||||
# This is the current revision of hls in Nixpkgs.
|
||||
ghcide_old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$ghcide_derivation_file")"
|
||||
|
||||
# This is the revision of ghcide used by hls on GitHub.
|
||||
ghcide_new_version=$(curl --silent "https://api.github.com/repos/haskell/haskell-language-server/contents/ghcide" | jq '.sha' --raw-output)
|
||||
|
||||
echo "Updating haskell-language-server's ghcide from old version $ghcide_old_version to new version $ghcide_new_version."
|
||||
echo "Running cabal2nix and outputting to ${ghcide_derivation_file}..."
|
||||
|
||||
cabal2nix --revision "$ghcide_new_version" "https://github.com/haskell/ghcide" > "$ghcide_derivation_file"
|
||||
|
||||
# ===========================
|
||||
# HLS maintainer's Brittany fork
|
||||
# ===========================
|
||||
|
@ -67,5 +49,7 @@ echo "Updating haskell-language-server from old version $hls_old_version to new
|
|||
echo "Running cabal2nix and outputting to ${hls_derivation_file}..."
|
||||
|
||||
cabal2nix --revision "$hls_new_version" "https://github.com/haskell/haskell-language-server.git" > "$hls_derivation_file"
|
||||
cabal2nix --revision "$hls_new_version" --subpath plugins/tactics "https://github.com/haskell/haskell-language-server.git" > "${script_dir}/hls-tactics-plugin.nix"
|
||||
cabal2nix --revision "$hls_new_version" --subpath plugins/hls-hlint-plugin "https://github.com/haskell/haskell-language-server.git" > "${script_dir}/hls-hlint-plugin.nix"
|
||||
|
||||
echo "Finished."
|
||||
|
|
|
@ -23,6 +23,7 @@ with pkgs;
|
|||
stdenv-inputs = callPackage ./stdenv-inputs { };
|
||||
|
||||
haskell-shellFor = callPackage ./haskell-shellFor { };
|
||||
haskell-documentationTarball = callPackage ./haskell-documentationTarball { };
|
||||
|
||||
cc-multilib-gcc = callPackage ./cc-wrapper/multilib.nix { stdenv = gccMultiStdenv; };
|
||||
cc-multilib-clang = callPackage ./cc-wrapper/multilib.nix { stdenv = clangMultiStdenv; };
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, haskellPackages }:
|
||||
|
||||
let
|
||||
drv = haskellPackages.vector;
|
||||
docs = pkgs.haskell.lib.documentationTarball drv;
|
||||
|
||||
in pkgs.runCommand "test haskell.lib.documentationTarball" { } ''
|
||||
tar xvzf "${docs}/${drv.name}-docs.tar.gz"
|
||||
|
||||
# Check for Haddock html
|
||||
find "${drv.name}-docs" | grep -q "Data-Vector.html"
|
||||
|
||||
# Check for source html
|
||||
find "${drv.name}-docs" | grep -q "src/Data.Vector.html"
|
||||
|
||||
touch "$out"
|
||||
''
|
|
@ -6209,6 +6209,8 @@ in
|
|||
|
||||
update-dotdee = with python3Packages; toPythonApplication update-dotdee;
|
||||
|
||||
update-nix-fetchgit = haskell.lib.justStaticExecutables haskellPackages.update-nix-fetchgit;
|
||||
|
||||
update-resolv-conf = callPackage ../tools/networking/openvpn/update-resolv-conf.nix { };
|
||||
|
||||
update-systemd-resolved = callPackage ../tools/networking/openvpn/update-systemd-resolved.nix { };
|
||||
|
|
Loading…
Reference in New Issue