diff --git a/pkgs/applications/misc/calibre/default.nix b/pkgs/applications/misc/calibre/default.nix index 92a491a0056..8ea1dba54ed 100644 --- a/pkgs/applications/misc/calibre/default.nix +++ b/pkgs/applications/misc/calibre/default.nix @@ -99,7 +99,7 @@ mkDerivation rec { sip # the following are distributed with calibre, but we use upstream instead odfpy - ] + ] ++ lib.optional (unrarSupport) unrardll ); installPhase = '' diff --git a/pkgs/development/python-modules/unrardll/default.nix b/pkgs/development/python-modules/unrardll/default.nix new file mode 100644 index 00000000000..49e070b8463 --- /dev/null +++ b/pkgs/development/python-modules/unrardll/default.nix @@ -0,0 +1,22 @@ +{ lib, buildPythonPackage, fetchPypi, unrar }: + +buildPythonPackage rec { + pname = "unrardll"; + version = "0.1.4"; + + src = fetchPypi { + inherit pname version; + sha256 = "4149c0729cf96a0bae80360e7d94dc40af1088c8da7f6eb8d10e09b8632e92ad"; + }; + + buildInputs = [ unrar ]; + + pythonImportsCheck = [ "unrardll" ]; + + meta = with lib; { + description = "Wrap the Unrar DLL to enable unraring of files in python"; + homepage = "https://github.com/kovidgoyal/unrardll"; + license = licenses.bsd3; + maintainers = with maintainers; [ nyanloutre ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bec5ad3ef64..79a3b377279 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7568,6 +7568,8 @@ in { unpaddedbase64 = callPackage ../development/python-modules/unpaddedbase64 { }; + unrardll = callPackage ../development/python-modules/unrardll { }; + unrpa = callPackage ../development/python-modules/unrpa { }; untangle = callPackage ../development/python-modules/untangle { };