9 buildPythonPackage rec {
12 format = "setuptools";
15 inherit pname version;
16 hash = "sha256-4QZ/4nu03iBO+PNpLyPZPF07QpL3iyksb8fcT3V0n3Y=";
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
28 pythonImportsCheck = [ "unrardll" ];
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 ];