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!
This commit is contained in:
Anderson Torres 2024-09-03 19:00:46 -03:00
parent dbeb07693d
commit 9cc5c5ec1d
3 changed files with 46 additions and 3 deletions

View File

@ -2,6 +2,7 @@
lib,
atk,
cairo,
callPackage,
darwin,
fetchFromGitHub,
gdk-pixbuf,
@ -84,9 +85,14 @@ let
install -Dm444 -t $out/share/metainfo data/com.github.qarmin.czkawka.metainfo.xml
'';
passthru.tests.version = testers.testVersion {
package = self;
command = "czkawka_cli --version";
passthru = {
tests.version = testers.testVersion {
package = self;
command = "czkawka_cli --version";
};
wrapper = callPackage ./wrapper.nix {
czkawka = self;
};
};
meta = {

View File

@ -0,0 +1,33 @@
{
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;
}

View File

@ -4471,6 +4471,10 @@ with pkgs;
cz-cli = callPackage ../applications/version-management/cz-cli { };
czkawka-full = czkawka.wrapper.override {
extraPackages = [ ffmpeg ];
};
comma = callPackage ../tools/package-management/comma { };
commitizen = with python3Packages; toPythonApplication commitizen;