question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nix build fails at `remote-import` test

See original GitHub issue

Thanks for this project!

On current main (ce01be3), I’m seeing that nix build fails while running the tasty test suite. Looking at the logs, the failure appears to be

remote-import-input - error:                            FAIL
          Missing golden value.

(expected behavior: pass, or possibly skip this test when building with Nix?)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Gabriella439commented, Jul 1, 2022

Alright, this should be fixed now. I ended up going with changing the default build target to not build tests

0reactions
mcwittcommented, Jun 29, 2022

I’m assuming the issue is that the failing tests require network access, but this is not allowed in a sandboxed build, which I think is the default on NixOS.

I looked around a bit for a workaround (found, e.g. this and this). The two workarounds I’ve come up with are

  1. Disabling the sandbox (e.g. with nix build --option sandbox false)
  2. Building the graceNoTests attribute instead

Wondering if it’d make sense to add a note to the readme about disabling sandboxing, or potentially change the default build target to graceNoTests? I’d be happy to PR this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test failure when using a custom store location · Issue #5562
Describe the bug I have successfully bootstrapped nix using ~/.nix/{store,var,etc}, and can install additional packages to complete.
Read more >
Nixpkgs 22.11 manual
Nix expressions describe how to build packages from source and are collected in the nixpkgs repository. Also included in the collection are Nix...
Read more >
`nix-build` fails because Python wants something that's ...
The error. When I run nix-build -A serialosc from the root of nixpkgs, nix prints the following: [jeff@jbb ...
Read more >
How do I diagnose a failing nix-build?
I'd expect to find some logs / errors of why it failed to build? Following from https://stackoverflow.com/a/47264375/1663462: I've tried adding ...
Read more >
Unit Test Your Nix Code
Cleanly and seamlessly add unit tests to your nix functions. ... the list will be populated with information telling you which test failed....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found