Skip to content

Conversation

@matthewbauer
Copy link
Member

No description provided.

default.nix Outdated
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.

5 participants