diff --git a/pkgs/development/python-modules/unrardll/default.nix b/pkgs/development/python-modules/unrardll/default.nix index 2eea89693ca8..1bacabbd1628 100644 --- a/pkgs/development/python-modules/unrardll/default.nix +++ b/pkgs/development/python-modules/unrardll/default.nix @@ -18,7 +18,9 @@ buildPythonPackage rec { buildInputs = [ unrar ]; - NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names"; + env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { + NIX_CFLAGS_LINK = "-headerpad_max_install_names"; + }; postInstall = lib.optionalString stdenv.hostPlatform.isDarwin '' install_name_tool -change libunrar.so ${unrar}/lib/libunrar.so $out/lib/python*/site-packages/unrardll/unrar.*-darwin.so