Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make nix-shells functional #535

Merged
merged 2 commits into from
Feb 7, 2020
Merged

Make nix-shells functional #535

merged 2 commits into from
Feb 7, 2020

Conversation

jbgi
Copy link
Contributor

@jbgi jbgi commented Feb 3, 2020

No description provided.

@jbgi jbgi added the WIP Work In Progress (cannot be merged yet) label Feb 3, 2020
@jbgi jbgi force-pushed the nix-shell-fixes branch 5 times, most recently from 832fde1 to 86bfd9c Compare February 4, 2020 14:22
@jbgi
Copy link
Contributor Author

jbgi commented Feb 4, 2020

So one issue remaining is that nix-shell does not provides all required dependencies of the project.
This is due to this four lines:

https://github.com/input-output-hk/cardano-node/blob/nix-shell-fixes/default.nix#L49-L52

when commenting one (eg. ps.ouroboros-network), then we do get ouroboros-network:

$ nix-shell --run "ghc-pkg list | grep ouroboros-network-0"
WARNING: there are broken packages.  Run 'ghc-pkg check' for more details.
    ouroboros-network-0.1.0.0

but then nix-shell --run "cabal new-build all" result in:

trace: Using index-state: 2020-01-31T00:00:00Z for cardano-node
trace: WARNING: license "GPL-2.0-or-later" not found
Warning: No remote package servers have been specified. Usually you would have
one specified in the config file.
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: ouroboros-network-0.1.0.0 (user goal)
[__1] unknown package: splitmix (dependency of ouroboros-network)
[__1] fail (backjumping, conflict set: ouroboros-network, splitmix)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ouroboros-network, splitmix

Also I believe we should have been able to remove the packages list in shellFor, but then I get

nix-shell                            
trace: Using index-state: 2020-01-31T00:00:00Z for cardano-node
trace: Shell for canonical-json cardano-binary cardano-binary-test cardano-config cardano-crypto cardano-crypto-class cardano-crypto-test cardano-crypto-wrapper cardano-ledger cardano-ledger-test cardano-node cardano-prelude cardano-prelude-test cardano-shell cardano-sl-x509 cardano-slotting contra-tracer cs-blockchain cs-ledger ekg-prometheus-adapter goblins io-sim io-sim-classes iohk-monitoring lobemo-backend-aggregation lobemo-backend-editor lobemo-backend-ekg lobemo-backend-monitoring lobemo-scribe-systemd network-mux ouroboros-consensus ouroboros-network ouroboros-network-testing small-steps tracer-transformers typed-protocols typed-protocols-cbor
trace: WARNING: license "GPL-2.0-or-later" not found
these derivations will be built:
  /nix/store/8vgfk3kablr5dcdyzh5qdxvavgfmfr8g-doctest-0.16.2-lib-doctest.drv
  /nix/store/v4hd9pzhclyga60q4yz0jrjfiadi6gvd-doctest-discover-0.2.0.0-exe-doctest-discover-config.drv
  /nix/store/41m73nf873rcr0d947mgx2bygb4nf0ja-doctest-discover-0.2.0.0-exe-doctest-discover-ghc-8.6.5.drv
  /nix/store/1lm8vb939zlg4vifd1qbd1y81mmpsdkw-doctest-discover-0.2.0.0-exe-doctest-discover.drv
  /nix/store/3aw0nr8ff3qp8wi2w5b46w0vyxjn9mz1-criterion-1.5.6.1-lib-criterion.drv
  /nix/store/w51lv8gz0g0prijzx6pzlj8im77xx4zs-ghc-shell-for-packages-config.drv
  /nix/store/mr2iw9dabnrw8bgw0jzmwkmdc3xfdyc0-ghc-shell-for-packages-ghc-8.6.5.drv
cannot build on 'ssh://[email protected]': cannot connect to '[email protected]': ssh: Could not resolve hostname jbox.lan: Name or service not known
building '/nix/store/3aw0nr8ff3qp8wi2w5b46w0vyxjn9mz1-criterion-1.5.6.1-lib-criterion.drv'...
building '/nix/store/8vgfk3kablr5dcdyzh5qdxvavgfmfr8g-doctest-0.16.2-lib-doctest.drv'...
unpacking sources
unpacking source archive /nix/store/qyb93rdadfyfkm9g351yqvpy603cy636-doctest-0.16.2.tar.gz
unpacking sources
unpacking source archive /nix/store/ps4hjd217pi8aprz4xrhwhbwh59f5v7c-criterion-1.5.6.1.tar.gz
source root is doctest-0.16.2
source root is criterion-1.5.6.1
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file doctest-0.16.2/test/UtilSpec.hs
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file criterion-1.5.6.1/tests/Tests.hs
patching sources
patching sources
configuring
configuring
Configure flags:
Configure flags:
--prefix=/nix/store/480m7lib3sd4314qznadsnyv7znfj61x-doctest-0.16.2-lib-doctest lib:doctest --package-db=clear --package-db=/nix/store/4cpj6hhni5arnjspljxkkgj6wncnjqpq-doctest-0.16.2-lib-doctest-config/package.conf.d --exact-configuration --dependency=base-compat=base-compat-0.10.5-Dy5duq1w4Nx2LAyhDPP2kW --dependency=code-page=code-page-0.2-3TjNtc9lu3RJN6poyFdQXs --dependency=directory=directory-1.3.3.0-LXsv7S3typRKfQLLw30VnB --dependency=ghc-paths=ghc-paths-0.1.0.12-8MhNqRZlSJXAzmVO0F6ybT --dependency=process=process-1.6.5.0-6sDYL8PwWtTIu8NgyfUrv --dependency=syb=syb-0.7.1-1gO4OjQOULM8usUjWwwEyW --dependency=rts=rts --dependency=ghc-heap=ghc-heap-8.6.5 --dependency=ghc-prim=ghc-prim-0.5.3 --dependency=integer-gmp=integer-gmp-1.0.2.0 --dependency=base=base-4.12.0.0 --dependency=deepseq=deepseq-1.4.4.0 --dependency=array=array-0.5.3.0 --dependency=ghc-boot-th=ghc-boot-th-8.6.5 --dependency=pretty=pretty-1.1.3.6 --dependency=template-haskell=template-haskell-2.14.0.0 --dependency=ghc-boot=ghc-boot-8.6.5 --dependency=ghc=ghc-8.6.5 --dependency=array=array-0.5.3.0 --dependency=binary=binary-0.8.6.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.6.0.1 --dependency=filepath=filepath-1.4.2.1 --dependency=ghc-boot=ghc-boot-8.6.5 --dependency=ghc-compact=ghc-compact-0.1.0.0 --dependency=ghc-prim=ghc-prim-0.5.3 --dependency=hpc=hpc-0.6.0.3 --dependency=mtl=mtl-2.2.2 --dependency=parsec=parsec-3.1.13.0 --dependency=text=text-1.2.3.1 --dependency=transformers=transformers-0.5.6.2 --dependency=xhtml=xhtml-3000.2.2.1 --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld.gold --ghc-option=-optl-fuse-ld=gold --ld-option=-fuse-ld=gold --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-executable-profiling --enable-static --enable-shared --docdir=/nix/store/17gaajv4fy5glnirj9im9iyf5l1hc4lb-doctest-0.16.2-lib-doctest-doc/share/doc/doctest --enable-split-sections
--prefix=/nix/store/j40mhzhfj4i730n6rmmwpp7z282jkz6x-criterion-1.5.6.1-lib-criterion lib:criterion --package-db=clear --package-db=/nix/store/2wdwbj9pfd42a5njnxx6hnkbf4smf9h6-criterion-1.5.6.1-lib-criterion-config/package.conf.d --flags=-embed-data-files --flags=-fast --exact-configuration --dependency=aeson=aeson-1.4.6.0-HFSQiP7HK5X2jdAfiZm2UA --dependency=ansi-wl-pprint=ansi-wl-pprint-0.6.9-FB0s33jagFpHaQREf1SiCD --dependency=base-compat-batteries=base-compat-batteries-0.10.5-B2Ta3OiCEb7K1OoqJHX26I --dependency=binary-orphans=binary-orphans-1.0.1-gM9r5zmjZZ9m4Pw3y8ai2 --dependency=cassava=cassava-0.5.2.0-JSx0WxEgeeARfstvlqsX1 --dependency=code-page=code-page-0.2-3TjNtc9lu3RJN6poyFdQXs --dependency=criterion-measurement=criterion-measurement-0.1.2.0-7dERVERq3za8eHzZhE4Hl8 --dependency=directory=directory-1.3.3.0-LXsv7S3typRKfQLLw30VnB --dependency=exceptions=exceptions-0.10.4-5BVKIcPtkVTKzv0gctTX4C --dependency=Glob=Glob-0.10.0-3fT8s236K4aBvRlQYhxWMN --dependency=microstache=microstache-1.0.1.1-E8CSjGCkg81AhvCxW5zPys --dependency=js-flot=js-flot-0.8.3-LF7vQ1kAGl41Nl58RwjSyK --dependency=js-jquery=js-jquery-3.3.1-DZqkP3t9sdEKaANNNRYiKE --dependency=mwc-random=mwc-random-0.14.0.0-Hfl5eIcPX6Q2Le3VjNd5Ms --dependency=optparse-applicative=optparse-applicative-0.15.1.0-Gj5Mlkc2PAFLqqrTvqDECj --dependency=statistics=statistics-0.15.2.0-Ke8AOQsfKVh8GEeuaAcjhr --dependency=time=time-1.8.0.2-AafkK8efzO4LWJtdEUcpKh --dependency=transformers-compat=transformers-compat-0.6.5-9e4biiR1CNSADVloF4o7Bd --dependency=vector=vector-0.12.0.3-LfvlcMFJAcY18uD1Y2O5Ig --dependency=vector-algorithms=vector-algorithms-0.8.0.3-2XC3iTGVQK9JP65nYdD1ag --dependency=rts=rts --dependency=ghc-heap=ghc-heap-8.6.5 --dependency=ghc-prim=ghc-prim-0.5.3 --dependency=integer-gmp=integer-gmp-1.0.2.0 --dependency=base=base-4.12.0.0 --dependency=deepseq=deepseq-1.4.4.0 --dependency=array=array-0.5.3.0 --dependency=ghc-boot-th=ghc-boot-th-8.6.5 --dependency=pretty=pretty-1.1.3.6 --dependency=template-haskell=template-haskell-2.14.0.0 --dependency=ghc-boot=ghc-boot-8.6.5 --dependency=ghc=ghc-8.6.5 --dependency=array=array-0.5.3.0 --dependency=binary=binary-0.8.6.0 --dependency=bytestring=bytestring-0.10.8.2 --dependency=containers=containers-0.6.0.1 --dependency=filepath=filepath-1.4.2.1 --dependency=ghc-boot=ghc-boot-8.6.5 --dependency=ghc-compact=ghc-compact-0.1.0.0 --dependency=ghc-prim=ghc-prim-0.5.3 --dependency=hpc=hpc-0.6.0.3 --dependency=mtl=mtl-2.2.2 --dependency=parsec=parsec-3.1.13.0 --dependency=text=text-1.2.3.1 --dependency=transformers=transformers-0.5.6.2 --dependency=xhtml=xhtml-3000.2.2.1 --with-ghc=ghc --with-ghc-pkg=ghc-pkg --with-hsc2hs=hsc2hs --with-gcc=cc --with-ld=ld.gold --ghc-option=-optl-fuse-ld=gold --ld-option=-fuse-ld=gold --with-ar=ar --with-strip=strip --disable-executable-stripping --disable-library-stripping --disable-library-profiling --disable-executable-profiling --enable-static --enable-shared --docdir=/nix/store/yx3q0p7cp8kj0l2vdrn7wmsxyrn40hib-criterion-1.5.6.1-lib-criterion-doc/share/doc/criterion --enable-split-sections
Configuring library for criterion-1.5.6.1..
Warning: The flag --disable-executable-profiling is deprecated. Please use
--disable-profiling instead.
Configuring library for doctest-0.16.2..
Warning: The flag --disable-executable-profiling is deprecated. Please use
--disable-profiling instead.
Error:
    The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.
installed package ghc-8.6.5 is broken due to missing package directory-1.3.3.0, process-1.6.5.0, terminfo-0.4.1.2, time-1.8.0.2, unix-2.7.2.2
installed package ghc-boot-8.6.5 is broken due to missing package directory-1.3.3.0
installed package ghci-8.6.5 is broken due to missing package unix-2.7.2.2
installed package hpc-0.6.0.3 is broken due to missing package directory-1.3.3.0, time-1.8.0.2

builder for '/nix/store/8vgfk3kablr5dcdyzh5qdxvavgfmfr8g-doctest-0.16.2-lib-doctest.drv' failed with exit code 1
cannot build derivation '/nix/store/v4hd9pzhclyga60q4yz0jrjfiadi6gvd-doctest-discover-0.2.0.0-exe-doctest-discover-config.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/w51lv8gz0g0prijzx6pzlj8im77xx4zs-ghc-shell-for-packages-config.drv': 1 dependencies couldn't be built
error: build of '/nix/store/1lm8vb939zlg4vifd1qbd1y81mmpsdkw-doctest-discover-0.2.0.0-exe-doctest-discover.drv', '/nix/store/mr2iw9dabnrw8bgw0jzmwkmdc3xfdyc0-ghc-shell-for-packages-ghc-8.6.5.drv', '/nix/store/w51lv8gz0g0prijzx6pzlj8im77xx4zs-ghc-shell-for-packages-config.drv' failed

edit: this a known issue, cf. haskell/cabal#5444 and haskell/cabal#6249

@jbgi jbgi force-pushed the nix-shell-fixes branch 2 times, most recently from 9679b95 to dac792d Compare February 4, 2020 16:38
@jbgi
Copy link
Contributor Author

jbgi commented Feb 4, 2020

note: this PR currently depends on input-output-hk/iohk-nix#317

@jbgi jbgi force-pushed the nix-shell-fixes branch 4 times, most recently from 3d60602 to e762922 Compare February 5, 2020 23:05
@jbgi jbgi changed the title Make shell functionnal. some progress on stack build. Make nix-shells functionnal Feb 5, 2020
@jbgi jbgi force-pushed the nix-shell-fixes branch 5 times, most recently from f7f5c08 to 7bc4f40 Compare February 6, 2020 13:52
@jbgi jbgi force-pushed the nix-shell-fixes branch 2 times, most recently from 901605a to ac8244d Compare February 6, 2020 23:13
@craigem craigem changed the title Make nix-shells functionnal Make nix-shells functional Feb 7, 2020
@jbgi jbgi force-pushed the nix-shell-fixes branch 6 times, most recently from 5095868 to 017563e Compare February 7, 2020 10:18
@jbgi jbgi force-pushed the nix-shell-fixes branch 3 times, most recently from 911e0a8 to 0b6a98b Compare February 7, 2020 15:44
@jbgi jbgi removed the WIP Work In Progress (cannot be merged yet) label Feb 7, 2020
@jbgi jbgi requested review from deepfire and disassembler February 7, 2020 15:58
@jbgi
Copy link
Contributor Author

jbgi commented Feb 7, 2020

bors r+

iohk-bors bot added a commit that referenced this pull request Feb 7, 2020
535: Make nix-shells functional r=jbgi a=jbgi



Co-authored-by: Jean-Baptiste Giraudeau <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Feb 7, 2020

@iohk-bors iohk-bors bot merged commit 4271bc0 into master Feb 7, 2020
@iohk-bors iohk-bors bot deleted the nix-shell-fixes branch February 7, 2020 18:20
craigem added a commit to IntersectMBO/cardano-base that referenced this pull request Feb 10, 2020
craigem added a commit to IntersectMBO/cardano-base that referenced this pull request Feb 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants