mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
9cc5c5ec1d
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!
34 lines
678 B
Nix
34 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;
|
|
}
|