From b6de6ef3b8ab338504f4961581a4c4fbfdd7ceed Mon Sep 17 00:00:00 2001 From: Hamish Mackenzie Date: Tue, 21 Jul 2020 16:06:54 +1200 Subject: [PATCH] Remove `components.all` (#776) It causes a lot of issues. To make this work: * `shellFor` is updated to use `getAllComponents` instead of `.all`. * `getAllComponents` is updated to work on the package rather than the package config. * Tests updated to not use `.library` or `.exes.X` where appropriate. * Documentation updated. * Out of date examples removed. As a bonus `shellFor` now takes a `components` argument that might be useful for limiting the dependencies of the shell to just the ones needed for the components you intend to work on. --- builder/comp-builder.nix | 8 +- builder/shell-for.nix | 18 +++- changelog.md | 5 + docs/reference/library.md | 5 +- docs/tutorials/development.md | 20 +--- examples/Cabal-install-folder.diff | 41 -------- examples/cardano-sl-args.nix | 150 ---------------------------- examples/cardano-sl-mingw32.nix | 3 - examples/cardano-sl.nix | 3 - examples/cardano-wallet-args.nix | 103 ------------------- examples/cardano-wallet-ghcjs.nix | 39 -------- examples/cardano-wallet-mingw32.nix | 3 - examples/cardano-wallet-rpi.nix | 39 -------- examples/cardano-wallet.nix | 3 - examples/plutus-args.nix | 74 -------------- examples/plutus-mingw32.nix | 3 - examples/plutus.nix | 3 - lib/default.nix | 17 +--- modules/package.nix | 34 ------- test/cabal-22/default.nix | 2 +- test/cabal-hpack/default.nix | 9 -- test/cabal-simple-prof/default.nix | 4 - test/cabal-simple/default.nix | 8 +- test/cabal-sublib/default.nix | 9 -- test/exe-only/default.nix | 9 -- test/extra-hackage/default.nix | 4 - test/sublib-docs/default.nix | 9 -- test/tests.sh | 2 +- test/with-packages/default.nix | 47 +++++---- 29 files changed, 56 insertions(+), 618 deletions(-) delete mode 100644 examples/Cabal-install-folder.diff delete mode 100644 examples/cardano-sl-args.nix delete mode 100644 examples/cardano-sl-mingw32.nix delete mode 100644 examples/cardano-sl.nix delete mode 100644 examples/cardano-wallet-args.nix delete mode 100644 examples/cardano-wallet-ghcjs.nix delete mode 100644 examples/cardano-wallet-mingw32.nix delete mode 100644 examples/cardano-wallet-rpi.nix delete mode 100644 examples/cardano-wallet.nix delete mode 100644 examples/plutus-args.nix delete mode 100644 examples/plutus-mingw32.nix delete mode 100644 examples/plutus.nix diff --git a/builder/comp-builder.nix b/builder/comp-builder.nix index c41a26f4ce..9eceb0dd42 100644 --- a/builder/comp-builder.nix +++ b/builder/comp-builder.nix @@ -65,9 +65,7 @@ let then builtins.trace ("Cleaning component source not supported for hpack package: " + name) src else haskellLib.cleanCabalComponent package component src; - nameOnly = if haskellLib.isAll componentId - then "${package.identifier.name}-all" - else "${package.identifier.name}-${componentId.ctype}-${componentId.cname}"; + nameOnly = "${package.identifier.name}-${componentId.ctype}-${componentId.cname}"; fullName = "${nameOnly}-${package.identifier.version}"; @@ -293,7 +291,7 @@ let in '' runHook preInstall $SETUP_HS copy ${lib.concatStringsSep " " setupInstallFlags} - ${lib.optionalString (haskellLib.isLibrary componentId || haskellLib.isAll componentId) '' + ${lib.optionalString (haskellLib.isLibrary componentId) '' $SETUP_HS register --gen-pkg-config=${name}.conf ${ghc.targetPrefix}ghc-pkg -v0 init $out/package.conf.d if [ -d "${name}.conf" ]; then @@ -326,7 +324,7 @@ let echo "package-id $id" >> $out/envDep fi ''} - ${(lib.optionalString (haskellLib.isTest componentId || haskellLib.isBenchmark componentId || haskellLib.isAll componentId) '' + ${(lib.optionalString (haskellLib.isTest componentId || haskellLib.isBenchmark componentId) '' mkdir -p $out/bin if [ -f ${testExecutable} ]; then mkdir -p $(dirname $out/bin/${exeName}) diff --git a/builder/shell-for.nix b/builder/shell-for.nix index 77863d6498..1267594600 100644 --- a/builder/shell-for.nix +++ b/builder/shell-for.nix @@ -1,11 +1,20 @@ { lib, stdenv, glibcLocales, pkgconfig, ghcForComponent, makeConfigFiles, hsPkgs, hoogleLocal, haskellLib, buildPackages, compiler }: -{ packages ? ps: +{ # `packages` function selects packages that will be worked on in the shell itself. + # These packages will not be built by `shellFor`, but their + # dependencies will be included in the shell's `ghc-pkg list`. + packages ? ps: let selected = haskellLib.selectLocalPackages ps; in builtins.trace ("Shell for " + toString (builtins.attrNames selected)) (builtins.attrValues selected) + # `components` function selects components that will be worked on in the shell itself. + # By default `shellFor` will include the dependencies of all of the components + # in the selected packages. If only as subset of the components will be + # worked on in the shell then we can pass a different `components` function + # to select those. +, components ? ps: lib.concatMap haskellLib.getAllComponents (packages hsPkgs) , additional ? _: [] , withHoogle ? true , exactDeps ? false @@ -16,8 +25,9 @@ let # TODO find out why hoogle index creation can be made to work for cross compilers withHoogle' = withHoogle && !haskellLib.isCrossHost; selected = packages hsPkgs; + selectedComponents = components hsPkgs; additionalSelected = additional hsPkgs; - selectedConfigs = map (p: p.components.all.config) selected; + selectedConfigs = map (c: c.config) selectedComponents; name = if lib.length selected == 1 then "ghc-shell-for-${(lib.head selected).identifier.name}" @@ -45,9 +55,9 @@ let # Add the system libraries and build tools of the selected haskell # packages to the shell. systemInputs = removeSelectedInputs (lib.concatMap - (p: p.components.all.buildInputs ++ p.components.all.propagatedBuildInputs) selected); + (c: c.buildInputs ++ c.propagatedBuildInputs) selectedComponents); nativeBuildInputs = removeSelected - (lib.concatMap (p: p.components.all.executableToolDepends) selected); + (lib.concatMap (c: c.executableToolDepends) selectedComponents); # Set up a "dummy" component to use with ghcForComponent. component = { diff --git a/changelog.md b/changelog.md index 30b091ba34..aa96e159a2 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,11 @@ This file contains a summary of changes to Haskell.nix and `nix-tools` that will impact users. +## July 21, 2020 +* Removed `components.all`, use `symlinkJoin` on components.exes or + `shellFor` if you need a shell. +* Added `components` arguemnt to `shellFor`. + ## July 21, 2020 * Added GHC 8.8.4 and replaced 8.8.3 in tests and as the ghc used to build nix-tools for stack projects. diff --git a/docs/reference/library.md b/docs/reference/library.md index 8665f4c3d8..c46cdecdb7 100644 --- a/docs/reference/library.md +++ b/docs/reference/library.md @@ -70,7 +70,6 @@ components = { exes = { NAME = COMPONENT; }; tests = { NAME = COMPONENT; }; benchmarks = { NAME = COMPONENT; }; - all = COMPONENT; } ``` @@ -80,9 +79,6 @@ In [Haskell.nix][], a _component_ is a derivation corresponding to a [Cabal component](https://www.haskell.org/cabal/users-guide/developing-packages.html) of a package. -[Haskell.nix][] also defines a special `all` component, which is the -union of all components in the package. - ## Identifier A package identifier is an attrset pair of `name` and `version`. @@ -427,6 +423,7 @@ shellFor = | Argument | Type | Description | |----------------|------|---------------------| | `packages` | Function | Package selection function. It takes a list of [Haskell packages](#haskell-package) and returns a subset of these packages. | +| `components` | Function | Similar to `packages`, by default all the components of the selected packages are selected. | | `additional` | Function | Similar to `packages`, but the selected packages are built and included in `ghc-pkg list` (not just their dependencies). | | `withHoogle` | Boolean | Whether to build a Hoogle documentation index and provide the `hoogle` command. | | `exactDeps` | Boolean | Prevents the Cabal solver from choosing any package dependency other than what are in the package set. | diff --git a/docs/tutorials/development.md b/docs/tutorials/development.md index 5fb9055011..e5b2b05a0b 100644 --- a/docs/tutorials/development.md +++ b/docs/tutorials/development.md @@ -24,25 +24,9 @@ it exists in a file called `default.nix`. on it. Starting Cabal 3.0 `cabal build` will work out of the box, as new style builds are the default. -## How to get a development shell for a package +## How to get a development shell -Run a `nix‑shell` on `components.all` of your package. `all` is a -synthetic component whose dependencies are the union of the -dependencies of all components in the package. Therefore, you will be -able to build the test suites because their dependencies will be -included. - -```nix -# shell.nix -let - hsPkgs = import ./default.nix {}; -in - hsPkgs.my-package.components.all -``` - -## How to get a development shell for a multi-package project - -If you have a Cabal or Stack project with multiple packages +If you have a Cabal or Stack project with one or more packages (i.e. multiple `.cabal` files, not a single package with multiple components), then you will need a development environment that contains the _dependencies_ of your packages, but not the packages diff --git a/examples/Cabal-install-folder.diff b/examples/Cabal-install-folder.diff deleted file mode 100644 index 0b0c709ba8..0000000000 --- a/examples/Cabal-install-folder.diff +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/Distribution/Simple/GHC.hs b/Distribution/Simple/GHC.hs -index 547776046..176e59111 100644 ---- a/Distribution/Simple/GHC.hs -+++ b/Distribution/Simple/GHC.hs -@@ -1,6 +1,7 @@ - {-# LANGUAGE FlexibleContexts #-} - {-# LANGUAGE RankNTypes #-} - {-# LANGUAGE TupleSections #-} -+{-# LANGUAGE LambdaCase #-} - {-# LANGUAGE CPP #-} - - ----------------------------------------------------------------------------- -@@ -1755,13 +1756,27 @@ installExe verbosity lbi binDir buildPref - let exeName' = unUnqualComponentName $ exeName exe - exeFileName = exeTargetName (hostPlatform lbi) exe - fixedExeBaseName = progprefix ++ exeName' ++ progsuffix -- installBinary dest = do -+ exePath = buildPref exeName' exeFileName -+ installBinary dest = doesFileExist exePath >>= \case -+ True -> do - installExecutableFile verbosity - (buildPref exeName' exeFileName) - (dest <.> exeExtension (hostPlatform lbi)) - when (stripExes lbi) $ - Strip.stripExe verbosity (hostPlatform lbi) (withPrograms lbi) - (dest <.> exeExtension (hostPlatform lbi)) -+ False -> do -+ putStrLn "Hello!" -+ -- The executable exists but is not a simple file. -+ -- Deligate installation to the compiler -+ runDbProgram verbosity ghcProgram (withPrograms lbi) $ -+ [ "--install-executable" -+ , buildPref exeName' exeFileName -+ , "-o", dest -+ ] ++ -+ case (stripExes lbi, lookupProgram stripProgram $ withPrograms lbi) of -+ (True, Just strip) -> ["-strip-program", programPath strip] -+ _ -> [] - installBinary (binDir fixedExeBaseName) - - -- |Install foreign library for GHC. diff --git a/examples/cardano-sl-args.nix b/examples/cardano-sl-args.nix deleted file mode 100644 index 715cda7d8c..0000000000 --- a/examples/cardano-sl-args.nix +++ /dev/null @@ -1,150 +0,0 @@ -let iohk-archive = name: hash: "https://github.com/input-output-hk/${name}/archive/${hash}.tar.gz"; -in rec { - src = builtins.fetchTarball (iohk-archive "cardano-sl" "1a792d7cd0f0c93a0f0c28f66372bce3c3808dbd"); - pkgs = [ - "cardano-sl-crypto-test" - "cardano-sl-crypto" - "cardano-sl-cluster" - "cardano-sl-infra" - "cardano-sl-infra-test" - "cardano-sl-tools" - "cardano-sl-tools-post-mortem" - "cardano-sl-core" - "cardano-sl-core-test" - "cardano-sl-util-test" - "cardano-sl-util" - "cardano-sl-script-runner" - "cardano-sl-auxx" - "cardano-sl-networking" - "cardano-sl-explorer" - "cardano-sl-chain-test" - "cardano-sl-chain" - "cardano-sl-mnemonic" - "cardano-sl-generator" - "cardano-sl-x509" - "cardano-sl-utxo" - "cardano-sl-node-ipc" - "cardano-wallet" - "cardano-sl" - "cardano-sl-db-test" - "cardano-sl-db" - "cardano-sl-faucet" - "cardano-sl-binary-test" - "cardano-sl-binary" - "cardano-sl-node" - "cardano-sl-client" - ]; - cache = [ - { name = "cardano-crypto"; - url = "https://github.com/input-output-hk/cardano-crypto"; - rev = "4590efa638397e952a51a8994b5543e4ea3c1ecd"; - sha256 = "0hl2n3bba5v2j0lmxhs7hs01z3aznh2bwf9cb434icq2g0bl8ms3"; } - { name = "haskell-ip"; - cabal-file = "ip.cabal"; - url = "https://github.com/andrewthad/haskell-ip"; - rev = "9bb453139aa82cc973125091800422a523e1eb8f"; - sha256 = "199mfpbgca7rvwvwk2zsmcpibc0sk0ni7c5zlf4gk3cps8s85gyr"; } - { name = "time-units"; - url = "https://github.com/serokell/time-units.git"; - rev = "6c3747c1ac794f952de996dd7ba8a2f6d63bf132"; - sha256 = "0psdr1if0rgnn24698x3583m0603rwd3sd7yb9whj03hskmkwpgs"; - } - { name = "kademlia"; - url = "https://github.com/serokell/kademlia.git"; - rev = "7120bb4d28e708acd52dfd61d3dca7914fac7d7f"; - sha256 = "1k1wp9dwhzzqfivxc28vhxfqplnyh916crr7bhsiv829d6qifhw1"; - } - { name = "network-transport"; - url = "https://github.com/serokell/network-transport"; - rev = "018a50b9042c2115c3ec9c9fd5ca5f28737dd29c"; - sha256 = "0lqa26l2ikpq6a4s7qm9b2favx59w82i0wngakhfyax66fpixp8q"; - } - { name = "network-transport-tcp"; - url = "https://github.com/avieth/network-transport-tcp"; - rev = "2634e5e32178bb0456d800d133f8664321daa2ef"; - sha256 = "03shp9prflhgqzw7pymw1pq2q7s1wf46pyjm2csx8646snrhf35i"; - } - { name = "network-transport-inmemory"; - url = "https://github.com/avieth/network-transport-inmemory"; - rev = "5d8ff2b07b9df35cf61329a3d975e2c8cf95c12a"; - sha256 = "0ak64rks3lk3kk5wyndrrk2swmd84h9diribzix305xwz1jhjj9w"; - } - { name = "acid-state"; - url = "https://github.com/parsonsmatt/acid-state"; - rev = "a1b23e2056f134e53f705a694ab85deeecabec5c"; - sha256 = "0mgdk8252g7wbb0afyn21pcn3bwh4vainy3h2d0xsv4hlpgqgnw8"; - } - { name = "socket-io"; - url = "https://github.com/input-output-hk/engine.io"; - rev = "d3c55f51bb81cee7d0d551de930ce65fe7d76756"; - sha256 = "139c0yfnj57cpwg4k0am2rp35sh959394nvlb98011rjy68200qc"; - subdir = "socket-io"; - } - { name = "engine-io"; - url = "https://github.com/input-output-hk/engine.io"; - rev = "d3c55f51bb81cee7d0d551de930ce65fe7d76756"; - sha256 = "139c0yfnj57cpwg4k0am2rp35sh959394nvlb98011rjy68200qc"; - subdir = "engine-io"; - } - { name = "engine-io-wai"; - url = "https://github.com/input-output-hk/engine.io"; - rev = "d3c55f51bb81cee7d0d551de930ce65fe7d76756"; - sha256 = "139c0yfnj57cpwg4k0am2rp35sh959394nvlb98011rjy68200qc"; - subdir = "engine-io-wai"; - } - { name = "canonical-json"; - url = "https://github.com/well-typed/canonical-json.git"; - rev = "ddfe3593b80b5ceb88842bb7a6f2268df75d2c2f"; - sha256 = "02fzn1xskis1lc1pkz0j92v6ipd89ww0k2p3dvwpm3yap5dpnm7k"; - } - { name = "clock"; - url = "https://github.com/corsis/clock.git"; - rev = "ef60bd51a3587a173adf565c33bf2886df6e3842"; - sha256 = "1r4n9imls483f7wd61fi1jk16z2k7w36gpx798sqidvwbnc831q1"; - } - { name = "rocksdb-haskell-ng"; - url = "https://github.com/input-output-hk/rocksdb-haskell-ng.git"; - rev = "49f501a082d745f3b880677220a29cafaa181452"; - sha256 = "02jvri8ik8jgrxwa6qmh3xcwqvm4s27iv3sxpjpny79nlhlxvfzp"; - } - { name = "log-warper"; - url = "https://github.com/input-output-hk/log-warper"; - rev = "5271ab6c33541b8155ca203e714875974ec116be"; - sha256 = "1h14004a8iwr8nw31pqq6kfdhfsyzzl8a50hrmj2acjqq6mbdl2m"; - } - { name = "universum"; - url = "https://github.com/input-output-hk/universum"; - rev = "15f7db758ff5a24b874de2247f6f7a4576562da5"; - sha256 = "127bs29zpjcc40777dv7figk05gd00b9ja57sp11w440qr5h72hk"; - } - { name = "serokell-util"; - url = "https://github.com/input-output-hk/serokell-util"; - rev = "457f1d149c6e238841f283a1faf7bc8fb021b27d"; - sha256 = "0llbryqna9p03db3ka4933vzf4jw1yxdbsf7cqi2pivsy1vp6kp0"; - } - { name = "inspector"; - url = "https://github.com/primetype/inspector.git"; - rev = "c975f4329365f0379c04358138e616fb96fb0b79"; - sha256 = "12q1v7a8kcw7qi4lws4j3mvxwfkhni6zmp870kmnkgbgwvrax9gs"; - } - ]; - # This is needed due to some deficiencies in stackage snapshots. - # maybe we should make this part of some `stack-default-pkg-def-extras`? - # We have similar logic in the snapshots.nix file to deal with this in - # snapshots. - # - # TODO: move this somewhere into stackProject - pkg-def-extras = [ - (hackage: { - packages = { - "transformers" = (((hackage.transformers)."0.5.6.2").revisions).default; - "process" = (((hackage.process)."1.6.5.0").revisions).default; - }; - }) - (hackage: { - packages = { - "hsc2hs" = (((hackage.hsc2hs)."0.68.4").revisions).default; - }; - }) - ]; -} diff --git a/examples/cardano-sl-mingw32.nix b/examples/cardano-sl-mingw32.nix deleted file mode 100644 index 6dd0180d0a..0000000000 --- a/examples/cardano-sl-mingw32.nix +++ /dev/null @@ -1,3 +0,0 @@ -let inherit (import ../. {}) sources nixpkgsArgs; - pkgs = import sources.nixpkgs (nixpkgsArgs // { crossSystem.config = "x86_64-pc-mingw32"; }); -in (pkgs.haskell-nix.stackProject (import ./cardano-sl-args.nix)).cardano-sl.components.all diff --git a/examples/cardano-sl.nix b/examples/cardano-sl.nix deleted file mode 100644 index ed7cb43605..0000000000 --- a/examples/cardano-sl.nix +++ /dev/null @@ -1,3 +0,0 @@ -let inherit (import ../. {}) sources nixpkgsArgs; - pkgs = import sources.nixpkgs nixpkgsArgs; -in (pkgs.haskell-nix.stackProject (import ./cardano-sl-args.nix)).cardano-sl.components.all diff --git a/examples/cardano-wallet-args.nix b/examples/cardano-wallet-args.nix deleted file mode 100644 index 67aa0126f8..0000000000 --- a/examples/cardano-wallet-args.nix +++ /dev/null @@ -1,103 +0,0 @@ -let iohk-archive = name: hash: "https://github.com/input-output-hk/${name}/archive/${hash}.tar.gz"; - src = builtins.fetchTarball (iohk-archive "cardano-wallet" "1fbd206bf6b368f08d603db130648ebd4efcedbc"); - iohkLib = import (src + "/nix/iohk-common.nix") {}; - jmPkgs = import (src + "/nix/jormungandr.nix") { inherit iohkLib; }; - -in rec { - inherit src; - pkgs = [ - "bech32" - "text-class" - "cardano-wallet-http-bridge" - "cardano-wallet-launcher" - "cardano-wallet-test-utils" - "cardano-wallet-core" - "cardano-wallet-jormungandr" - "cardano-wallet-cli" - "cardano-crypto" - "cardano-wallet-core-integration" - ]; - # wee need these, as they are referenced in the stack.yaml file; however we can't - # fetch them at IFD time as they don't provide the sha256. Hence we use the cache-file - # facility on stack-to-nix and pre-populate the cache file with the relevant hashes. - cache = [ - { name = "cardano-crypto"; - url = "https://github.com/input-output-hk/cardano-crypto"; - rev = "3c5db489c71a4d70ee43f5f9b979fcde3c797f2a"; - sha256 = "0lss4x41m0ylhximqjc56ps0y3pag3x58wm480pzfa48lpk4gqpk"; } - { name = "persistent"; - url = "https://github.com/input-output-hk/persistent"; - rev = "107787ecc4c8a112375493cd66574f788f950fce"; - sha256 = "1livmfslqzadir5sc523r111wrd14s5k2nmvsxayk45hx3nnngfb"; - subdir = "persistent"; } - { name = "persistent-sqlite"; - url = "https://github.com/input-output-hk/persistent"; - rev = "107787ecc4c8a112375493cd66574f788f950fce"; - sha256 = "1livmfslqzadir5sc523r111wrd14s5k2nmvsxayk45hx3nnngfb"; - subdir = "persistent-sqlite"; } - { name = "persistent-template"; - url = "https://github.com/input-output-hk/persistent"; - rev = "107787ecc4c8a112375493cd66574f788f950fce"; - sha256 = "1livmfslqzadir5sc523r111wrd14s5k2nmvsxayk45hx3nnngfb"; - subdir = "persistent-template"; } - { name = "iohk-monitoring"; - url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "bd31cd2f3922010ddb76bb869f29c4e63bb8001b"; - subdir = "iohk-monitoring"; - sha256 = "1dfk505qbpk6p3gcpxa31wmg98qvx9hlrxlf0khaj7hizf3b8b60"; } - { name = "contra-tracer"; - url = "https://github.com/input-output-hk/iohk-monitoring-framework"; - rev = "bd31cd2f3922010ddb76bb869f29c4e63bb8001b"; - subdir = "contra-tracer"; - sha256 = "1dfk505qbpk6p3gcpxa31wmg98qvx9hlrxlf0khaj7hizf3b8b60"; } - ]; - # This is needed due to some deficiencies in stackage snapshots. - # maybe we should make this part of some `stack-default-pkg-def-extras`? - # We have similar logic in the snapshots.nix file to deal with this in - # snapshots. - # - # TODO: move this somewhere into stackProject - pkg-def-extras = [ - (hackage: { - packages = { - "hsc2hs" = (((hackage.hsc2hs)."0.68.4").revisions).default; - }; - }) - ]; - - modules = [ - # Add dependencies - { - packages.cardano-wallet-jormungandr.components.tests = { - # Some tests want to write ~/.local/share/cardano-wallet - integration.preBuild = "export HOME=`pwd`"; - # provide jormungandr command to test suites - integration.build-tools = [ - jmPkgs.jormungandr - jmPkgs.jormungandr-cli - ]; - unit.build-tools = [ jmPkgs.jormungandr ]; - }; - - packages.cardano-wallet-core.components.tests.unit.preBuild = '' - export SWAGGER_YAML=${src + "/specifications/api/swagger.yaml"} - ''; - } - - # Misc. build fixes for dependencies - { - # Cut down iohk-monitoring deps - packages.iohk-monitoring.flags = { - disable-ekg = true; - disable-examples = true; - disable-graylog = true; - disable-gui = true; - disable-prometheus = true; - disable-systemd = true; - }; - - # Katip has Win32 (>=2.3 && <2.6) constraint - packages.katip.doExactConfig = true; - } - ]; -} diff --git a/examples/cardano-wallet-ghcjs.nix b/examples/cardano-wallet-ghcjs.nix deleted file mode 100644 index 18d1e8fed9..0000000000 --- a/examples/cardano-wallet-ghcjs.nix +++ /dev/null @@ -1,39 +0,0 @@ -let inherit (import ../. {}) sources nixpkgsArgs; - pkgs = import sources.nixpkgs (nixpkgsArgs // { crossSystem.config = "js-unknown-ghcjs"; }); - Cabal = pkgs.buildPackages.haskell-nix.hackage-package { - name = "Cabal"; version = "2.4.1.0"; - modules = [ - { packages.Cabal.patches = [ ./Cabal-install-folder.diff ]; } - ]; -}; in -# (haskell-nix.stackProject { -# src = ../cardano-wallet; -# modules = [ -# ({config, ... }:{ packages.hello.package.setup-depends = [ Cabal ]; }) -# ];}).cardano-wallet.components.all -(let stack-pkgs = import ../cardano-wallet/flags-test/pkgs.nix; - in let pkg-set = pkgs.haskell-nix.mkStackPkgSet - { inherit stack-pkgs; - pkg-def-extras = [(hackage: { - packages = { - "transformers" = (((hackage.transformers)."0.5.6.2").revisions).default; - "process" = (((hackage.process)."1.6.5.0").revisions).default; - Win32 = hackage.Win32."2.8.3.0".revisions.default; - }; - }) - (hackage: { - packages = { - "hsc2hs" = (((hackage.hsc2hs)."0.68.4").revisions).default; - }; - })]; - modules = [ - { packages.Cabal.patches = [ ./overlays/patches/Cabal/fix-data-dir.patch ]; } - { packages.alex.package.setup-depends = [pkg-set.config.hsPkgs.Cabal]; } - { packages.happy.package.setup-depends = [pkg-set.config.hsPkgs.Cabal]; } - { doHaddock = false; } - ]; - # ++ (args.modules or []) - # ++ self.lib.optional (args ? ghc) { ghc.package = args.ghc; }; - }; - in pkg-set.config.hsPkgs -).cardano-wallet.components.all diff --git a/examples/cardano-wallet-mingw32.nix b/examples/cardano-wallet-mingw32.nix deleted file mode 100644 index 7ae77f0a0b..0000000000 --- a/examples/cardano-wallet-mingw32.nix +++ /dev/null @@ -1,3 +0,0 @@ -let inherit (import ../. {}) sources nixpkgsArgs; - pkgs = import sources.nixpkgs (nixpkgsArgs // { crossSystem.config = "x86_64-pc-mingw32"; }); -in (pkgs.haskell-nix.stackProject (import ./cardano-wallet-args.nix)).cardano-wallet.components.all diff --git a/examples/cardano-wallet-rpi.nix b/examples/cardano-wallet-rpi.nix deleted file mode 100644 index eb407628de..0000000000 --- a/examples/cardano-wallet-rpi.nix +++ /dev/null @@ -1,39 +0,0 @@ -let inherit (import ../. {}) sources nixpkgsArgs; - pkgs = import sources.nixpkgs (nixpkgsArgs // { crossSystem.config = "armv6l-unknown-linux-gnueabihf"; }); - Cabal = pkgs.buildPackages.haskell-nix.hackage-package { - name = "Cabal"; version = "2.4.1.0"; - modules = [ - { packages.Cabal.patches = [ ./Cabal-install-folder.diff ]; } - ]; -}; in -# (haskell-nix.stackProject { -# src = ../cardano-wallet; -# modules = [ -# ({config, ... }:{ packages.hello.package.setup-depends = [ Cabal ]; }) -# ];}).cardano-wallet.components.all -(let stack-pkgs = import ../cardano-wallet/flags-test/pkgs.nix; - in let pkg-set = pkgs.haskell-nix.mkStackPkgSet - { inherit stack-pkgs; - pkg-def-extras = [(hackage: { - packages = { - "transformers" = (((hackage.transformers)."0.5.6.2").revisions).default; - "process" = (((hackage.process)."1.6.5.0").revisions).default; - Win32 = hackage.Win32."2.8.3.0".revisions.default; - }; - }) - (hackage: { - packages = { - "hsc2hs" = (((hackage.hsc2hs)."0.68.4").revisions).default; - }; - })]; - modules = [ - { packages.Cabal.patches = [ ./overlays/patches/Cabal/fix-data-dir.patch ]; } - { packages.alex.package.setup-depends = [pkg-set.config.hsPkgs.Cabal]; } - { packages.happy.package.setup-depends = [pkg-set.config.hsPkgs.Cabal]; } - { doHaddock = false; } - ]; - # ++ (args.modules or []) - # ++ self.lib.optional (args ? ghc) { ghc.package = args.ghc; }; - }; - in pkg-set.config.hsPkgs -).cardano-wallet.components.all diff --git a/examples/cardano-wallet.nix b/examples/cardano-wallet.nix deleted file mode 100644 index b36579f27f..0000000000 --- a/examples/cardano-wallet.nix +++ /dev/null @@ -1,3 +0,0 @@ -let inherit (import ../. {}) sources nixpkgsArgs; - pkgs = import sources.nixpkgs nixpkgsArgs; -in (pkgs.haskell-nix.stackProject (import ./cardano-wallet-args.nix)).cardano-wallet.components.all diff --git a/examples/plutus-args.nix b/examples/plutus-args.nix deleted file mode 100644 index 480e954dd5..0000000000 --- a/examples/plutus-args.nix +++ /dev/null @@ -1,74 +0,0 @@ -let iohk-archive = name: hash: "https://github.com/input-output-hk/${name}/archive/${hash}.tar.gz"; -in rec { - src = builtins.fetchTarball (iohk-archive "plutus" "0d76e98ab267d621ad15002b5f824cad71797754"); - pkgs = [ - "language-plutus-core" - "plutus-core-interpreter" - "plutus-exe" - "plutus-ir" - "plutus-tx" - "plutus-use-cases" - "playground-common" - "marlowe" - "marlowe-playground-server" - "plutus-wallet-api" - "plutus-playground-server" - "plutus-playground-lib" - "plutus-tutorial" - "plutus-book" - "plutus-contract" - "plutus-emulator" - "deployment-server" - "iots-export" - "marlowe-symbolic" - ]; - cache = [ - { name = "row-types"; - url = "https://github.com/target/row-types"; - rev = "1e8d5e084ffd46f6c7842826a1f62c60820885df"; - sha256 = "0ly5m4r8wkm8gdqyrqzsjfmp189yxsd4qp0zi3idrbgfaf45sk9k"; } - { name = "purescript-bridge"; - url = "https://github.com/shmish111/purescript-bridge.git"; - rev = "0042602f8a195b1fe185138f9ccca02020b8dd62"; - sha256 = "1vl88g41f4vvgw9iyn7zd7i52qshpnk02z0y6czg4zy7wk3q12gz"; } - { name = "servant-purescript"; - url = "https://github.com/shmish111/servant-purescript.git"; - rev = "ece5d1dad16a5731ac22040075615803796c7c21"; - sha256 = "1axcbsaym64q67hvjc7b3izd48cgqwi734l7f7m22jpdc80li5f6"; } - { name = "cardano-crypto"; - url = "https://github.com/input-output-hk/cardano-crypto.git"; - rev = "f5cecb6e424cc84f85b6a3e1f803517bb7b4cfb1"; - sha256 = "1jyzai4sn9hi3p6r97h54f9a7an7vk38lwrbl4mds9zmdsw5f5ad"; } - { name = "unlit"; - url = "https://github.com/michaelpj/unlit.git"; - rev = "9ca1112093c5ffd356fc99c7dafa080e686dd748"; - sha256 = "145sffn8gbdn6xp9q5b75yd3m46ql5bnc02arzmpfs6wgjslfhff"; } - { name = "prometheus"; - url = "https://github.com/bitnomial/prometheus.git"; - rev = "69e4cefeb7d04d61a54cb0ae9fd57e2de134badb"; - sha256 = "0h836qp0ic587gfyfkj9a53p8rczja50sfy2y8ymx8wwkmq9zdgc"; } - { name = "github"; - url = "https://github.com/shmish111/github.git"; - rev = "cc27b9de4d5d0939235fa9a8b418de3ea4807bab"; - sha256 = "0jx65x4c8s561nbxa0hv7mp8fvndfhs8i8gzxng7ym808n4n538i"; } - ]; - # This is needed due to some deficiencies in stackage snapshots. - # maybe we should make this part of some `stack-default-pkg-def-extras`? - # We have similar logic in the snapshots.nix file to deal with this in - # snapshots. - # - # TODO: move this somewhere into stackProject - pkg-def-extras = [ - (hackage: { - packages = { - "transformers" = (((hackage.transformers)."0.5.6.2").revisions).default; - "process" = (((hackage.process)."1.6.5.0").revisions).default; - }; - }) - (hackage: { - packages = { - "hsc2hs" = (((hackage.hsc2hs)."0.68.4").revisions).default; - }; - }) - ]; -} diff --git a/examples/plutus-mingw32.nix b/examples/plutus-mingw32.nix deleted file mode 100644 index 67d9433add..0000000000 --- a/examples/plutus-mingw32.nix +++ /dev/null @@ -1,3 +0,0 @@ -let inherit (import ../. {}) sources nixpkgsArgs; - pkgs = import sources.nixpkgs (nixpkgsArgs // { crossSystem.config = "x86_64-pc-mingw32"; }); -in (pkgs.haskell-nix.stackProject (import ./plutus-args.nix)).language-plutus-core.components.all diff --git a/examples/plutus.nix b/examples/plutus.nix deleted file mode 100644 index c84dc2ead5..0000000000 --- a/examples/plutus.nix +++ /dev/null @@ -1,3 +0,0 @@ -let inherit (import ../. {}) sources nixpkgsArgs; - pkgs = import sources.nixpkgs nixpkgsArgs; -in (pkgs.haskell-nix.stackProject (import ./plutus-args.nix)).language-plutus-core.components.all diff --git a/lib/default.nix b/lib/default.nix index 0c62e4847d..27f006a999 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -52,8 +52,7 @@ in { tys; in libComp (subComps z); - getAllComponents = foldComponents subComponentTypes (c: acc: - lib.optional c.buildable c ++ acc) []; + getAllComponents = foldComponents subComponentTypes (c: acc: [c] ++ acc) []; componentPrefix = { sublibs = "lib"; @@ -68,19 +67,16 @@ in { comps = config.components; applyLibrary = cname: f { cname = config.package.identifier.name; ctype = "lib"; }; applySubComp = ctype: cname: f { inherit cname; ctype = componentPrefix.${ctype} or (throw "Missing component mapping for ${ctype}."); }; - applyAllComp = f { cname = config.package.identifier.name; ctype = "all"; }; buildableAttrs = lib.filterAttrs (n: comp: comp.buildable or true); libComp = if comps.library == null || !(comps.library.buildable or true) then {} - else lib.mapAttrs applyLibrary (removeAttrs comps (subComponentTypes ++ [ "all" "setup" ])); + else lib.mapAttrs applyLibrary (removeAttrs comps (subComponentTypes ++ [ "setup" ])); subComps = lib.mapAttrs (ctype: attrs: lib.mapAttrs (applySubComp ctype) (buildableAttrs attrs)) (builtins.intersectAttrs (lib.genAttrs subComponentTypes (_: null)) comps); - allComp = { all = applyAllComp comps.all; }; - in subComps // libComp // allComp; + in subComps // libComp; isLibrary = componentId: componentId.ctype == "lib"; - isAll = componentId: componentId.ctype == "all"; isExe = componentId: componentId.ctype == "exe"; isTest = componentId: componentId.ctype == "test"; isBenchmark = componentId: componentId.ctype == "bench"; @@ -89,8 +85,7 @@ in { || isTest componentId || isBenchmark componentId; mayHaveExecutable = componentId: - isExecutableType componentId - || isAll componentId; + isExecutableType componentId; # Was there a reference to the package source in the `cabal.project` or `stack.yaml` file. # This is used to make the default `packages` list for `shellFor`. @@ -104,9 +99,7 @@ in { # Format a componentId as it should appear as a target on the # command line of the setup script. - componentTarget = componentId: - if componentId.ctype == "all" then "" - else "${componentId.ctype}:${componentId.cname}"; + componentTarget = componentId:"${componentId.ctype}:${componentId.cname}"; # Remove null or empty values from an attrset. optionalHooks = lib.filterAttrs (_: hook: hook != null && hook != ""); diff --git a/modules/package.nix b/modules/package.nix index c9722b8ea7..f4d380c455 100644 --- a/modules/package.nix +++ b/modules/package.nix @@ -263,15 +263,6 @@ in { type = attrsOf componentType; default = {}; }; - all = mkOption { - type = componentType; - apply = all: all // { - # TODO: Should this check for the entire component - # definition to match, rather than just the identifier? - depends = builtins.filter (p: p.identifier != config.package.identifier) all.depends; - }; - description = "The merged dependencies of all other components"; - }; }; name = mkOption { @@ -305,29 +296,4 @@ in { default = []; }; }; - - # This has one quirk. Manually setting options on the all component - # will be considered a conflict. This is almost always fine; most - # settings should be modified in either the package options, or an - # individual component's options. When this isn't sufficient, - # mkForce is a reasonable workaround. - # - # An alternative solution to mkForce for many of the options where - # this is relevant would be to switch from the bool type to - # something like an anyBool type, which would merge definitions by - # returning true if any is true. - config.components.all = - let allComps = haskellLib.getAllComponents config; - in lib.mkMerge ( - builtins.map (c: - # Exclude attributes that are likely to have conflicting definitions - # (a common use case for `all` is in `shellFor` and it only has an - # install phase). - builtins.removeAttrs c ["preCheck" "postCheck" "keepSource"] - ) allComps - ) // { - # If any one of the components needs us to keep the source - # then keep it for the `all` component - keepSource = lib.foldl' (x: comp: x || comp.keepSource) false allComps; - }; } diff --git a/test/cabal-22/default.nix b/test/cabal-22/default.nix index f38ff71692..e16f2d92d9 100644 --- a/test/cabal-22/default.nix +++ b/test/cabal-22/default.nix @@ -14,7 +14,7 @@ in recurseIntoAttrs { ifdInputs = { inherit (project) plan-nix; }; - shell = util.addCabalInstall packages.project.components.all; + shell = util.addCabalInstall packages.project.components.library; run = stdenv.mkDerivation { name = "cabal-22-test"; diff --git a/test/cabal-hpack/default.nix b/test/cabal-hpack/default.nix index 0e2174fb04..c169894b28 100644 --- a/test/cabal-hpack/default.nix +++ b/test/cabal-hpack/default.nix @@ -25,10 +25,6 @@ in recurseIntoAttrs { inherit (project) plan-nix; }; - # Used for testing externally with nix-shell (../tests.sh). - # This just adds cabal-install to the existing shells. - test-shell = util.addCabalInstall packages.cabal-hpack.components.all; - run = stdenv.mkDerivation { name = "cabal-hpack-test"; @@ -56,11 +52,6 @@ in recurseIntoAttrs { otool -L $exe |grep .dylib '')) + '' - printf "Checking that \"all\" component has the programs... " >& 2 - all_exe="${packages.cabal-hpack.components.all}/bin/cabal-hpack${stdenv.hostPlatform.extensions.executable}" - test -f "$all_exe" - echo "$all_exe" >& 2 - touch $out ''; diff --git a/test/cabal-simple-prof/default.nix b/test/cabal-simple-prof/default.nix index 6bf9c10980..fb7c32b67a 100644 --- a/test/cabal-simple-prof/default.nix +++ b/test/cabal-simple-prof/default.nix @@ -51,10 +51,6 @@ in recurseIntoAttrs { passthru = { # Used for debugging with nix repl inherit project packages; - - # Used for testing externally with nix-shell (../tests.sh). - # This just adds cabal-install to the existing shells. - test-shell = util.addCabalInstall packages.cabal-simple.components.all; }; }; } diff --git a/test/cabal-simple/default.nix b/test/cabal-simple/default.nix index 9cf2c6d7d5..d1a6486f2e 100644 --- a/test/cabal-simple/default.nix +++ b/test/cabal-simple/default.nix @@ -26,8 +26,7 @@ in recurseIntoAttrs { }; # Used for testing externally with nix-shell (../tests.sh). - # This just adds cabal-install to the existing shells. - test-shell = util.addCabalInstall packages.cabal-simple.components.all; + test-shell = packages.shellFor { tools = { cabal = "3.2.0.0"; }; }; run = stdenv.mkDerivation { name = "cabal-simple-test"; @@ -56,11 +55,6 @@ in recurseIntoAttrs { otool -L $exe |grep .dylib '')) + '' - printf "Checking that \"all\" component has the programs... " >& 2 - all_exe="${packages.cabal-simple.components.all}/bin/cabal-simple${stdenv.hostPlatform.extensions.executable}" - test -f "$all_exe" - echo "$all_exe" >& 2 - touch $out ''; diff --git a/test/cabal-sublib/default.nix b/test/cabal-sublib/default.nix index f19a944f30..c174d32f33 100644 --- a/test/cabal-sublib/default.nix +++ b/test/cabal-sublib/default.nix @@ -48,11 +48,6 @@ in recurseIntoAttrs { otool -L $exe |grep .dylib '') + '' - printf "Checking that \"all\" component has the programs... " >& 2 - all_exe="${packages.cabal-sublib.components.all}/bin/cabal-sublib${stdenv.hostPlatform.extensions.executable}" - test -f "$all_exe" - echo "$all_exe" >& 2 - touch $out ''; @@ -61,10 +56,6 @@ in recurseIntoAttrs { passthru = { # Used for debugging with nix repl inherit packages; - - # Used for testing externally with nix-shell (../tests.sh). - # This just adds cabal-install to the existing shells. - test-shell = util.addCabalInstall packages.cabal-sublib.components.all; }; }; } diff --git a/test/exe-only/default.nix b/test/exe-only/default.nix index 812410d97c..d30a5cf9ad 100644 --- a/test/exe-only/default.nix +++ b/test/exe-only/default.nix @@ -41,11 +41,6 @@ in recurseIntoAttrs { otool -L $exe |grep .dylib '') + '' - printf "Checking that \"all\" component has the programs... " >& 2 - all_exe="${packages.exe-only.components.all}/bin/exe-only${stdenv.hostPlatform.extensions.executable}" - test -f "$all_exe" - echo "$all_exe" >& 2 - touch $out ''; @@ -54,10 +49,6 @@ in recurseIntoAttrs { passthru = { # Used for debugging with nix repl inherit packages; - - # Used for testing externally with nix-shell (../tests.sh). - # This just adds cabal-install to the existing shells. - test-shell = util.addCabalInstall packages.exe-only.components.all; }; }; } diff --git a/test/extra-hackage/default.nix b/test/extra-hackage/default.nix index 9d0e26568a..8ae85d1365 100644 --- a/test/extra-hackage/default.nix +++ b/test/extra-hackage/default.nix @@ -56,10 +56,6 @@ in recurseIntoAttrs { '' + optionalString stdenv.isDarwin '' otool -L $exe |grep .dylib '')) + '' - printf "Checking that \"all\" component has the programs... " >& 2 - all_exe="${packages.external-package-user.components.all}/bin/external-package-user${stdenv.hostPlatform.extensions.executable}" - test -f "$all_exe" - echo "$all_exe" >& 2 touch $out ''; meta.platforms = platforms.all; diff --git a/test/sublib-docs/default.nix b/test/sublib-docs/default.nix index 7603fe0645..1d128ea6cf 100644 --- a/test/sublib-docs/default.nix +++ b/test/sublib-docs/default.nix @@ -38,11 +38,6 @@ in recurseIntoAttrs { otool -L $exe |grep .dylib '') + '' - printf "Checking that \"all\" component has the programs... " >& 2 - all_exe="${packages.sublib-docs.components.all}/bin/sublib-docs${stdenv.hostPlatform.extensions.executable}" - test -f "$all_exe" - echo "$all_exe" >& 2 - # Check that it looks like we have docs test -f "${packages.sublib-docs.components.library.doc}/share/doc/sublib-docs/html/Lib.html" test -f "${packages.sublib-docs.components.sublibs.slib.doc}/share/doc/slib/html/Slib.html" @@ -55,10 +50,6 @@ in recurseIntoAttrs { passthru = { # Used for debugging with nix repl inherit packages; - - # Used for testing externally with nix-shell (../tests.sh). - # This just adds cabal-install to the existing shells. - test-shell = util.addCabalInstall packages.sublib-docs.components.all; }; }; } diff --git a/test/tests.sh b/test/tests.sh index 514ea59f6f..ed4aeadf03 100755 --- a/test/tests.sh +++ b/test/tests.sh @@ -129,7 +129,7 @@ echo >& 2 printf "*** Checking that package with extra Hackages can be build...\n" >& 2 nix build $NIX_BUILD_ARGS --no-link \ -f ./default.nix --argstr compiler-nix-name $GHC \ - extra-hackage.run.project.hsPkgs.external-package-user.components.all + extra-hackage.run.project.hsPkgs.external-package-user.components.exes.external-package-user echo >& 2 printf "\n*** Finished successfully\n" >& 2 diff --git a/test/with-packages/default.nix b/test/with-packages/default.nix index ab6804149f..f97a79b2bc 100644 --- a/test/with-packages/default.nix +++ b/test/with-packages/default.nix @@ -5,7 +5,7 @@ with util; let pkgs = import ./pkgs.nix; - pkgSet = mkPkgSet { + pkgSet = doExactConfig: mkPkgSet { # generated with: # cabal new-build # plan-to-nix -o . @@ -19,65 +19,64 @@ let # vary component config for tests { - packages.test-with-packages.components = { - all.doExactConfig = mkForce false; # the default; use force because of quirk in all. See package.nix - library.doExactConfig = true; # not the default - }; + packages.test-with-packages.components.library.doExactConfig = doExactConfig; } ]; }; - packages = pkgSet.config.hsPkgs; + packages = doExactConfig: (pkgSet doExactConfig).config.hsPkgs; - package = packages.test-with-packages; - inherit (package.components) library; + package = doExactConfig: (packages doExactConfig).test-with-packages; + + decLibrary = (package true).components.library; + library = (package false).components.library; pkgId = p: "${p.identifier.name}-${p.identifier.version}"; - showDepends = component: concatMapStringsSep " " pkgId component.depends; + showDepends = component: concatMapStringsSep " " pkgId (component.depends or []); in recurseIntoAttrs { # Used for testing externally with nix-shell (../tests.sh). # This just adds cabal-install to the existing shells. - test-shell = addCabalInstall packages.test-with-packages.components.all; + test-shell = addCabalInstall library; # A variant of test-shell with the component option doExactConfig enabled - test-shell-dec = addCabalInstall packages.test-with-packages.components.library; + test-shell-dec = addCabalInstall decLibrary; run = stdenv.mkDerivation { name = "with-packages-test"; - libraryDepends = showDepends pkgSet.config.packages.test-with-packages.components.library; - allDepends = showDepends pkgSet.config.packages.test-with-packages.components.all; + decLibraryDepends = showDepends (pkgSet true).config.packages.test-with-packages.components.library; + libraryDepends = showDepends (pkgSet false).config.packages.test-with-packages.components.library; buildCommand = '' ######################################################################## # test with-packages - printf "checking merging of the 'all' component depends ... " >& 2 - if [ -n "$libraryDepends" -a "$libraryDepends" = "$allDepends" ]; then + printf "checking component depends ... " >& 2 + if [ -n "$decLibraryDepends" -a "$decLibraryDepends" = "$libraryDepends" ]; then echo "PASS" >& 2 else echo "FAIL" >& 2 + echo "decLibraryDepends = $decLibraryDepends" echo "libraryDepends = $libraryDepends" - echo "allDepends = $allDepends" exit 1 fi - printf "checking that the 'all' component works... " >& 2 - echo ${package.components.all} >& 2 + printf "checking that the 'library' without doExactConfig works... " >& 2 + echo ${library} >& 2 - printf "checking that the 'library' component works... " >& 2 - echo ${package.components.library} >& 2 + printf "checking that the 'library' with doExactConfig works... " >& 2 + echo ${decLibrary} >& 2 '' + (if stdenv.hostPlatform.isWindows then '' printf "runghc tests are not working yet for windows. skipping. " >& 2 '' else '' - printf "checking that the package env has the dependencies... " >& 2 - ${package.components.all.env}/bin/${package.components.all.env.targetPrefix}runghc ${./Point.hs} + printf "checking that non doExactConfig liarary.env has the dependencies... " >& 2 + ${library.env}/bin/${library.env.targetPrefix}runghc ${./Point.hs} echo >& 2 - printf "checking that components.library.env has the dependencies... " >& 2 - ${library.env}/bin/${library.env.targetPrefix}runghc ${./Point.hs} + printf "checking that doExactConfig library.env has the dependencies... " >& 2 + ${decLibrary.env}/bin/${decLibrary.env.targetPrefix}runghc ${./Point.hs} echo >& 2 '') + '' touch $out