Add sandboxed version of nix-portable with tweaks to run on marenostrum #236

Manually merged
abonerib merged 22 commits from abonerib/jungle:nix-portable into master 2026-03-11 17:27:54 +01:00

22 Commits

Author SHA1 Message Date
54dfaa9dff Remove proot from nix-portable
All checks were successful
CI / build:cross (pull_request) Successful in 8s
CI / build:all (pull_request) Successful in 38s
CI / build:all (push) Successful in 4s
CI / build:cross (push) Successful in 8s
The pkgsStatic.proot is broken due to failed
dependencies. In upstream nix-portable they have
a custom derivation on top o proot gitlab. But
since we don't need it, we can remove it safely.

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:20 +01:00
34238d81c7 Rework nix-portable derivation arguments
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:20 +01:00
1b36c70512 Unset mn5 default bash functions in nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:19 +01:00
f5b1082ab9 Do not restore original $PATH in nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:19 +01:00
386cfd8973 Use fetchurl for amd-uprof
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:19 +01:00
f9db76c466 Enable parallelBuilding in jemalloc
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:19 +01:00
0a255b1ffa Make bsc users trusted in nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:19 +01:00
af512636ac Add sys-devices feature to nix-portable nix.conf
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:19 +01:00
9dae6a6f38 Add meta with license to nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:19 +01:00
839b9b8c76 Bind /usr/bin/env in nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:18 +01:00
7ac154a55b Add jungle cache to nix-portable nix.conf
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:18 +01:00
14af841511 Use nix bwrap in nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:18 +01:00
1d02f7fae4 Remove nix-portable tmpbin feature
It will not work without the host /lib64/ld

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:18 +01:00
a71b12c60e Add bashInteractive in nix-portable bwrap
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:18 +01:00
b96e3422b2 Install netcat, ssh and git in nix-portable
These are needed by nix in order to properly
download and build stuff.

busybox's netcat does not work since it doesn't
support -X.

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:18 +01:00
e7b3f972b0 Only to busybox to /bin/sh in nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:18 +01:00
79fdfc6c0e Remove sgid from .nix-portable and set group
This should prevent issues when putting it under
/gpfs/{projects,scratch} that have sgid and group=nobody.

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:17 +01:00
71352ff5d1 Restrict paths added to bwrap in nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:17 +01:00
06925bc0ca Bind proc using --proc in nix-portable
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:17 +01:00
1eaca98618 Fix nix-portable pkgStatic symlink handling
Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:17 +01:00
7195ca4cb6 Add nix-portable
repo: https://github.com/DavHau/nix-portable
rev: 91122e3d94ba51d7d83fe990fa81d3de0968fb32

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:17 +01:00
7674f61b17 Re-enable nix-wrap
libcap is no longer broken upstream

Reviewed-by: Rodrigo Arias Mallo <rodrigo.arias@bsc.es>
2026-03-11 17:23:17 +01:00