podman: use $out instead of $bin with buildGoPackage

This commit is contained in:
zowoq 2020-05-01 18:24:09 +10:00 committed by adisbladis
parent 9d0e9423a8
commit a677738a23
No known key found for this signature in database
GPG Key ID: 110BFAD44C6249B7
2 changed files with 8 additions and 10 deletions

View File

@ -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

View File

@ -34,15 +34,15 @@ in runCommand podman.name {
]; ];
} '' } ''
# Symlink everything but $bin from podman-unwrapped # Symlink everything but $out from podman-unwrapped
${ ${
lib.concatMapStringsSep "\n" lib.concatMapStringsSep "\n"
(o: "ln -s ${podman.${o}} ${placeholder o}") (o: "ln -s ${podman.${o}} ${placeholder o}")
(builtins.filter (o: o != "bin") (builtins.filter (o: o != "out")
podman.outputs)} 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}
'' ''