forked from mirrors/nixpkgs
Merge pull request #86830 from adisbladis/podman-wrapper-outputs
podman: Don't symlink the $bin output
This commit is contained in:
commit
18e8718ffd
|
@ -8,13 +8,11 @@ let
|
||||||
|
|
||||||
# Provides a fake "docker" binary mapping to podman
|
# Provides a fake "docker" binary mapping to podman
|
||||||
dockerCompat = pkgs.runCommandNoCC "${podmanPackage.pname}-docker-compat-${podmanPackage.version}" {
|
dockerCompat = pkgs.runCommandNoCC "${podmanPackage.pname}-docker-compat-${podmanPackage.version}" {
|
||||||
outputs = [ "out" "bin" "man" ];
|
outputs = [ "out" "man" ];
|
||||||
inherit (podmanPackage) meta;
|
inherit (podmanPackage) meta;
|
||||||
} ''
|
} ''
|
||||||
mkdir $out
|
mkdir -p $out/bin
|
||||||
|
ln -s ${podmanPackage}/bin/podman $out/bin/docker
|
||||||
mkdir -p $bin/bin
|
|
||||||
ln -s ${podmanPackage.bin}/bin/podman $bin/bin/docker
|
|
||||||
|
|
||||||
mkdir -p $man/share/man/man1
|
mkdir -p $man/share/man/man1
|
||||||
for f in ${podmanPackage.man}/share/man/man1/*; do
|
for f in ${podmanPackage.man}/share/man/man1/*; do
|
||||||
|
|
|
@ -28,21 +28,25 @@ let
|
||||||
] ++ extraPackages);
|
] ++ extraPackages);
|
||||||
|
|
||||||
in runCommand podman.name {
|
in runCommand podman.name {
|
||||||
inherit (podman) name pname version meta outputs;
|
name = "${podman.pname}-wrapper-${podman.version}";
|
||||||
|
inherit (podman) pname version;
|
||||||
|
|
||||||
|
meta = builtins.removeAttrs podman.meta [ "outputsToInstall" ];
|
||||||
|
|
||||||
|
outputs = [
|
||||||
|
"out"
|
||||||
|
"man"
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper
|
makeWrapper
|
||||||
];
|
];
|
||||||
|
|
||||||
} ''
|
} ''
|
||||||
# Symlink everything but $bin from podman-unwrapped
|
ln -s ${podman.man} $man
|
||||||
${
|
|
||||||
lib.concatMapStringsSep "\n"
|
|
||||||
(o: "ln -s ${podman.${o}} ${placeholder o}")
|
|
||||||
(builtins.filter (o: o != "bin")
|
|
||||||
podman.outputs)}
|
|
||||||
|
|
||||||
mkdir -p $bin/bin
|
mkdir -p $out/bin
|
||||||
ln -s ${podman-unwrapped}/share $bin/share
|
ln -s ${podman-unwrapped}/share $out/share
|
||||||
makeWrapper ${podman-unwrapped}/bin/podman $bin/bin/podman \
|
makeWrapper ${podman-unwrapped}/bin/podman $out/bin/podman \
|
||||||
--prefix PATH : ${binPath}
|
--prefix PATH : ${binPath}
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue