Skip to content

Commit

Permalink
pkgs: add kcc
Browse files Browse the repository at this point in the history
  • Loading branch information
adfaure committed Jun 8, 2024
1 parent f533a06 commit c5ebb83
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
myEmacs = pkgs.callPackage ./pkgs/emacs {inherit my-dotfiles;};
simplematch = unstable.callPackage ./pkgs/simplematch {};
ExifRead = unstable.callPackage ./pkgs/exifread {};
kcc = unstable.callPackage ./pkgs/kcc {};
organize = unstable.callPackage ./pkgs/organize {inherit simplematch ExifRead;};
obsidian-nvim = pkgs.callPackage ./pkgs/obsidian-nvim {};
nix = unstable.nix;
Expand Down
64 changes: 64 additions & 0 deletions pkgs/kcc/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
lib,
pkgs,
python3,
python3Packages,
fetchPypi,
fetchFromGitHub,
mailman,
nixosTests,
}: let
mozjpeg_lossless_optimization = python3Packages.buildPythonApplication rec {
pname = "mozjpeg_lossless_optimization";
version = "1.1.3";

src = fetchPypi {
inherit version;
pname = "mozjpeg-lossless-optimization";
sha256 = "sha256-cl2Ydy6UP8oYsIAcuU5kXEd/9S5WrQsnvdt23fCRyj4=";
};

nativeBuildInputs = [pkgs.mozjpeg pkgs.cmake];
propagatedBuildInputs = [python3Packages.cffi];
dontUseCmakeConfigure = true;
};
in
python3Packages.buildPythonPackage rec {
version = "5.7.0";
pname = "kcc";

src = fetchFromGitHub {
owner = "ciromattia";
repo = "${pname}";
rev = "v${version}";
hash = "sha256-LUUKCSjVrqlnkMnnx1h0BUZ/0rO/ezlIwgXE9wq9uQQ=";
};

nativeBuildInputs = with python3Packages; [
pip
raven
requests
# Tests fail because they need this package which doesn't build
# pyside6
];
propagatedBuildInputs =
[pkgs.p7zip]
++ (with python3Packages; [
psutil
pillow
python-slugify
natsort
mozjpeg_lossless_optimization
distro
]);

# There is an AssertionError
doCheck = false;

meta = with lib; {
description = "";
homepage = "";
license = licenses.gpl3Plus;
maintainers = with maintainers; [qyliss];
};
}

0 comments on commit c5ebb83

Please sign in to comment.