From 188d7b16883c227e9bba645d270e00aa56b7bff8 Mon Sep 17 00:00:00 2001 From: Nicholas Clarke Date: Mon, 3 Aug 2020 10:26:46 +0200 Subject: [PATCH 1/2] Update to latest haskell.nix We drop a workaround introduced in https://github.com/input-output-hk/cardano-ledger/commit/90db88e68e9c5df967fb764493ef81a1f0cebf55 for an issue with the all component in haskell.nix. This is no longer needed; as of https://github.com/input-output-hk/haskell.nix/commit/b6de6ef3b8ab338504f4961581a4c4fbfdd7ceed, the 'all' component has been removed entirely. --- nix/haskell.nix | 1 - nix/sources.json | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/nix/haskell.nix b/nix/haskell.nix index aa41767f18b..b6c1a78b4c9 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -44,7 +44,6 @@ let packages.cardano-ledger = { configureFlags = [ "--ghc-option=-Werror" ]; components = { - all.postInstall = pkgs.lib.mkForce ""; tests.cardano-ledger-test = { preCheck = '' export CARDANO_MAINNET_MIRROR="${cardano-mainnet-mirror}/epochs" diff --git a/nix/sources.json b/nix/sources.json index 01b3b0c155e..9404ba41f24 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -5,10 +5,10 @@ "homepage": "https://input-output-hk.github.io/haskell.nix", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "35b1ec8cd577bfc5abf7d0325f38aab01de5ed00", - "sha256": "0mg18i6g7nxd7qk0kaca6k8dsc3kam21772zlr19k03ff67ws55j", + "rev": "f4136211c933b444ab2e0f358abd223929970220", + "sha256": "1b9nxzkg29hwczr6pb6a7arxka8z0swzq7b2bqyxqzr4qvpcjlc1", "type": "tarball", - "url": "https://github.com/input-output-hk/haskell.nix/archive/35b1ec8cd577bfc5abf7d0325f38aab01de5ed00.tar.gz", + "url": "https://github.com/input-output-hk/haskell.nix/archive/f4136211c933b444ab2e0f358abd223929970220.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "iohk-nix": { From 1d7e6226b51a804da37f2334b735837ffb0a626c Mon Sep 17 00:00:00 2001 From: Nicholas Clarke Date: Mon, 3 Aug 2020 10:28:21 +0200 Subject: [PATCH 2/2] Use multiple subdirs in cabal.project. Alas, it seems like you can't use '.' as a subdir for some reason, so there are still two entries for `cardano-prelude`. --- cabal.project | 30 +++++++----------------------- shell.nix | 5 ++++- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/cabal.project b/cabal.project index 94cdf3736f2..4083004be0e 100644 --- a/cabal.project +++ b/cabal.project @@ -25,28 +25,11 @@ source-repository-package location: https://github.com/input-output-hk/cardano-base tag: 7d795c3040ea7785812efa1c97864bbb41b15d3e --sha256: 130i0yj4y9br1m2bhisi6wni3f40i31nfhg878hv0kwi17chl9sz - subdir: binary - -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-base - tag: 7d795c3040ea7785812efa1c97864bbb41b15d3e - --sha256: 130i0yj4y9br1m2bhisi6wni3f40i31nfhg878hv0kwi17chl9sz - subdir: binary/test - -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-base - tag: 7d795c3040ea7785812efa1c97864bbb41b15d3e - --sha256: 130i0yj4y9br1m2bhisi6wni3f40i31nfhg878hv0kwi17chl9sz - subdir: cardano-crypto-class - -source-repository-package - type: git - location: https://github.com/input-output-hk/cardano-base - tag: 7d795c3040ea7785812efa1c97864bbb41b15d3e - --sha256: 130i0yj4y9br1m2bhisi6wni3f40i31nfhg878hv0kwi17chl9sz - subdir: slotting + subdir: + binary + binary/test + cardano-crypto-class + slotting source-repository-package type: git @@ -65,7 +48,8 @@ source-repository-package location: https://github.com/input-output-hk/cardano-prelude tag: 316c854d1d3089f480708ad5cd5ecf8a74423ddd --sha256: 1srbl3jrkmpwypdz0yrx4nmah3qcsr93dp48zx2bamg51c4hcsyj - subdir: test + subdir: + test source-repository-package type: git diff --git a/shell.nix b/shell.nix index 37abdf5e9e2..5c1bc873977 100644 --- a/shell.nix +++ b/shell.nix @@ -20,7 +20,6 @@ let # These programs will be available inside the nix-shell. buildInputs = with haskellPackages; [ - cabal-install niv pkg-config hlint @@ -28,6 +27,10 @@ let ormolu.ormolu ]; + tools = { + cabal = "3.2.0.0"; + }; + # Prevents cabal from choosing alternate plans, so that # *all* dependencies are provided by Nix. exactDeps = false;