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

musl wip #35

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

musl wip #35

wants to merge 9 commits into from

Conversation

matthewbauer
Copy link
Member

No description provided.

default.nix Outdated
@@ -7,7 +7,7 @@ rec {
stdenv.mkDerivation {
name = "arx";
buildCommand = ''
${haskellPackages.arx}/bin/arx tmpx ${archive} -o $out // ${startup}
${(import <nixpkgs> {}).haskellPackages.arx}/bin/arx tmpx -rm! ${archive} -o $out // ${startup}
Copy link
Collaborator

Choose a reason for hiding this comment

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

id recommend against importing nixpkgs like this, it makes it difficult to pin the version in a pure manner
instead try something like import (nixpkgs.path) {}

@@ -0,0 +1 @@
import <nixpkgs> { localSystem = { config = "x86_64-unknown-linux-musl"; }; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

and similarly, accept a nixpkgs path as an input, so it doesnt rely on the current value of $NIX_PATH

@FRidh
Copy link

FRidh commented May 11, 2018

On CentOS 7.4 I have namespaces configured (I'm using them for sandboxed builds already) but using the binary (https://matthewbauer.us/nix) I get:

$ ./nix
Run the following as root to enable unprivileged namespace use:
sysctl -w kernel.unprivileged_userns_clone=1 ; echo kernel.unprivileged_userns_clone=1 > /etc/sysctl.d/nix-user-chroot.conf

Isn't that option Debian-specific?


I think related is lxc/lxc#842 (comment).

@tomberek
Copy link
Collaborator

I've been using this reliably for a while.

@matthewbauer
Copy link
Member Author

I've been using this reliably for a while.

That's good! I think I will wait on this though just because most people don't have access to Musl stuff. It's a pretty big rebuild unless you use something like @dtzWill's AllVM cache.

@tomberek
Copy link
Collaborator

Can you hook into the musl builds of busybox that the NixOS bootstrap already uses?

@tomberek
Copy link
Collaborator

just uploaded a recent musl toolchain to arm.cachix.org, should save an hour or two

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

Successfully merging this pull request may close these issues.

4 participants