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

Using libnix-haskell within cabal2nix results in test failures #1

Closed
nzhang-zh opened this issue Nov 17, 2018 · 1 comment
Closed

Comments

@nzhang-zh
Copy link

Hi, when using this library under cabal2nix, we get test failures:

Preprocessing test suite 'tests' for libnix-0.2.0.1..
Building test suite 'tests' for libnix-0.2.0.1..
[1 of 2] Compiling TestShellout     ( tests/TestShellout.hs, dist/build/tests/tests-tmp/TestShellout.o )
[2 of 2] Compiling Main             ( tests/Main.hs, dist/build/tests/tests-tmp/Main.o )
Linking dist/build/tests/tests ...
running tests
Running 1 test suites...
Test suite tests: RUNNING...
shellout tests
  parsing
    syntax error:                       FAIL
      Exception: nix-instantiate: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
  evaluating
    infinite recursion:                 FAIL
      Exception: nix-instantiate: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
    not a derivation:                   FAIL
      Exception: nix-instantiate: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
    a basic derivation:                 FAIL
      Exception: nix-instantiate: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
  realizing
    nixpkgs is accessible:              FAIL
      Exception: nix-instantiate: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
    nixpkgs multiline stderr it parsed: FAIL
      Exception: nix-instantiate: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
    build the GNU hello package:        FAIL
      Exception: nix-instantiate: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
    copy a temporary file to store:     FAIL
      Exception: nix-store: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

8 out of 8 tests failed (0.00s)
Test suite tests: FAIL
Test suite logged to: dist/test/libnix-0.2.0.1-tests.log
0 of 1 test suites (0 of 1 test cases) passed.
builder for '/nix/store/vdnkknix4c0czdkcrn5i2c5r3gj54b9f-libnix-0.2.0.1.drv' failed with exit code 1
cannot build derivation '/nix/store/mdq71h78kizf57q2zbiv8n84xc1gq99z-ghc-8.4.3-with-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/mdq71h78kizf57q2zbiv8n84xc1gq99z-ghc-8.4.3-with-packages.drv' failed

We put libnix in the dependencies of our package.yaml, and then we use cabal2nix to generate the cabal.nix file with the --hpack flag. We're running on NixOS inside a nix-shell. But it seems we are missing somethings in our build/test environment. We tried putting nix and nix-prefetch-scripts into the build-tools section as well, but the same error occurred.

@Profpatsch
Copy link
Owner

Running nix within a nix build requires setting up a local nix store. I’d just disable the tests for now, here’s a PR for that: NixOS/nixpkgs#50733

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

No branches or pull requests

2 participants