podman: refactor wrapper
This commit is contained in:
parent
684ffc109e
commit
a0c079f652
1 changed files with 7 additions and 10 deletions
|
@ -5,7 +5,6 @@
|
||||||
, lib
|
, lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, extraPackages ? []
|
, extraPackages ? []
|
||||||
, podman # Docker compat
|
|
||||||
, runc # Default container runtime
|
, runc # Default container runtime
|
||||||
, crun # Container runtime (default with cgroups v2 for podman/buildah)
|
, crun # Container runtime (default with cgroups v2 for podman/buildah)
|
||||||
, conmon # Container runtime monitor
|
, conmon # Container runtime monitor
|
||||||
|
@ -23,8 +22,6 @@
|
||||||
# adding aardvark-dns/netavark to `helpersBin` requires changes to the modules and tests
|
# adding aardvark-dns/netavark to `helpersBin` requires changes to the modules and tests
|
||||||
|
|
||||||
let
|
let
|
||||||
podman = podman-unwrapped;
|
|
||||||
|
|
||||||
binPath = lib.makeBinPath ([
|
binPath = lib.makeBinPath ([
|
||||||
] ++ lib.optionals stdenv.isLinux [
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
runc
|
runc
|
||||||
|
@ -38,24 +35,24 @@ let
|
||||||
] ++ extraPackages);
|
] ++ extraPackages);
|
||||||
|
|
||||||
helpersBin = symlinkJoin {
|
helpersBin = symlinkJoin {
|
||||||
name = "${podman.pname}-helper-binary-wrapper-${podman.version}";
|
name = "${podman-unwrapped.pname}-helper-binary-wrapper-${podman-unwrapped.version}";
|
||||||
|
|
||||||
# this only works for some binaries, others may need to be be added to `binPath` or in the modules
|
# this only works for some binaries, others may need to be be added to `binPath` or in the modules
|
||||||
paths = [
|
paths = [
|
||||||
gvproxy
|
gvproxy
|
||||||
] ++ lib.optionals stdenv.isLinux [
|
] ++ lib.optionals stdenv.isLinux [
|
||||||
catatonit # added here for the pause image and also set in `containersConf` for `init_path`
|
catatonit # added here for the pause image and also set in `containersConf` for `init_path`
|
||||||
podman.rootlessport
|
podman-unwrapped.rootlessport
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
in runCommand podman.name {
|
in runCommand podman-unwrapped.name {
|
||||||
name = "${podman.pname}-wrapper-${podman.version}";
|
name = "${podman-unwrapped.pname}-wrapper-${podman-unwrapped.version}";
|
||||||
inherit (podman) pname version passthru;
|
inherit (podman-unwrapped) pname version passthru;
|
||||||
|
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
|
||||||
meta = builtins.removeAttrs podman.meta [ "outputsToInstall" ];
|
meta = builtins.removeAttrs podman-unwrapped.meta [ "outputsToInstall" ];
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"out"
|
"out"
|
||||||
|
@ -67,7 +64,7 @@ in runCommand podman.name {
|
||||||
];
|
];
|
||||||
|
|
||||||
} ''
|
} ''
|
||||||
ln -s ${podman.man} $man
|
ln -s ${podman-unwrapped.man} $man
|
||||||
|
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
ln -s ${podman-unwrapped}/etc $out/etc
|
ln -s ${podman-unwrapped}/etc $out/etc
|
||||||
|
|
Loading…
Reference in a new issue