NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.99k stars 14.01k forks source link

haskellPackages.hnix fails to build on macOS #111562

Closed siraben closed 3 years ago

siraben commented 3 years ago

Describe the bug Fails to build to do a failing system call in the tests

To Reproduce

$  nix build -f. haskellPackages.hnix           
Failed to find a machine for remote build!
derivation: 5k8f28jw1q9wgzr7vv24pza2xbqw85gv-hnix-store-core-0.4.1.0.drv
required (system, features): (x86_64-darwin, )
1 available machines:
(systems, maxjobs, supportedFeatures, mandatoryFeatures)
(x86_64-linux, 1, big-parallel, kvm, )
error: builder for '/nix/store/5k8f28jw1q9wgzr7vv24pza2xbqw85gv-hnix-store-core-0.4.1.0.drv' failed with exit code 1;
       last 10 log lines:
       >     create test files (0.43s)
       >       readCreateProcess: ls "/proc/65598/fd" (exit 2): failed
       >   golden
       >     derivation roundtrip of tests/samples/example0.drv:                                                        OK
       >     derivation roundtrip of tests/samples/example1.drv:                                                        OK
       >
       > 1 out of 36 tests failed (0.82s)
       > Test suite format-tests: FAIL
       > Test suite logged to: dist/test/hnix-store-core-0.4.1.0-format-tests.log
       > 0 of 1 test suites (0 of 1 test cases) passed.
       For full logs, run 'nix log /nix/store/5k8f28jw1q9wgzr7vv24pza2xbqw85gv-hnix-store-core-0.4.1.0.drv'.
error: 1 dependencies of derivation '/nix/store/cwzn25xbc8aw8s333d1r6n3bdshgvr31-hnix-0.12.0.1.drv' failed to build

Expected behavior hnix should build

Notify maintainers @peti

cdepillabout commented 3 years ago

@siraben There are unfortunately not that many people fixing up things on MacOS, but if you're interested in figuring out a fix and sending a patch (and possibly reporting upstream if necessary), it would be great to get this working.

peti commented 3 years ago

Ping @Anton-Latukha. Can you help, maybe?

Anton-Latukha commented 3 years ago

Yes.

HNix-Store-Core project test suite uses /proc, and macOS has no /proc https://github.com/haskell-nix/hnix-store/issues/109.

Lets say, HNix-Store-* is still improving the maintenance situation in it: https://matrix.hackage.haskell.org/#/package/hnix-store-core. Need some time how to carefully figure out how to unwrap the situation in it.

Anton-Latukha commented 3 years ago

Thought a bit and started to crank the situation from the Stackage.

hnix-store-core a year ago was at once published by someone to the stackage and submitted and accepted to the stackage LTS.

And the person that submitted it there - never after seems done anything to maintain it.

When we have 3 interlinked projects hnix{,-store-{core,remote}}, 2 of them Hackage, one of them somehow got directly into LTS.

Which, you know, created https://search.nixos.org/packages?channel=unstable&from=0&size=50&sort=relevance&query=hnix-store-core and so - overloads.

So unwrapping the situation from the Stackage: https://github.com/commercialhaskell/stackage/issues/5872, so the Haskell-Nix & Nixpkgs maintainers would have a much easier time to releasing and supporting the release.

After that again would discuss the expansion of the release team.

After that - we can do &, more importantly, release & ship macOS support.

With the CI deployed, the active maintenance, release team and the flowing stream, can promise some attention to macOS.

Anton-Latukha commented 3 years ago

So.

In that timeframe.

Managed to pull old release from Stackage Nightly. But it is in LTS, which I thing Nixpkgs does not inherit from. And Stackage promises to delete our old project release (and package at all) from next major LTS release. Pulling-of which was a quest.

So in this timeframe Nixpkgs closures simplified.

Just made a new release with macOS support. So far idk for Nixpkgs build, but made a CI Cabal macOS build and the project passed it. For hnix-store-remote is other story, it uses linux-headers.

hnix-store-core closures got cleaned-up, sadly without mine participation, so thank you to the people and to pety.

So on Hackage update the project would start working.