From fb558eb58aed501a6b46768baf0a50ece6bedeaa Mon Sep 17 00:00:00 2001 From: Joachim Breitner Date: Mon, 20 Sep 2021 09:28:31 +0200 Subject: [PATCH] Bump nixpkgs to latest master (#30) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Experiment: Bump nixpkgs to latest master This is to see if there are problems coming up. Some of the things in nix/haskell-packages.nix can probably be cleaned up now. Originally https://github.com/dfinity-lab/ic-ref/commit/dce1286a900525607fcc21171b82940e3ec3385f * Bump again Originally https://github.com/dfinity-lab/ic-ref/commit/b43f83609fd3a99e0a8ecd8700f4baee0c53b863 * Bump once more Originally https://github.com/dfinity-lab/ic-ref/commit/a0746ed7be49c8f1619e5b75ba84d5c832730cf8 * Fix merge issue * Fix path * Back to master * Try winter master * Remove many haskell package changes * More simplification and upstream cache use * Update freeze file * Less versionoverrides needed * Remove nix/haskell-packages, more DNRY * Fix patch handling * Add .gitattributes to mark generated files as such * s/ / / * Run github actions with ghc-8.10.7 * Fix docs jobs * Fix docs jobs some more * Update cabal.project * Bump candid some more * Checkout before setting up the cache * Fix cabal keys * Don’t set active-repositories in freeze file * Rename workflow * naersk changed it seems * Try pkgsStatic, not pkgsMusl as the latter doesn’t seem to work any more since https://github.com/NixOS/nixpkgs/pull/130441 * Fix static cborg build * Try static-haskell-nix * Revert "Try static-haskell-nix" This reverts commit b375ad43f465a3b0e94cb9dfbd095833799e7428. * Revert "Try pkgsStatic, not pkgsMusl" This reverts commit d1f64f163c0752e0d3ad9eb89d6ecff26b5891ae. * Try pkgsMusl again pulling in https://github.com/NixOS/nixpkgs/pull/138429 * Update freeze file * Right GHC version * Try https://github.com/NixOS/nixpkgs/pull/138524 --- .gitattributes | 2 + .github/workflows/docs.yml | 21 +- .github/workflows/test.yml | 2 +- cabal.project | 4 +- cabal.project.freeze | 192 +++++++++--------- default.nix | 36 +++- nix/default.nix | 33 +-- nix/generate.nix | 17 +- nix/generated/QuickCheck.nix | 29 --- nix/generated/all.nix | 7 + nix/generated/base32.nix | 39 ---- nix/generated/base64-bytestring.nix | 41 ---- nix/generated/candid.nix | 4 +- nix/generated/cborg.nix | 62 ++++++ nix/generated/ic-hs.nix | 2 +- nix/generated/leb128-cereal.nix | 4 +- nix/generated/megaparsec.nix | 43 ---- nix/generated/prettyprinter.nix | 57 ------ nix/generated/random.nix | 57 ------ nix/generated/row-types.nix | 32 --- nix/generated/smallcheck.nix | 10 - nix/generated/splitmix.nix | 53 ----- nix/generated/winter.nix | 4 +- nix/haskell-packages.nix | 62 ------ ...e-binary-distribution-which-links-ag.patch | 80 -------- nix/patches/0002-openblas-0.3.10-0.3.13.patch | 74 ------- ...3991b26b2b93dece6d09f37041451a5ef4cb.patch | 51 ----- nix/sources.json | 28 +-- 28 files changed, 257 insertions(+), 789 deletions(-) create mode 100644 .gitattributes delete mode 100644 nix/generated/QuickCheck.nix create mode 100644 nix/generated/all.nix delete mode 100644 nix/generated/base32.nix delete mode 100644 nix/generated/base64-bytestring.nix create mode 100644 nix/generated/cborg.nix delete mode 100644 nix/generated/megaparsec.nix delete mode 100644 nix/generated/prettyprinter.nix delete mode 100644 nix/generated/random.nix delete mode 100644 nix/generated/row-types.nix delete mode 100644 nix/generated/smallcheck.nix delete mode 100644 nix/generated/splitmix.nix delete mode 100644 nix/haskell-packages.nix delete mode 100644 nix/patches/0001-ghc865-binary-Use-binary-distribution-which-links-ag.patch delete mode 100644 nix/patches/0002-openblas-0.3.10-0.3.13.patch delete mode 100644 nix/patches/fb063991b26b2b93dece6d09f37041451a5ef4cb.patch diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..738779d5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +nix/generated/* linguist-generated +cabal.project.freeze linguist-generated diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 09aa2c3a..eb4fe047 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,32 +1,27 @@ -name: Haskell CI +name: Build and deploy docs on: [push, pull_request] jobs: docs: - strategy: - matrix: - ghc: - - '8.8.4' runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v1 name: Cache ~/.cabal/store with: path: ~/.cabal/store - key: cabal-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project', 'cabal.project.freeze') }} - restore-keys: cabal-${{ runner.os }}-${{ matrix.ghc }}- + key: cabal-${{ runner.os }}-${{ hashFiles('cabal.project', 'cabal.project.freeze') }} + restore-keys: cabal-${{ runner.os }}- - - uses: actions/checkout@v2 - - uses: actions/setup-haskell@v1 + - uses: haskell/actions/setup@v1 with: - ghc-version: ${{ matrix.ghc }} + ghc-version: '8.10' - name: Build run: | - ls -l /opt/ghc/ - export PATH=/opt/ghc/bin:$PATH cabal --version ghc --version cabal update - cabal haddock -w ghc-${{ matrix.ghc }} --haddock-hyperlink-source --haddock-quickjump --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs' + cabal haddock --haddock-hyperlink-source --haddock-quickjump --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs' mv dist-newstyle/build/*/*/*/doc/html/ic-hs gh-page touch gh-page/.nojekyll - name: Deploy to Github Pages diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5d74e859..39c3b817 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,9 +27,9 @@ jobs: - run: nix-build-uncached -A ic-hs-coverage - run: nix-build-uncached -A coverage - run: nix-build-uncached -A check-generated - - run: nix-build-uncached -A check-cabal-freeze - run: nix-build-uncached -A ic-ref-dist - run: nix-build-uncached -A ic-ref-test - run: nix-build-uncached -A ic-hs-shell + - run: nix-build-uncached -A check-cabal-freeze # now the rest - run: nix-build-uncached diff --git a/cabal.project b/cabal.project index d5b45832..769e0c27 100644 --- a/cabal.project +++ b/cabal.project @@ -3,9 +3,9 @@ packages: . source-repository-package type: git location: https://github.com/dfinity-side-projects/winter - tag: 2cc31576fe029d85c37d21fc9ea4902c5c64b5a9 + tag: e62722796e11760947a94285734e7bc29d72c389 source-repository-package type: git location: https://github.com/nomeata/haskell-candid - tag: 01157c50ec29b1f8ab35ca27f38dc592ed5406f9 + tag: 1b0279928ac05ecabb0c913449b10c9559a0ec45 diff --git a/cabal.project.freeze b/cabal.project.freeze index 4b355b1b..fe2ba73f 100644 --- a/cabal.project.freeze +++ b/cabal.project.freeze @@ -1,164 +1,171 @@ -- Run nix-shell . -A check-cabal-freeze to update this file -constraints: any.FloatingHex ==0.4, - any.HUnit ==1.6.0.0, - any.MonadRandom ==0.5.2, +constraints: any.FloatingHex ==0.5, + any.HUnit ==1.6.2.0, + any.MonadRandom ==0.5.3, any.QuickCheck ==2.14.2, - any.StateVar ==1.2, - any.aeson ==1.4.7.1, - any.ansi-terminal ==0.10.3, + any.StateVar ==1.2.2, + any.aeson ==1.5.6.0, + any.ansi-terminal ==0.11, any.ansi-wl-pprint ==0.6.9, any.appar ==0.1.8, any.array ==0.5.4.0, any.asn1-encoding ==0.9.6, any.asn1-parse ==0.9.5, any.asn1-types ==0.3.4, - any.async ==2.2.2, + any.assoc ==1.0.2, + any.async ==2.2.3, any.atomic-write ==0.2.0.7, - any.attoparsec ==0.13.2.4, + any.attoparsec ==0.13.2.5, any.auto-update ==0.1.6, - any.base ==4.13.0.0, - any.base-compat ==0.11.1, - any.base-compat-batteries ==0.11.1, - any.base-orphans ==0.8.2, - any.base16-bytestring ==0.1.1.7, - any.base32 ==0.1.1.2, + any.base ==4.14.3.0, + any.base-compat ==0.11.2, + any.base-compat-batteries ==0.11.2, + any.base-orphans ==0.8.5, + any.base16-bytestring ==1.0.1.0, + any.base32 ==0.2.1.0, any.base64-bytestring ==1.1.0.0, - any.basement ==0.0.11, - any.bifunctors ==5.5.7, - any.binary ==0.8.7.0, + any.basement ==0.0.12, + any.bifunctors ==5.5.11, + any.binary ==0.8.8.0, any.bindings-DSL ==1.0.25, - any.blaze-builder ==0.4.1.0, + any.blaze-builder ==0.4.2.1, any.blaze-html ==0.9.1.2, - any.blaze-markup ==0.8.2.7, + any.blaze-markup ==0.8.2.8, any.bsb-http-chunked ==0.0.0.4, any.byte-order ==0.1.2.0, any.byteorder ==1.0.4, - any.bytestring ==0.10.10.1, - any.call-stack ==0.2.0, + any.bytestring ==0.10.12.0, + any.call-stack ==0.3.0, any.candid ==0.2, any.case-insensitive ==1.2.1.0, any.cborg ==0.2.4.0, any.cereal ==0.5.8.1, - any.clock ==0.8, - any.colour ==2.3.5, - any.comonad ==5.0.6, + any.clock ==0.8.2, + any.colour ==2.3.6, + any.comonad ==5.0.8, any.connection ==0.3.1, - any.constraints ==0.12, - any.containers ==0.6.2.1, - any.contravariant ==1.5.2, + any.constraints ==0.13, + any.containers ==0.6.5.1, + any.contravariant ==1.5.5, any.cookie ==0.4.5, - any.crc ==0.1.0.0, - any.cryptonite ==0.27, + any.crc ==0.1.1.1, + any.cryptonite ==0.29, any.data-default-class ==0.1.2.0, - any.data-fix ==0.2.1, + any.data-fix ==0.3.2, any.deepseq ==1.4.4.0, any.directory ==1.3.6.0, - any.distributive ==0.6.2, - any.dlist ==0.8.0.8, + any.distributive ==0.6.2.1, + any.dlist ==1.0, any.easy-file ==0.2.2, any.ed25519 ==0.0.5.0, any.exceptions ==0.10.4, - any.fast-logger ==3.0.1, - any.file-embed ==0.0.11.2, + any.fast-logger ==3.0.5, + any.file-embed ==0.0.15.0, any.filepath ==1.4.2.1, - any.generic-deriving ==1.13.1, - any.generic-lens ==2.0.0.0, - any.generic-lens-core ==2.0.0.0, - any.ghc-boot-th ==8.8.4, - any.ghc-prim ==0.5.3, - any.half ==0.3, + any.generic-deriving ==1.14.1, + any.generic-lens ==2.1.0.0, + any.generic-lens-core ==2.1.0.0, + any.ghc-boot-th ==8.10.7, + any.ghc-byteorder ==4.11.0.0.10, + any.ghc-prim ==0.6.1, + any.half ==0.3.1, any.hashable ==1.3.0.0, - any.hex-text ==0.1.0.0, + any.hex-text ==0.1.0.4, any.hourglass ==0.2.12, any.http-client ==0.6.4.1, any.http-client-tls ==0.3.5.3, - any.http-date ==0.0.8, + any.http-date ==0.0.11, any.http-types ==0.12.3, - any.http2 ==2.0.5, + any.http2 ==3.0.2, ic-hs +library -release, - any.indexed-profunctors ==0.1, - any.integer-gmp ==1.0.2.0, - any.integer-logarithms ==1.0.3, - any.iproute ==1.7.9, + any.indexed-profunctors ==0.1.1, + any.indexed-traversable ==0.1.1, + any.integer-gmp ==1.0.3.0, + any.integer-logarithms ==1.0.3.1, + any.iproute ==1.7.11, any.leb128-cereal ==1.2, any.lifted-base ==0.2.3.12, - any.megaparsec ==8.0.0, + any.megaparsec ==9.0.1, any.memory ==0.15.0, - any.microlens ==0.4.11.2, - any.microlens-ghc ==0.4.12, + any.microlens ==0.4.12.0, + any.microlens-ghc ==0.4.13, any.microlens-mtl ==0.2.0.1, - any.microlens-platform ==0.4.1, - any.microlens-th ==0.4.3.5, + any.microlens-platform ==0.4.2, + any.microlens-th ==0.4.3.10, any.mime-types ==0.1.0.9, - any.monad-control ==1.0.2.3, + any.monad-control ==1.0.3.1, any.mtl ==2.2.2, any.nats ==1.1.2, any.network ==3.1.1.1, - any.network-byte-order ==0.1.5, - any.network-uri ==2.6.3.0, + any.network-byte-order ==0.1.6, + any.network-uri ==2.6.4.1, any.old-locale ==1.0.0.7, any.old-time ==1.1.0.3, - any.optparse-applicative ==0.15.1.0, + any.optparse-applicative ==0.16.1.0, any.parallel ==3.2.2.0, any.parsec ==3.1.14.0, any.parser-combinators ==1.2.1, any.pem ==0.2.4, any.pretty ==1.1.3.6, any.prettyprinter ==1.7.0, - any.primitive ==0.7.0.1, + any.primitive ==0.7.2.0, any.primitive-unaligned ==0.1.1.1, - any.process ==1.6.9.0, - any.profunctors ==5.5.2, + any.process ==1.6.13.2, + any.profunctors ==5.6.2, any.psqueues ==0.2.7.2, any.quickcheck-io ==0.2.0, any.random ==1.2.0, - any.resourcet ==1.2.4.2, - any.row-types ==1.0.1.0, - any.rts ==1.0, - any.scientific ==0.3.6.2, - any.semigroups ==0.19.1, + any.resourcet ==1.2.4.3, + any.row-types ==1.0.1.2, + any.rts ==1.0.1, + any.scientific ==0.3.7.0, + any.semigroups ==0.19.2, any.serialise ==0.2.3.0, any.simple-sendfile ==0.2.30, any.socks ==0.6.1, any.split ==0.2.3.4, any.splitmix ==0.1.0.3, - any.stm ==2.5.0.0, + any.stm ==2.5.0.1, any.streaming-commons ==0.2.2.1, - any.tagged ==0.8.6, - any.tasty ==1.2.3, - any.tasty-ant-xml ==1.1.6, - any.tasty-html ==0.4.1.2, - any.tasty-hunit ==0.10.0.2, - any.tasty-quickcheck ==0.10.1.1, - any.tasty-rerun ==1.1.17, - any.template-haskell ==2.15.0.0, + any.strict ==0.4.0.1, + any.tagged ==0.8.6.1, + any.tasty ==1.4.2, + any.tasty-ant-xml ==1.1.8, + any.tasty-html ==0.4.1.4, + any.tasty-hunit ==0.10.0.3, + any.tasty-quickcheck ==0.10.1.2, + any.tasty-rerun ==1.1.18, + any.template-haskell ==2.16.0.0, any.temporary ==1.3, - any.text ==1.2.4.0, - any.th-abstraction ==0.3.2.0, + any.text ==1.2.4.1, + any.text-short ==0.1.3, + any.th-abstraction ==0.4.3.0, + any.th-compat ==0.1.3, + any.these ==1.1.1.1, any.time ==1.9.3, - any.time-compat ==1.9.3, + any.time-compat ==1.9.5, any.time-manager ==0.0.0, - any.tls ==1.5.4, + any.tls ==1.5.5, any.transformers ==0.5.6.2, - any.transformers-base ==0.4.5.2, - any.transformers-compat ==0.6.5, + any.transformers-base ==0.4.6, + any.transformers-compat ==0.6.6, any.type-equality ==1, any.uglymemo ==0.1.0.1, - any.unbounded-delays ==0.1.1.0, + any.unbounded-delays ==0.1.1.1, any.unix ==2.7.2.2, - any.unix-compat ==0.5.2, + any.unix-compat ==0.5.3, any.unix-time ==0.4.7, - any.unliftio-core ==0.1.2.0, - any.unordered-containers ==0.2.10.0, - any.utf8-string ==1.0.1.1, - any.uuid-types ==1.0.3, - any.vault ==0.3.1.4, - any.vector ==0.12.1.2, - any.void ==0.7.3, - any.wai ==3.2.2.1, - any.wai-extra ==3.0.29.2, + any.unliftio ==0.2.20, + any.unliftio-core ==0.2.0.1, + any.unordered-containers ==0.2.14.0, + any.utf8-string ==1.0.2, + any.uuid-types ==1.0.5, + any.vault ==0.3.1.5, + any.vector ==0.12.3.0, + any.wai ==3.2.3, + any.wai-extra ==3.1.6, any.wai-logger ==2.3.6, - any.warp ==3.3.13, + any.warp ==3.3.17, any.wcwidth ==0.0.2, any.winter ==1.0.0, any.word8 ==0.1.3, @@ -167,4 +174,5 @@ constraints: any.FloatingHex ==0.4, any.x509-system ==1.6.6, any.x509-validation ==1.6.11, any.xml ==1.3.14, - any.zlib ==0.6.2.2 + any.zlib ==0.6.2.3 +index-state: HEAD diff --git a/default.nix b/default.nix index 4b5f8618..9bf759d1 100644 --- a/default.nix +++ b/default.nix @@ -6,26 +6,36 @@ let nixpkgs = import ./nix { inherit system; }; in let stdenv = nixpkgs.stdenv; in let subpath = nixpkgs.subpath; in -let naersk = nixpkgs.callPackage nixpkgs.sources.naersk {}; in +let naersk = nixpkgs.callPackage nixpkgs.sources.naersk { rustc = nixpkgs.rustc-wasm; }; in let universal-canister = (naersk.buildPackage rec { name = "universal-canister"; src = subpath ./universal-canister; root = ./universal-canister; - CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "${nixpkgs.llvmPackages_9.lld}/bin/lld"; + CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "${nixpkgs.llvmPackages_11.lld}/bin/lld"; RUSTFLAGS = "-C link-arg=-s"; # much smaller wasm cargoBuildOptions = x : x ++ [ "--target wasm32-unknown-unknown" ]; doCheck = false; release = true; }).overrideAttrs (old: { postFixup = (old.postFixup or "") + '' - mv $out/bin/universal_canister $out/universal_canister.wasm + mv $out/bin/universal_canister.wasm $out/universal_canister.wasm rmdir $out/bin ''; }); in let haskellPackages = nixpkgs.haskellPackages.override { - overrides = import nix/haskell-packages.nix nixpkgs subpath; + overrides = self: super: + let generated = import nix/generated/all.nix self super; in + generated // + { + # the downgrade of cborg in nix/generated.nix makes cborgs test suite depend on + # older versions of stuff, so let’s ignore the test suite. + cborg = nixpkgs.haskell.lib.dontCheck generated.cborg; + + # here more adjustments can be made if needed, e.g. + # crc = nixpkgs.haskell.lib.markUnbroken (nixpkgs.haskell.lib.dontCheck super.crc); + }; }; in let @@ -80,17 +90,27 @@ let # (once we can use ghc-9.0 we can maybe use ghc-bignum native, which should be faster) else let - muslHaskellPackages = nixpkgs.pkgsMusl.haskell.packages.integer-simple.ghc884.override { + muslHaskellPackages = nixpkgs.pkgsMusl.haskell.packages.integer-simple.ghc8107.override { overrides = self: super: - import nix/haskell-packages.nix nixpkgs subpath self super - // { + let generated = import nix/generated/all.nix self super; in + generated // + { + # the downgrade of cborg in nix/generated.nix makes cborgs test suite depend on + # older versions of stuff, so let’s ignore the test suite. + cborg = nixpkgs.haskell.lib.dontCheck ( + generated.cborg.overrideAttrs(old: { + configureFlags = ["-f-optimize-gmp"]; + })); + cryptonite = super.cryptonite.overrideAttrs(old: { configureFlags = "-f-integer-gmp"; doCheck = false; # test suite too slow without integer-gmp }); + # more test suites too slow withour integer-gmp scientific = nixpkgs.haskell.lib.dontCheck super.scientific; math-functions = nixpkgs.haskell.lib.dontCheck super.math-functions; + }; }; ic-hs-musl = @@ -180,7 +200,7 @@ rec { installPhase = '' mkdir -p $out echo "-- Run nix-shell . -A check-cabal-freeze to update this file" > $out/cabal.project.freeze - cat cabal.project.freeze >> $out/cabal.project.freeze + cat cabal.project.freeze |grep -v active-repositories >> $out/cabal.project.freeze ''; }); diff --git a/nix/default.nix b/nix/default.nix index 0111b351..3fbcdbed 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -6,19 +6,19 @@ let }; nixpkgs_src = (import sourcesnix { sourcesFile = ./sources.json; inherit pkgs; }).nixpkgs; - bootstrap-pkgs = import nixpkgs_src { - system = builtins.currentSystem; - }; + # dump nixpkgs patches here + nixpkgs-patches = []; - nixpkgs-patched = bootstrap-pkgs.applyPatches { - name = "nixpkgs-patched"; - src = nixpkgs_src; - patches = [ - ./patches/0001-ghc865-binary-Use-binary-distribution-which-links-ag.patch - ./patches/0002-openblas-0.3.10-0.3.13.patch - ./patches/fb063991b26b2b93dece6d09f37041451a5ef4cb.patch - ]; - }; + nixpkgs-patched = if nixpkgs-patches == [] then nixpkgs_src else + let + bootstrap-pkgs = import nixpkgs_src { + system = builtins.currentSystem; + }; + in bootstrap-pkgs.applyPatches { + name = "nixpkgs-patched"; + src = nixpkgs_src; + patches = nixpkgs-patches; + }; pkgs = import nixpkgs-patched { @@ -32,12 +32,15 @@ let # nixpkgs's rustc does not inclue the wasm32-unknown-unknown target, so # lets add it here. With this we can build the universal canister with stock # nixpkgs + naersk, in particular no dependency on internal repositories. - rustc = super.rustc.overrideAttrs (old: { + # But rename this so that we do not rebuilt unrelated tools written in rust. + rustc-wasm = super.rustc.overrideAttrs (old: { configureFlags = self.lib.lists.forEach old.configureFlags (flag: if self.lib.strings.hasPrefix "--target=" flag then flag + ",wasm32-unknown-unknown" - else flag - ); + else flag) ++ [ + # https://github.com/rust-lang/rust/issues/76526 + "--set=build.docs=false" + ]; }); all-cabal-hashes = self.fetchurl { diff --git a/nix/generate.nix b/nix/generate.nix index b9cc7637..c7465c78 100644 --- a/nix/generate.nix +++ b/nix/generate.nix @@ -70,15 +70,11 @@ let src_subst = "pkgs.sources.haskell-candid"; }; - base32 = pkgs.haskellPackages.hackage2nix "base32" "0.1.1.2"; - megaparsec = pkgs.haskellPackages.hackage2nix "megaparsec" "8.0.0"; - base64-bytestring = pkgs.haskellPackages.hackage2nix "base64-bytestring" "1.1.0.0"; - random = pkgs.haskellPackages.hackage2nix "random" "1.2.0"; - splitmix = pkgs.haskellPackages.hackage2nix "splitmix" "0.1.0.3"; - QuickCheck = pkgs.haskellPackages.hackage2nix "QuickCheck" "2.14.2"; - row-types = pkgs.haskellPackages.hackage2nix "row-types" "1.0.1.0"; - smallcheck = pkgs.haskellPackages.hackage2nix "smallcheck" "1.2.1"; - prettyprinter = pkgs.haskellPackages.hackage2nix "prettyprinter" "1.7.0"; + # To pull other versios from hackage: + + # 0.2.5.0 broke with ghc-8.10 and integer-simple, + # see https://github.com/well-typed/cborg/issues/267 + cborg = pkgs.haskellPackages.hackage2nix "cborg" "0.2.4.0"; }; allGenerated = pkgs.runCommandNoCC "generated" { @@ -86,13 +82,16 @@ let } ( '' mkdir -p $out + echo 'self: super: {' >> $out/all.nix '' + builtins.concatStringsSep "" ( pkgs.lib.flip pkgs.lib.mapAttrsToList packages ( n: pkg: '' cp ${pkg}/default.nix $out/${n}.nix + echo ' ${n} = super.callPackage ./${n}.nix { };' >> $out/all.nix '' ) ) + '' + echo '}' >> $out/all.nix chmod u+w $out/*.nix nixpkgs-fmt $out/*.nix cat <<__END__ > $out/README.md diff --git a/nix/generated/QuickCheck.nix b/nix/generated/QuickCheck.nix deleted file mode 100644 index 3ba1dffe..00000000 --- a/nix/generated/QuickCheck.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ mkDerivation -, base -, containers -, deepseq -, process -, random -, splitmix -, stdenv -, template-haskell -, transformers -}: -mkDerivation { - pname = "QuickCheck"; - version = "2.14.2"; - sha256 = "d87b6c85696b601175274361fa62217894401e401e150c3c5d4013ac53cd36f3"; - libraryHaskellDepends = [ - base - containers - deepseq - random - splitmix - template-haskell - transformers - ]; - testHaskellDepends = [ base deepseq process ]; - homepage = "https://github.com/nick8325/quickcheck"; - description = "Automatic testing of Haskell programs"; - license = stdenv.lib.licenses.bsd3; -} diff --git a/nix/generated/all.nix b/nix/generated/all.nix new file mode 100644 index 00000000..d353a76d --- /dev/null +++ b/nix/generated/all.nix @@ -0,0 +1,7 @@ +self: super: { + candid = super.callPackage ./candid.nix { }; + cborg = super.callPackage ./cborg.nix { }; + ic-hs = super.callPackage ./ic-hs.nix { }; + leb128-cereal = super.callPackage ./leb128-cereal.nix { }; + winter = super.callPackage ./winter.nix { }; +} diff --git a/nix/generated/base32.nix b/nix/generated/base32.nix deleted file mode 100644 index ddf73a32..00000000 --- a/nix/generated/base32.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ mkDerivation -, base -, bytestring -, criterion -, deepseq -, memory -, random-bytestring -, stdenv -, tasty -, tasty-hunit -, text -}: -mkDerivation { - pname = "base32"; - version = "0.1.1.2"; - sha256 = "0e6211a58cccbaae9c583c800d99db421cdb259170693a82ad9aa2afd795dfd6"; - libraryHaskellDepends = [ base bytestring text ]; - testHaskellDepends = [ - base - bytestring - memory - random-bytestring - tasty - tasty-hunit - text - ]; - benchmarkHaskellDepends = [ - base - bytestring - criterion - deepseq - memory - random-bytestring - text - ]; - homepage = "https://github.com/emilypi/base32"; - description = "RFC 4648-compliant Base32 encodings/decodings"; - license = stdenv.lib.licenses.bsd3; -} diff --git a/nix/generated/base64-bytestring.nix b/nix/generated/base64-bytestring.nix deleted file mode 100644 index f506b856..00000000 --- a/nix/generated/base64-bytestring.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ mkDerivation -, base -, bytestring -, containers -, criterion -, deepseq -, HUnit -, QuickCheck -, split -, stdenv -, test-framework -, test-framework-hunit -, test-framework-quickcheck2 -}: -mkDerivation { - pname = "base64-bytestring"; - version = "1.1.0.0"; - sha256 = "210d6c9042241ca52ee5d89cf221dbeb4d0e64b37391345369035ad2d9b4aca9"; - libraryHaskellDepends = [ base bytestring ]; - testHaskellDepends = [ - base - bytestring - containers - HUnit - QuickCheck - split - test-framework - test-framework-hunit - test-framework-quickcheck2 - ]; - benchmarkHaskellDepends = [ - base - bytestring - containers - criterion - deepseq - ]; - homepage = "https://github.com/haskell/base64-bytestring"; - description = "Fast base64 encoding and decoding for ByteStrings"; - license = stdenv.lib.licenses.bsd3; -} diff --git a/nix/generated/candid.nix b/nix/generated/candid.nix index cb3c64a7..5abc7db5 100644 --- a/nix/generated/candid.nix +++ b/nix/generated/candid.nix @@ -17,6 +17,7 @@ , filepath , hex-text , leb128-cereal +, lib , megaparsec , mtl , optparse-applicative @@ -26,7 +27,6 @@ , scientific , smallcheck , split -, stdenv , tasty , tasty-hunit , tasty-quickcheck @@ -99,5 +99,5 @@ mkDerivation { ]; homepage = "https://github.com/dfinity/candid"; description = "Candid integration"; - license = stdenv.lib.licenses.asl20; + license = lib.licenses.asl20; } diff --git a/nix/generated/cborg.nix b/nix/generated/cborg.nix new file mode 100644 index 00000000..8b5bf577 --- /dev/null +++ b/nix/generated/cborg.nix @@ -0,0 +1,62 @@ +{ mkDerivation +, aeson +, array +, base +, base-orphans +, base16-bytestring +, base64-bytestring +, bytestring +, containers +, deepseq +, ghc-prim +, half +, integer-gmp +, lib +, primitive +, QuickCheck +, random +, scientific +, tasty +, tasty-hunit +, tasty-quickcheck +, text +, vector +}: +mkDerivation { + pname = "cborg"; + version = "0.2.4.0"; + sha256 = "34ae38afffa078f8d394325937d0e15431069d4428a7449f6af9d2d16539367f"; + libraryHaskellDepends = [ + array + base + bytestring + containers + deepseq + ghc-prim + half + integer-gmp + primitive + text + ]; + testHaskellDepends = [ + aeson + array + base + base-orphans + base16-bytestring + base64-bytestring + bytestring + deepseq + half + QuickCheck + random + scientific + tasty + tasty-hunit + tasty-quickcheck + text + vector + ]; + description = "Concise Binary Object Representation (CBOR)"; + license = lib.licenses.bsd3; +} diff --git a/nix/generated/ic-hs.nix b/nix/generated/ic-hs.nix index 7e9fc923..310f57a5 100644 --- a/nix/generated/ic-hs.nix +++ b/nix/generated/ic-hs.nix @@ -29,6 +29,7 @@ , http-client-tls , http-types , leb128-cereal +, lib , memory , MonadRandom , mtl @@ -43,7 +44,6 @@ , serialise , split , splitmix -, stdenv , tasty , tasty-ant-xml , tasty-html diff --git a/nix/generated/leb128-cereal.nix b/nix/generated/leb128-cereal.nix index 312740cb..57adbdc3 100644 --- a/nix/generated/leb128-cereal.nix +++ b/nix/generated/leb128-cereal.nix @@ -6,7 +6,7 @@ , base , bytestring , cereal -, stdenv +, lib , tasty , tasty-hunit , tasty-quickcheck @@ -24,5 +24,5 @@ mkDerivation { tasty-quickcheck ]; description = "LEB128 and SLEB128 encoding"; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/nix/generated/megaparsec.nix b/nix/generated/megaparsec.nix deleted file mode 100644 index 458f5e9d..00000000 --- a/nix/generated/megaparsec.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ mkDerivation -, base -, bytestring -, case-insensitive -, containers -, criterion -, deepseq -, mtl -, parser-combinators -, scientific -, stdenv -, text -, transformers -, weigh -}: -mkDerivation { - pname = "megaparsec"; - version = "8.0.0"; - sha256 = "b5d7c64646016d12f540a6948396a86e0cd39865569d68fe2018fe9e3fce6318"; - libraryHaskellDepends = [ - base - bytestring - case-insensitive - containers - deepseq - mtl - parser-combinators - scientific - text - transformers - ]; - benchmarkHaskellDepends = [ - base - containers - criterion - deepseq - text - weigh - ]; - homepage = "https://github.com/mrkkrp/megaparsec"; - description = "Monadic parser combinators"; - license = stdenv.lib.licenses.bsd2; -} diff --git a/nix/generated/prettyprinter.nix b/nix/generated/prettyprinter.nix deleted file mode 100644 index 710d1033..00000000 --- a/nix/generated/prettyprinter.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ mkDerivation -, ansi-wl-pprint -, base -, base-compat -, bytestring -, containers -, deepseq -, doctest -, gauge -, mtl -, pgp-wordlist -, QuickCheck -, quickcheck-instances -, random -, stdenv -, tasty -, tasty-hunit -, tasty-quickcheck -, text -, transformers -}: -mkDerivation { - pname = "prettyprinter"; - version = "1.7.0"; - sha256 = "591b87ce8a5cff39d66cb1c156c7d27d04de57952f16eb3ce3afe309ac26e0a7"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ base text ]; - testHaskellDepends = [ - base - bytestring - doctest - pgp-wordlist - QuickCheck - quickcheck-instances - tasty - tasty-hunit - tasty-quickcheck - text - ]; - benchmarkHaskellDepends = [ - ansi-wl-pprint - base - base-compat - containers - deepseq - gauge - mtl - QuickCheck - random - text - transformers - ]; - homepage = "http://github.com/quchen/prettyprinter"; - description = "A modern, easy to use, well-documented, extensible pretty-printer"; - license = stdenv.lib.licenses.bsd2; -} diff --git a/nix/generated/random.nix b/nix/generated/random.nix deleted file mode 100644 index aed69e28..00000000 --- a/nix/generated/random.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ mkDerivation -, base -, bytestring -, containers -, deepseq -, doctest -, gauge -, mtl -, mwc-random -, primitive -, rdtsc -, smallcheck -, split -, splitmix -, stdenv -, tasty -, tasty-expected-failure -, tasty-hunit -, tasty-smallcheck -, time -, unliftio -, vector -}: -mkDerivation { - pname = "random"; - version = "1.2.0"; - sha256 = "e4519cf7c058bfd5bdbe4acc782284acc9e25e74487208619ca83cbcd63fb9de"; - revision = "5"; - editedCabalFile = "1jai1pcs39ijdhxc8q36x1yayr8rsblhx3y88paf4bqxrks2vmrh"; - libraryHaskellDepends = [ base bytestring deepseq mtl splitmix ]; - testHaskellDepends = [ - base - bytestring - containers - doctest - mwc-random - primitive - smallcheck - tasty - tasty-expected-failure - tasty-hunit - tasty-smallcheck - unliftio - vector - ]; - benchmarkHaskellDepends = [ - base - gauge - mtl - rdtsc - split - splitmix - time - ]; - description = "Pseudo-random number generation"; - license = stdenv.lib.licenses.bsd3; -} diff --git a/nix/generated/row-types.nix b/nix/generated/row-types.nix deleted file mode 100644 index 75105d61..00000000 --- a/nix/generated/row-types.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ mkDerivation -, base -, constraints -, deepseq -, gauge -, generic-lens -, hashable -, profunctors -, stdenv -, text -, unordered-containers -}: -mkDerivation { - pname = "row-types"; - version = "1.0.1.0"; - sha256 = "42e83595be831a7194ea50e8293aec8b9236f8dad68a2e769294415b8d0e5357"; - libraryHaskellDepends = [ - base - constraints - deepseq - generic-lens - hashable - profunctors - text - unordered-containers - ]; - testHaskellDepends = [ base generic-lens ]; - benchmarkHaskellDepends = [ base deepseq gauge ]; - homepage = "https://github.com/target/row-types"; - description = "Open Records and Variants"; - license = stdenv.lib.licenses.mit; -} diff --git a/nix/generated/smallcheck.nix b/nix/generated/smallcheck.nix deleted file mode 100644 index 9950772d..00000000 --- a/nix/generated/smallcheck.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ mkDerivation, base, logict, mtl, pretty, stdenv }: -mkDerivation { - pname = "smallcheck"; - version = "1.2.1"; - sha256 = "e41f9d11b50e0526dd28c9bc6cf6dddf98cebd782911a00c3e5cbe4ce53fc869"; - libraryHaskellDepends = [ base logict mtl pretty ]; - homepage = "https://github.com/Bodigrim/smallcheck"; - description = "A property-based testing library"; - license = stdenv.lib.licenses.bsd3; -} diff --git a/nix/generated/splitmix.nix b/nix/generated/splitmix.nix deleted file mode 100644 index d6bdd776..00000000 --- a/nix/generated/splitmix.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ mkDerivation -, async -, base -, base-compat -, base-compat-batteries -, bytestring -, clock -, containers -, criterion -, deepseq -, HUnit -, math-functions -, process -, random -, stdenv -, test-framework -, test-framework-hunit -, tf-random -, vector -}: -mkDerivation { - pname = "splitmix"; - version = "0.1.0.3"; - sha256 = "46009f4b000c9e6613377767b8718bf38476469f2a8e2162d98cc246882d5a35"; - libraryHaskellDepends = [ base deepseq ]; - testHaskellDepends = [ - async - base - base-compat - base-compat-batteries - bytestring - containers - deepseq - HUnit - math-functions - process - random - test-framework - test-framework-hunit - tf-random - vector - ]; - benchmarkHaskellDepends = [ - base - clock - containers - criterion - random - tf-random - ]; - description = "Fast Splittable PRNG"; - license = stdenv.lib.licenses.bsd3; -} diff --git a/nix/generated/winter.nix b/nix/generated/winter.nix index c4dcaa65..210df148 100644 --- a/nix/generated/winter.nix +++ b/nix/generated/winter.nix @@ -16,6 +16,7 @@ , directory , filepath , FloatingHex +, lib , lifted-base , microlens-platform , monad-control @@ -25,7 +26,6 @@ , primitive , primitive-unaligned , process -, stdenv , tasty , tasty-hunit , tasty-quickcheck @@ -105,5 +105,5 @@ mkDerivation { doCheck = false; homepage = "https://github.com/dfinity/winter"; description = "Haskell port of the WebAssembly OCaml reference interpreter"; - license = stdenv.lib.licenses.mit; + license = lib.licenses.mit; } diff --git a/nix/haskell-packages.nix b/nix/haskell-packages.nix deleted file mode 100644 index b33428cb..00000000 --- a/nix/haskell-packages.nix +++ /dev/null @@ -1,62 +0,0 @@ -nix: subpath: - self: super: { - winter = super.callPackage generated/winter.nix {}; - ic-hs = super.callPackage generated/ic-hs.nix {}; - leb128-cereal = super.callPackage generated/leb128-cereal.nix {}; - candid = super.callPackage generated/candid.nix {}; - - # no base32 in nixos-20.03 - base32 = super.callPackage generated/base32.nix {}; - - # need newer version - base64-bytestring = nix.haskell.lib.dontCheck (super.callPackage generated/base64-bytestring.nix {}); - random = nix.haskell.lib.dontCheck (super.callPackage generated/random.nix {}); - splitmix = nix.haskell.lib.dontCheck (super.callPackage generated/splitmix.nix {}); - QuickCheck = super.callPackage generated/QuickCheck.nix {}; - megaparsec = super.callPackage generated/megaparsec.nix {}; - row-types = super.callPackage generated/row-types.nix {}; - smallcheck = super.callPackage generated/smallcheck.nix {}; - prettyprinter = nix.haskell.lib.dontCheck (super.callPackage generated/prettyprinter.nix {}); - - # Only the test suite of crc is broken - # https://github.com/MichaelXavier/crc/issues/2 - crc = nix.haskell.lib.markUnbroken (nix.haskell.lib.dontCheck super.crc); - - # We want random-1.2, but a lot of packages do not like that yet, - # luckily mostly in the test suite. Hence this set of fix-ups: - # (Remove when going to a nipxkgs that has random-1.2) - - # Wants testing-framework, not compatible with random-1.2 - test-framework-quickcheck2 = nix.haskell.lib.markBroken super.test-framework-quickcheck2; - Glob = nix.haskell.lib.dontCheck super.Glob; - SHA = nix.haskell.lib.dontCheck super.SHA; - blaze-builder = nix.haskell.lib.dontCheck super.blaze-builder; - blaze-html = nix.haskell.lib.dontCheck super.blaze-html; - cereal = nix.haskell.lib.dontCheck super.cereal; - either = nix.haskell.lib.dontCheck super.either; - exceptions = nix.haskell.lib.dontCheck super.exceptions; - hashable = nix.haskell.lib.dontCheck super.hashable; - unordered-containers = nix.haskell.lib.dontCheck super.unordered-containers; - monad-par = nix.haskell.lib.dontCheck super.monad-par; - cassava = nix.haskell.lib.dontCheck super.cassava; - network-uri = nix.haskell.lib.dontCheck super.network-uri; - pem = nix.haskell.lib.dontCheck super.pem; - pureMD5 = nix.haskell.lib.dontCheck super.pureMD5; - - # hedgehog wants older random - hedgehog = nix.haskell.lib.markBroken super.hedgehog; - bsb-http-chunked = nix.haskell.lib.dontCheck super.bsb-http-chunked; - retry = nix.haskell.lib.dontCheck super.retry; - - # wants older quickcheck - quickcheck-instances = nix.haskell.lib.markBroken super.quickcheck-instances; - aeson = nix.haskell.lib.dontCheck super.aeson; - http-types = nix.haskell.lib.dontCheck super.http-types; - vector-builder = nix.haskell.lib.dontCheck super.vector-builder; - serialise = nix.haskell.lib.dontCheck super.serialise; - - # not compatible with latest quickcheck - psqueues = nix.haskell.lib.dontCheck super.psqueues; - vector = nix.haskell.lib.dontCheck super.vector; - attoparsec = nix.haskell.lib.dontCheck super.attoparsec; -} diff --git a/nix/patches/0001-ghc865-binary-Use-binary-distribution-which-links-ag.patch b/nix/patches/0001-ghc865-binary-Use-binary-distribution-which-links-ag.patch deleted file mode 100644 index 4e8d88de..00000000 --- a/nix/patches/0001-ghc865-binary-Use-binary-distribution-which-links-ag.patch +++ /dev/null @@ -1,80 +0,0 @@ -From 35192bf8c4151c57aa6d37064ffeeee5510ce397 Mon Sep 17 00:00:00 2001 -From: Joe Hermaszewski -Date: Sun, 8 Nov 2020 23:51:44 +0800 -Subject: [PATCH 1/2] ghc865-binary: Use binary distribution which links - against ncurses6 for x86_64-linux - -Ben Gamari's patch from #85924. - -Fixes #85924, allowing one to bootstrap GHC in `pkgsMusl` - -`nix-build -A pkgsMusl.haskellPackages.hello` succeeds with this patch. - -(cherry picked from commit 15b3bc33064eeb0cba743cad585c829b6694669c) ---- - .../compilers/ghc/8.6.5-binary.nix | 23 ++++++++++++++----- - 1 file changed, 17 insertions(+), 6 deletions(-) - -diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix -index 41af279e83f..9234e3b1457 100644 ---- a/pkgs/development/compilers/ghc/8.6.5-binary.nix -+++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix -@@ -1,6 +1,6 @@ - { stdenv - , fetchurl, perl, gcc --, ncurses5, gmp, glibc, libiconv -+, ncurses5, ncurses6, gmp, glibc, libiconv - , llvmPackages - }: - -@@ -10,8 +10,12 @@ assert stdenv.targetPlatform == stdenv.hostPlatform; - let - useLLVM = !stdenv.targetPlatform.isx86; - -+ useNcurses6 = stdenv.hostPlatform.system == "x86_64-linux"; -+ -+ ourNcurses = if useNcurses6 then ncurses6 else ncurses5; -+ - libPath = stdenv.lib.makeLibraryPath ([ -- ncurses5 gmp -+ ourNcurses gmp - ] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv); - - libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY" -@@ -34,12 +38,16 @@ stdenv.mkDerivation rec { - # https://downloads.haskell.org/~ghc/8.6.5/ - src = fetchurl ({ - i686-linux = { -+ # Don't use the Fedora27 build (as below) because there isn't one! - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-deb9-linux.tar.xz"; - sha256 = "1p2h29qghql19ajk755xa0yxkn85slbds8m9n5196ris743vkp8w"; - }; - x86_64-linux = { -- url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb9-linux.tar.xz"; -- sha256 = "1pqlx6rdjs2110g0y1i9f8x18lmdizibjqd15f5xahcz39hgaxdw"; -+ # This is the Fedora build because it links against ncurses6 where the -+ # deb9 one links against ncurses5, see here -+ # https://github.com/NixOS/nixpkgs/issues/85924 for a discussion -+ url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-fedora27-linux.tar.xz"; -+ sha256 = "18dlqm5d028fqh6ghzn7pgjspr5smw030jjzl3kq6q1kmwzbay6g"; - }; - aarch64-linux = { - url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-ubuntu18.04-linux.tar.xz"; -@@ -88,9 +96,12 @@ stdenv.mkDerivation rec { - '' + - # Rename needed libraries and binaries, fix interpreter - stdenv.lib.optionalString stdenv.isLinux '' -- find . -type f -perm -0100 -exec patchelf \ -+ find . -type f -perm -0100 \ -+ -exec patchelf \ - --replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \ -- --replace-needed libtinfo.so libtinfo.so.5 \ -+ ${ # This isn't required for x86_64-linux where we use ncurses6 -+ stdenv.lib.optionalString (!useNcurses6) "--replace-needed libtinfo.so libtinfo.so.5" -+ } \ - --interpreter ${glibcDynLinker} {} \; - - sed -i "s|/usr/bin/perl|perl\x00 |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2 --- -2.29.2 - diff --git a/nix/patches/0002-openblas-0.3.10-0.3.13.patch b/nix/patches/0002-openblas-0.3.10-0.3.13.patch deleted file mode 100644 index 8eb4a448..00000000 --- a/nix/patches/0002-openblas-0.3.10-0.3.13.patch +++ /dev/null @@ -1,74 +0,0 @@ -From f7fc01b0d74ea06fff934bbb9397615978903726 Mon Sep 17 00:00:00 2001 -From: Joachim Breitner -Date: Thu, 7 Jan 2021 18:32:53 +0000 -Subject: [PATCH 2/2] openblas: 0.3.10 -> 0.3.13 - -fixing https://github.com/NixOS/nixpkgs/issues/92458 -fetching the file from nixpkgs master at cc8db6e19b876e0ee484d8e186fc689ce1e18f6b ---- - .../science/math/openblas/default.nix | 24 +++++++++++-------- - 1 file changed, 14 insertions(+), 10 deletions(-) - -diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix -index 89d88bdf564..8df04e80ceb 100644 ---- a/pkgs/development/libraries/science/math/openblas/default.nix -+++ b/pkgs/development/libraries/science/math/openblas/default.nix -@@ -15,8 +15,8 @@ - # Select a specific optimization target (other than the default) - # See https://github.com/xianyi/OpenBLAS/blob/develop/TargetList.txt - , target ? null --, enableStatic ? false --, enableShared ? true -+, enableStatic ? stdenv.hostPlatform.isStatic -+, enableShared ? !stdenv.hostPlatform.isStatic - }: - - with stdenv.lib; -@@ -71,6 +71,13 @@ let - NO_AVX512 = true; - USE_OPENMP = !stdenv.hostPlatform.isMusl; - }; -+ -+ powerpc64le-linux = { -+ BINARY = 64; -+ TARGET = setTarget "POWER5"; -+ DYNAMIC_ARCH = true; -+ USE_OPENMP = !stdenv.hostPlatform.isMusl; -+ }; - }; - in - -@@ -99,12 +106,15 @@ let - in - stdenv.mkDerivation rec { - pname = "openblas"; -- version = "0.3.10"; -+ version = "0.3.12"; -+ -+ outputs = [ "out" "dev" ]; -+ - src = fetchFromGitHub { - owner = "xianyi"; - repo = "OpenBLAS"; - rev = "v${version}"; -- sha256 = "174id98ga82bhz2v7sy9yj6pqy0h0088p3mkdikip69p9rh3d17b"; -+ sha256 = "0mk1kjkr96bvvcq2zigzjrs0cnhwsf6gfi0855mp9yifn8lvp20y"; - }; - - inherit blas64; -@@ -134,12 +144,6 @@ stdenv.mkDerivation rec { - buildPackages.stdenv.cc - ]; - -- # Disable an optimisation which seems to cause issues, pending an -- # upstream fix: https://github.com/xianyi/OpenBLAS/issues/2496 -- patches = stdenv.lib.optionals stdenv.hostPlatform.isAarch64 [ -- ./0001-Disable-optimised-aarch64-dgemm_beta-pending-fix.patch -- ]; -- - makeFlags = mkMakeFlagsFromConfig (config // { - FC = "${stdenv.cc.targetPrefix}gfortran"; - CC = "${stdenv.cc.targetPrefix}${if stdenv.cc.isClang then "clang" else "cc"}"; --- -2.29.2 - diff --git a/nix/patches/fb063991b26b2b93dece6d09f37041451a5ef4cb.patch b/nix/patches/fb063991b26b2b93dece6d09f37041451a5ef4cb.patch deleted file mode 100644 index 4dd0d413..00000000 --- a/nix/patches/fb063991b26b2b93dece6d09f37041451a5ef4cb.patch +++ /dev/null @@ -1,51 +0,0 @@ -From fb063991b26b2b93dece6d09f37041451a5ef4cb Mon Sep 17 00:00:00 2001 -From: Joachim Breitner -Date: Tue, 1 Dec 2020 19:11:45 +0100 -Subject: [PATCH] macdylibbundler: Should propagate dependency on otool - (#103163) - -Co-authored-by: Sandro ---- - pkgs/development/tools/misc/macdylibbundler/default.nix | 9 ++++++++- - pkgs/top-level/all-packages.nix | 2 +- - 2 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/pkgs/development/tools/misc/macdylibbundler/default.nix b/pkgs/development/tools/misc/macdylibbundler/default.nix -index 103c534dfa3d7..5008175363cbf 100644 ---- a/pkgs/development/tools/misc/macdylibbundler/default.nix -+++ b/pkgs/development/tools/misc/macdylibbundler/default.nix -@@ -1,4 +1,4 @@ --{ stdenv, fetchFromGitHub }: -+{ stdenv, makeWrapper, fetchFromGitHub, cctools }: - - stdenv.mkDerivation { - pname = "macdylibbundler"; -@@ -11,8 +11,15 @@ stdenv.mkDerivation { - sha256 = "149p3dcnap4hs3nhq5rfvr3m70rrb5hbr5xkj1h0gsfp0d7gvxnj"; - }; - -+ buildInputs = [ makeWrapper ]; -+ - makeFlags = [ "PREFIX=$(out)" ]; - -+ postInstall = '' -+ wrapProgram $out/bin/dylibbundler \ -+ --prefix PATH ":" "${cctools}/bin" -+ ''; -+ - meta = with stdenv.lib; { - description = "Utility to ease bundling libraries into executables for OSX"; - longDescription = '' -diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix -index 0cfcb9b4abfb2..c0c827bc13b63 100644 ---- a/pkgs/top-level/all-packages.nix -+++ b/pkgs/top-level/all-packages.nix -@@ -22390,7 +22390,7 @@ in - - mac = callPackage ../development/libraries/mac { }; - -- macdylibbundler = callPackage ../development/tools/misc/macdylibbundler { }; -+ macdylibbundler = callPackage ../development/tools/misc/macdylibbundler { inherit (darwin) cctools; }; - - magic-wormhole = with python3Packages; toPythonApplication magic-wormhole; - diff --git a/nix/sources.json b/nix/sources.json index bd37bb59..2d73f5a7 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -6,10 +6,10 @@ "homepage": null, "owner": "nomeata", "repo": "haskell-candid", - "rev": "0bdb1caeb6c6cd60f42bd591342675654a1cf589", - "sha256": "0kwb5haac58baf9va4laa5lv2a70yzllgxi88vrxks38j5fjbc59", + "rev": "1b0279928ac05ecabb0c913449b10c9559a0ec45", + "sha256": "0m0hi4gwdcr5kqwqbjvwf11v2i19mb5m15i19g7qp0dvvlgg2rqr", "type": "tarball", - "url": "https://github.com/nomeata/haskell-candid/archive/0bdb1caeb6c6cd60f42bd591342675654a1cf589.tar.gz", + "url": "https://github.com/nomeata/haskell-candid/archive/1b0279928ac05ecabb0c913449b10c9559a0ec45.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "leb128-cereal": { @@ -32,23 +32,23 @@ "homepage": "", "owner": "nmattia", "repo": "naersk", - "rev": "a82fd7dc31a58c462b6dfa9d9d886fa2cc75dfd4", - "sha256": "00bjwir52y6jbf0b22qy9qxramw35k5fc7kp9hymr1zgpmw9kbwg", + "rev": "08afb3d1dbfe016108b72e05b02ba0f6ecb3c8e1", + "sha256": "1nn8hyg3jqjmr2808vvsph5w914l7pf8n4sr05vivhhr60578s1c", "type": "tarball", - "url": "https://github.com/nmattia/naersk/archive/a82fd7dc31a58c462b6dfa9d9d886fa2cc75dfd4.tar.gz", + "url": "https://github.com/nmattia/naersk/archive/08afb3d1dbfe016108b72e05b02ba0f6ecb3c8e1.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "nixpkgs": { - "branch": "release-20.09", + "branch": "ghc-use-ghc8107-for-bootstrapping", "builtin": true, "description": "Nixpkgs/NixOS branches that track the Nixpkgs/NixOS channels", "homepage": null, - "owner": "NixOS", + "owner": "nh2", "repo": "nixpkgs", - "rev": "e12d6af863bfb6aa2d68321fd8cd6c08f8f240e6", - "sha256": "0wr62zii07s0hmyf3ai3plhgxqn7d4d7mclrq49zv65v4fnlk6ny", + "rev": "bc5a969d016d316972582307639b755718ac7b11", + "sha256": "0j5pl0y8fmhwyh0arbpfyhchbw3fg4p2c9clyrm8bnppv5371daw", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/e12d6af863bfb6aa2d68321fd8cd6c08f8f240e6.tar.gz", + "url": "https://github.com/nh2/nixpkgs/archive/bc5a969d016d316972582307639b755718ac7b11.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "winter": { @@ -58,10 +58,10 @@ "homepage": "https://github.com/dfinity-side-projects/winter", "owner": "dfinity-side-projects", "repo": "winter", - "rev": "2cc31576fe029d85c37d21fc9ea4902c5c64b5a9", - "sha256": "1mwjvk1a1qi7vw10pmq91psn2glsc25c1smbbxjmf6k767v1l0vf", + "rev": "e62722796e11760947a94285734e7bc29d72c389", + "sha256": "1yfgk5bhyzrllnkhpg1plzp3mz7h1fgn3j0zfn36a3h892lknlds", "type": "tarball", - "url": "https://github.com/dfinity-side-projects/winter/archive/2cc31576fe029d85c37d21fc9ea4902c5c64b5a9.tar.gz", + "url": "https://github.com/dfinity-side-projects/winter/archive/e62722796e11760947a94285734e7bc29d72c389.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } }