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

stdenv/freebsd/cc: make overrideable fixing nixpkgs eval #119076

Merged
merged 1 commit into from Apr 15, 2021

Conversation

sternenseemann
Copy link
Member

stdenv.cc didn't have an override attribute on FreeBSD previously,
breaking evaluation of all-packages.nix consequently.

Resolves #119075.

Not tested on FreeBSD yet, but nix-env -qaP -f ./. --argstr system x86_64-linux works again.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

stdenv.cc didn't have an override attribute on FreeBSD previously,
breaking evaluation of all-packages.nix consequently.

Resolves NixOS#119075.
@github-actions github-actions bot added the 6.topic: stdenv Standard environment label Apr 10, 2021
@sss123next
Copy link

nix-instantiate -A nix .                
error: cannot coerce null to a string, at /data/nixpkgs/pkgs/development/tools/build-managers/cmake/default.nix:61:18
(use '--show-trace' to show detailed location information)

@sternenseemann
Copy link
Member Author

sternenseemann commented Apr 10, 2021

cmake not evaluating is also not good news, but anything not depending on cmake should work at least.

@sss123next
Copy link

 preConfigure = ''
    fixCmakeFiles .
    substituteInPlace Modules/Platform/UnixPaths.cmake \                                                                                                                                        
      --subst-var-by libc_bin ${lib.getBin stdenv.cc.libc} \
      --subst-var-by libc_dev ${lib.getDev stdenv.cc.libc} \
      --subst-var-by libc_lib ${lib.getLib stdenv.cc.libc}
  ''

this code block failing, looks like parser do not like '' for some reason

@sternenseemann
Copy link
Member Author

Nope, it's because stdenv.cc.libc == null on FreeBSD because we don't package a libc for that platform (or it's not part of the stdenv at least).

@sss123next
Copy link

any idea how to fix or workaround it ?

@sternenseemann
Copy link
Member Author

The best solution would be packaging FreeBSD's libc I think.

@sss123next
Copy link

as i understand, it's non-trivial task, as freebsd libc is a part of monolithic system core (builds alongside with kernel and basic set of tools similar to coreutils) i may be wrong o course ...

@sternenseemann
Copy link
Member Author

See also #82131

@sternenseemann sternenseemann merged commit 62ec3db into NixOS:master Apr 15, 2021
@sternenseemann sternenseemann deleted the eval-freebsd branch April 15, 2021 10:49
@sternenseemann sternenseemann restored the eval-freebsd branch July 24, 2021 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nixpkgs-unstable broken on freebsd
3 participants