diff --git a/doc/languages-frameworks/haskell.section.md b/doc/languages-frameworks/haskell.section.md index 54ba8e4786d54..733e75c16a796 100644 --- a/doc/languages-frameworks/haskell.section.md +++ b/doc/languages-frameworks/haskell.section.md @@ -101,10 +101,10 @@ to compile your Haskell packages with any GHC version you please. The following command displays the complete list of available compilers: ``` $ nix-env -f "" -qaP -A haskell.compiler -haskell.compiler.ghc8101 ghc-8.10.0.20191210 -haskell.compiler.integer-simple.ghc8101 ghc-8.10.0.20191210 -haskell.compiler.ghcHEAD ghc-8.10.20191119 -haskell.compiler.integer-simple.ghcHEAD ghc-8.10.20191119 +haskell.compiler.ghc8101 ghc-8.10.1 +haskell.compiler.integer-simple.ghc8101 ghc-8.10.1 +haskell.compiler.ghcHEAD ghc-8.11.20200403 +haskell.compiler.integer-simple.ghcHEAD ghc-8.11.20200403 haskell.compiler.ghc822Binary ghc-8.2.2-binary haskell.compiler.ghc844 ghc-8.4.4 haskell.compiler.ghc863Binary ghc-8.6.3-binary diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index be8fd73a6be02..d7fe37d1103f0 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -2,13 +2,17 @@ # build-tools , bootPkgs -, autoconf, autoreconfHook, automake, coreutils, fetchgit, fetchpatch, perl, python3, m4, sphinx +, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx , bash , libiconv ? null, ncurses +, # GHC can be built with system libffi or a bundled one. + libffi ? null + , enableDwarf ? !stdenv.targetPlatform.isDarwin && - !stdenv.targetPlatform.isWindows, elfutils # for DWARF support + !stdenv.targetPlatform.isWindows +, elfutils # for DWARF support , useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS , # LLVM is conceptually a run-time-only depedendency, but for @@ -18,7 +22,8 @@ , # If enabled, GHC will be built with the GPL-free but slower integer-simple # library instead of the faster but GPLed integer-gmp library. - enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp + enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms) +, gmp , # If enabled, use -fPIC when compiling static libs. enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform @@ -30,7 +35,7 @@ , # Whetherto build terminfo. enableTerminfo ? !stdenv.targetPlatform.isWindows -, version ? "8.10.20191119" +, version ? "8.11.20200403" , # What flavour to build. An empty string indicates no # specific flavour and falls back to ghc default values. ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) @@ -75,6 +80,7 @@ let # Splicer will pull out correct variations libDeps = platform: stdenv.lib.optional enableTerminfo ncurses + ++ [libffi] ++ stdenv.lib.optional (!enableIntegerSimple) gmp ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv ++ stdenv.lib.optional enableDwarf elfutils; @@ -97,17 +103,14 @@ stdenv.mkDerivation (rec { src = fetchgit { url = "https://gitlab.haskell.org/ghc/ghc.git/"; - rev = "0418c38d55c7a47967187dce2db5ea2ab1021b1e"; - sha256 = "1d8g30ii0w4xh6fh61bxbalsqqyanny99nn3p727fx7favnhgvxi"; + rev = "4291bddaea3148908c55f235ee8978e1d9aa6f20"; + sha256 = "1gs3mxmsdpsgsp7vnawx8mys0qwg4x2zhfrbciy3wv8nv13ar1af"; }; enableParallelBuilding = true; outputs = [ "out" "doc" ]; - patches = [ - ]; - postPatch = "patchShebangs ."; # GHC is a bit confused on its cross terminology. @@ -130,8 +133,8 @@ stdenv.mkDerivation (rec { export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" echo -n "${buildMK}" > mk/build.mk - echo ${version} >VERSION - echo ${src.rev} >GIT_COMMIT_ID + echo ${version} > VERSION + echo ${src.rev} > GIT_COMMIT_ID ./boot sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' @@ -161,31 +164,40 @@ stdenv.mkDerivation (rec { # TODO(@Ericson2314): Always pass "--target" and always prefix. configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; + # `--with` flags for libraries needed for RTS linker configureFlags = [ "--datadir=$doc/share/doc/ghc" - "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" + "--with-curses-libraries=${ncurses.out}/lib" + ] ++ stdenv.lib.optionals (libffi != null) [ + "--with-system-libffi" + "--with-ffi-includes=${targetPackages.libffi.dev}/include" + "--with-ffi-libraries=${targetPackages.libffi.out}/lib" ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [ - "--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib" + "--with-gmp-includes=${targetPackages.gmp.dev}/include" + "--with-gmp-libraries=${targetPackages.gmp.out}/lib" ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [ - "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib" + "--with-iconv-includes=${libiconv}/include" + "--with-iconv-libraries=${libiconv}/lib" ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [ "--enable-bootstrap-with-devel-snapshot" ] ++ stdenv.lib.optionals useLdGold [ "CFLAGS=-fuse-ld=gold" "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold" "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold" - ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [ - "--disable-large-address-space" - ] ++ stdenv.lib.optionals enableDwarf [ + ] ++ stdenv.lib.optional disableLargeAddressSpace "--disable-large-address-space" + ++ stdenv.lib.optionals enableDwarf [ "--enable-dwarf-unwind" "--with-libdw-includes=${stdenv.lib.getDev elfutils}/include" "--with-libdw-libraries=${stdenv.lib.getLib elfutils}/lib" ]; - # Make sure we never relax`$PATH` and hooks support for compatability. + # Make sure we never relax`$PATH` and hooks support for compatibility. strictDeps = true; + # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself. + dontAddExtraLibs = true; + nativeBuildInputs = [ perl autoconf autoreconfHook automake m4 python3 sphinx ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index ac22f903c9b56..162d3bd4f8446 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -383,11 +383,38 @@ stdenv.mkDerivation ({ mv tmp "$d" done - for d in $(grep '^dynamic-library-dirs:' "$packageConfDir"/* | cut -d' ' -f2- | tr ' ' '\n' | sort -u); do - for lib in "$d/"*.{dylib,so}; do - ln -s "$lib" "$dynamicLinksDir" + # This function makes the links of shared libraries this package uses, + # and it avoids creating duplicate links for the same file. + # $packageConfDir has conf files for each haskell package this package uses. + # There are the links of shared libraries in dynamic-library-dirs of $packageConfDir. + # The links are duplicated in some haskell packages. + makeDynamicLinks () { + for d in $(grep '^dynamic-library-dirs:' "$packageConfDir"/* | cut -d' ' -f2- | tr ' ' '\n' | sort -u); do + for lib in "$d/"*.{dylib,so} ; do + # When '*.{dylib,so}' does not match anything, '*.{dylib,so}' becomes '*.dylib or *.so' including '*' + # [ -f "$lib" ] checks if the matched path is available. + if [ -f "$lib" ] ; then + local linkPath="$dynamicLinksDir/$(basename "$lib")" + if [ -e "$linkPath" ]; then + # link already exists! but maybe that's OK + if [ ! -L "$linkPath" ] || [ "$(readlink -f "$linkPath")" != "$(readlink -f "$lib")" ]; then + echo >&2 "error: failed to create symbolic link $linkPath: file exists" + echo >&2 " source link: $lib" + echo >&2 " source following link recursively: $(readlink -f "$lib")" + echo >&2 " existing link: $linkPath" + echo >&2 " existing following link recursively: $(readlink -f "$linkPath")" + exit 1 + fi + else + ln -s "$lib" "$linkPath" + fi + fi + done done - done + } + + makeDynamicLinks + # Edit the local package DB to reference the links directory. for f in "$packageConfDir/"*.conf; do sed -i "s,dynamic-library-dirs: .*,dynamic-library-dirs: $dynamicLinksDir," "$f" diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index b7ce5ef637783..f5ccca36ed612 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -6752,8 +6752,8 @@ self: { }: mkDerivation { pname = "GPipe"; - version = "2.2.4"; - sha256 = "0l3s3j41fwwcjdc0nymzqmdsd7wlvaqyn1lg7n1wdx65wy4iz6j0"; + version = "2.2.5"; + sha256 = "1k4hxgd5vpdl9fqjk3i81rcyqn53giahcpygb9lm3nyfvxzzwg3z"; enableSeparateDataOutput = true; libraryHaskellDepends = [ base Boolean containers exception-transformers gl hashtables linear @@ -45006,6 +45006,28 @@ self: { license = stdenv.lib.licenses.bsd3; }) {}; + "butcher_1_3_3_0" = callPackage + ({ mkDerivation, base, bifunctors, containers, deque, extra, free + , hspec, microlens, microlens-th, mtl, multistate, pretty + , transformers, unsafe, void + }: + mkDerivation { + pname = "butcher"; + version = "1.3.3.0"; + sha256 = "1zp0j5ydbnk6x3yblhs9c6z2a3bmh9fvprqhx2wk3wyvrgkwsx8h"; + libraryHaskellDepends = [ + base bifunctors containers deque extra free microlens microlens-th + mtl multistate pretty transformers unsafe void + ]; + testHaskellDepends = [ + base containers deque extra free hspec microlens microlens-th mtl + multistate pretty transformers unsafe + ]; + description = "Chops a command or program invocation into digestable pieces"; + license = stdenv.lib.licenses.bsd3; + hydraPlatforms = stdenv.lib.platforms.none; + }) {}; + "butter" = callPackage ({ mkDerivation, aeson, base, bytestring, containers , forkable-monad, free, HUnit, network-simple, stm @@ -73546,6 +73568,23 @@ self: { license = stdenv.lib.licenses.bsd3; }) {}; + "distributive_0_6_2" = callPackage + ({ mkDerivation, base, base-orphans, Cabal, cabal-doctest, doctest + , generic-deriving, hspec, hspec-discover, tagged, transformers + }: + mkDerivation { + pname = "distributive"; + version = "0.6.2"; + sha256 = "1j93zkfffm6s16kgr0j0z87y5ds28rw0r2gyc5ncwcylvrqy4kl2"; + setupHaskellDepends = [ base Cabal cabal-doctest ]; + libraryHaskellDepends = [ base base-orphans tagged transformers ]; + testHaskellDepends = [ base doctest generic-deriving hspec ]; + testToolDepends = [ hspec-discover ]; + description = "Distributive functors -- Dual to Traversable"; + license = stdenv.lib.licenses.bsd3; + hydraPlatforms = stdenv.lib.platforms.none; + }) {}; + "ditto" = callPackage ({ mkDerivation, base, containers, mtl, semigroups, text, torsor }: mkDerivation { @@ -74032,8 +74071,8 @@ self: { }: mkDerivation { pname = "dobutokO2"; - version = "0.26.0.0"; - sha256 = "04nack12bj26z56jlwrms5idx3x4qp7kif1ff40vwwkq5qwxncbc"; + version = "0.27.0.0"; + sha256 = "1z7ljzgg0ddrg14z53yj3ywrdpdkb8ai9lhmr4cghnidk9vp75cq"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ @@ -114736,6 +114775,36 @@ self: { license = stdenv.lib.licenses.publicDomain; }) {}; + "haskoin-core_0_12_0" = callPackage + ({ mkDerivation, aeson, array, base, base16-bytestring, bytestring + , cereal, conduit, containers, cryptonite, deepseq, entropy + , hashable, hspec, hspec-discover, HUnit, memory, mtl, murmur3 + , network, QuickCheck, safe, scientific, secp256k1-haskell, split + , string-conversions, text, time, transformers + , unordered-containers, vector + }: + mkDerivation { + pname = "haskoin-core"; + version = "0.12.0"; + sha256 = "0fqwvs5wwqlq21sk1rw4dz5gnvfb9fkxhfbl3g5sd76c9r6fvrwc"; + libraryHaskellDepends = [ + aeson array base base16-bytestring bytestring cereal conduit + containers cryptonite deepseq entropy hashable hspec HUnit memory + mtl murmur3 network QuickCheck safe scientific secp256k1-haskell + split string-conversions text time transformers + unordered-containers vector + ]; + testHaskellDepends = [ + aeson base bytestring cereal containers deepseq hspec HUnit mtl + QuickCheck safe split string-conversions text unordered-containers + vector + ]; + testToolDepends = [ hspec-discover ]; + description = "Bitcoin & Bitcoin Cash library for Haskell"; + license = stdenv.lib.licenses.publicDomain; + hydraPlatforms = stdenv.lib.platforms.none; + }) {}; + "haskoin-crypto" = callPackage ({ mkDerivation, base, binary, byteable, bytestring, containers , cryptohash, haskoin-util, HUnit, mtl, QuickCheck, test-framework @@ -145230,8 +145299,8 @@ self: { }: mkDerivation { pname = "juicy-gcode"; - version = "0.1.0.5.1"; - sha256 = "1xdmlgickzg94asqy48ms895prjzyzcn767276f99f7mx9pqb5jr"; + version = "0.1.0.5.2"; + sha256 = "14pd0gl2an4mkxkhcx2ybvzdfx2izcnm05p7p7kncf5wdgmkn0px"; isLibrary = false; isExecutable = true; executableHaskellDepends = [ @@ -214908,15 +214977,15 @@ self: { license = stdenv.lib.licenses.publicDomain; }) {libsecp256k1 = null;}; - "secp256k1-haskell_0_2_0" = callPackage + "secp256k1-haskell_0_2_1" = callPackage ({ mkDerivation, base, base16-bytestring, bytestring, cereal , deepseq, entropy, hashable, hspec, hspec-discover, HUnit , libsecp256k1, mtl, QuickCheck, string-conversions }: mkDerivation { pname = "secp256k1-haskell"; - version = "0.2.0"; - sha256 = "0875vc62r9y5lddnxq5s50xlagz464bnr4j89nz376jyrlg5db7v"; + version = "0.2.1"; + sha256 = "0drqr05zk31061digqzlkylb42lk8m2j9v84k6sfb01gkfrp9cw9"; libraryHaskellDepends = [ base base16-bytestring bytestring cereal deepseq entropy hashable QuickCheck string-conversions diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 052b84f269e6f..aa7ef02a38863 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -81,10 +81,11 @@ in { llvmPackages = pkgs.llvmPackages_9; }; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { - bootPkgs = packages.ghc865Binary; + bootPkgs = packages.ghc883; # no binary yet inherit (buildPackages.python3Packages) sphinx; - buildLlvmPackages = buildPackages.llvmPackages_6; - llvmPackages = pkgs.llvmPackages_6; + buildLlvmPackages = buildPackages.llvmPackages_9; + llvmPackages = pkgs.llvmPackages_9; + libffi = pkgs.libffi; }; ghcjs = compiler.ghcjs86; ghcjs86 = callPackage ../development/compilers/ghcjs-ng {