nixpkgs/pkgs/by-name/cz/czkawka/wrapper.nix
Anderson Torres 9cc5c5ec1d czkawka-full: "init"
This meta-package is a convenient wrapper for czkawka, useful to include extra
auxiliary packages - like ffmpeg.

Many thanks for `parallel` package keepers! The idea is nice!
2024-09-03 20:50:57 -03:00

33 lines
678 B
Nix

{
lib,
czkawka,
makeWrapper,
symlinkJoin,
# configurable options
extraPackages ? [ ],
}:
symlinkJoin {
name = "czkawka-wrapped-${czkawka.version}";
inherit (czkawka) pname version outputs;
nativeBuildInputs = [ makeWrapper ];
paths = [ czkawka ];
postBuild = ''
${lib.concatMapStringsSep "\n" (
output: "ln --symbolic --no-target-directory ${czkawka.${output}} \$${output}"
) (lib.remove "out" czkawka.outputs)}
pushd $out/bin
for f in *; do
rm -v $f
makeWrapper ${lib.getBin czkawka}/bin/$f $out/bin/$f \
--prefix PATH ":" "${lib.makeBinPath extraPackages}"
done
popd
'';
meta = czkawka.meta;
}