emacsPackages.lsp-bridge: 0-unstable-2025-01-11 -> 0-unstable-2025-01-22 (#376531)
[NixPkgs.git] / pkgs / development / python-modules / unrardll / default.nix
blobb539d805f66ef07417c179f568e3c96a32ea86bd
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchPypi,
6   unrar,
7 }:
9 buildPythonPackage rec {
10   pname = "unrardll";
11   version = "0.1.7";
12   format = "setuptools";
14   src = fetchPypi {
15     inherit pname version;
16     hash = "sha256-4QZ/4nu03iBO+PNpLyPZPF07QpL3iyksb8fcT3V0n3Y=";
17   };
19   buildInputs = [ unrar ];
21   NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names";
23   postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
24     install_name_tool -change libunrar.so ${unrar}/lib/libunrar.so $out/lib/python*/site-packages/unrardll/unrar.*-darwin.so
25     install_name_tool -change libunrar.so ${unrar}/lib/libunrar.so build/lib.*/unrardll/unrar.*-darwin.so
26   '';
28   pythonImportsCheck = [ "unrardll" ];
30   meta = with lib; {
31     description = "Wrap the Unrar DLL to enable unraring of files in python";
32     homepage = "https://github.com/kovidgoyal/unrardll";
33     license = licenses.bsd3;
34     maintainers = with maintainers; [ nyanloutre ];
35   };