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

Tweak cross-compilation of some netbsd stuff #72639

Merged
merged 2 commits into from Nov 3, 2019

Conversation

kirelagin
Copy link
Member

@kirelagin kirelagin commented Nov 2, 2019

Motivation for this change

I have no idea what I am doing.

I am dead set on getting systemd compiled with musl (almost there), and these things stood on my way, so I had to do something.

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 nix-review --run "nix-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.
Notify maintainers

cc @matthewbauer or @Ericson2314 or I don’t even know

This makes, at least, the following packages compile with musl:

* netbsd.compat
* netbsd.getent
* netbsd.fts
@kirelagin
Copy link
Member Author

kirelagin commented Nov 2, 2019

The testing strategy is to do:

nix-build -A netbsd.getent --arg crossSystem '(import <nixpkgs/lib>).systems.examples.musl64'

and see that it did not work before and now it works.

@Ericson2314
Copy link
Member

I hope there is another way to do this! haha. Pinging @matthewbauer who made all these for musl, as it turns out, and also taking a peak myself.

Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK I read the netbsd source and now I see the madness and understand your response :) Looks basically all good just a few quibbles.

pkgs/os-specific/bsd/netbsd/default.nix Outdated Show resolved Hide resolved
pkgs/os-specific/bsd/netbsd/default.nix Outdated Show resolved Hide resolved
pkgs/os-specific/bsd/netbsd/default.nix Outdated Show resolved Hide resolved
@veprbl veprbl added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Nov 3, 2019
Copy link
Member

@Ericson2314 Ericson2314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Ericson2314 Ericson2314 merged commit b2372b8 into NixOS:master Nov 3, 2019
@kirelagin kirelagin deleted the netbsd-musl branch November 3, 2019 09:28
@kirelagin
Copy link
Member Author

(I came back to say that I have just tested it on darwin and it still works.)

dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Nov 3, 2019
Tweak cross-compilation of some netbsd stuff

(cherry picked from commit b2372b8)
@Ericson2314
Copy link
Member

oh, whew!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 501-1000 10.rebuild-darwin: 501+ 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants