about summary refs log tree commit diff
path: root/pkgs/applications/virtualization
diff options
context:
space:
mode:
authorRobert Hensing <robert@roberthensing.nl>2023-10-06 11:33:15 +0200
committerRobert Hensing <robert@roberthensing.nl>2023-10-06 11:55:07 +0200
commitbb35cbc40eec5aca4c32fed5052833e11afe1d4f (patch)
tree141d5bca5a65ee0203755902d06c91b75a8cecf4 /pkgs/applications/virtualization
parent4c96e13393c2c051280230a6996ecb7a1a5ef741 (diff)
downloadnixlib-bb35cbc40eec5aca4c32fed5052833e11afe1d4f.tar
nixlib-bb35cbc40eec5aca4c32fed5052833e11afe1d4f.tar.gz
nixlib-bb35cbc40eec5aca4c32fed5052833e11afe1d4f.tar.bz2
nixlib-bb35cbc40eec5aca4c32fed5052833e11afe1d4f.tar.lz
nixlib-bb35cbc40eec5aca4c32fed5052833e11afe1d4f.tar.xz
nixlib-bb35cbc40eec5aca4c32fed5052833e11afe1d4f.tar.zst
nixlib-bb35cbc40eec5aca4c32fed5052833e11afe1d4f.zip
runc: Remove procps from wrapper
This reduces `runc` output closure size, particularly when not part of a
NixOS configuration.

`procps` was added in 50e24b8e0aed6, with the commit message indicating
the purpose of adding `systemctl` and `busctl`, both of which are
provided by `systemd` and not `procps`.

Presumably `procps` was added to make `runc ps` work regardless of the
environment, but this incurs a significant cost in terms of closure size,
especially when `runc` is packaged into something other than a NixOS
system, such as a dev shell or a package that does not use `runc ps`.

The alternative for improving the closure size would be to trim `procps`
itself. Currently it has a `systemd` dependency that's a significant cost.
However, removing that would also change `ps` and therefore `runc ps`
behavior. Furthermore, it would put two `procps` variants into the closure
of NixOS systems, when installed there.

Considering the above and the fact that the best `ps` is already present on
NixOS and most systems, I consider it the best solution not to bundle it
with `runc`, and take it from the environment instead.
Diffstat (limited to 'pkgs/applications/virtualization')
-rw-r--r--pkgs/applications/virtualization/runc/default.nix2
1 files changed, 0 insertions, 2 deletions
diff --git a/pkgs/applications/virtualization/runc/default.nix b/pkgs/applications/virtualization/runc/default.nix
index 38a285945593..d71ec6b5725f 100644
--- a/pkgs/applications/virtualization/runc/default.nix
+++ b/pkgs/applications/virtualization/runc/default.nix
@@ -9,7 +9,6 @@
 , libseccomp
 , libselinux
 , makeWrapper
-, procps
 , nixosTests
 }:
 
@@ -45,7 +44,6 @@ buildGoModule rec {
     install -Dm755 runc $out/bin/runc
     installManPage man/*/*.[1-9]
     wrapProgram $out/bin/runc \
-      --prefix PATH : ${lib.makeBinPath [ procps ]} \
       --prefix PATH : /run/current-system/systemd/bin
     runHook postInstall
   '';