Skip to content

Commit

Permalink
nix: Include runtime deps in enclosure
Browse files Browse the repository at this point in the history
We weren't actually including these, so a bit of mystery how it was
working for me.

What's not included is new{uid,gid}map in the shadow package because
it requires the suid bit to be set. So we have to rely on that being
on the system already.
  • Loading branch information
richiejp committed Sep 12, 2024
1 parent eedf653 commit b0e1121
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
1 change: 0 additions & 1 deletion distros/nix/cli-cross.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ in
version = version;
src = srcWithProtobuf;
modRoot = "./go";
# Use lib.fakeHash when updating deps
inherit vendorHash;
# Avoids workspace mode error
proxyVendor = true;
Expand Down
15 changes: 13 additions & 2 deletions distros/nix/server.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
{
lib, stdenv, makeWrapper, version, buildkit, cli
lib, stdenv, makeWrapper, version, cli,
buildkit, slirp4netns, rootlesskit, runc, cni, buildkit-cni-plugins,
util-linux, iproute2
}:
let
runtimeDeps = [ buildkit ];
runtimeDeps = [
slirp4netns
rootlesskit
runc
cni
buildkit-cni-plugins
buildkit
util-linux # unshare,nsenter for rootlesskit
iproute2 # ip for slirp4netns
];
in
stdenv.mkDerivation {
pname = "ayup-server";
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
GOARCH = "amd64";
};
server = pkgs.callPackage ./distros/nix/server.nix {
inherit version cli;
inherit version cli buildkit-cni-plugins;
};
in
{
Expand Down

0 comments on commit b0e1121

Please sign in to comment.