Loading pkgs/development/python-modules/zipfile2/default.nix 0 → 100644 +27 −0 Original line number Diff line number Diff line { buildPythonPackage , fetchFromGitHub , lib }: buildPythonPackage rec { pname = "zipfile2"; version = "0.0.12"; src = fetchFromGitHub { owner = "cournape"; repo = pname; rev = "v${version}"; hash = "sha256-BwcEgW4XrQqz0Jmtbyxf8q0mWTJXv2dL3Tk7N/IYuMI="; }; patches = [ ./no-setuid.patch ]; pythonImportsCheck = [ "zipfile2" ]; meta = with lib; { homepage = "https://github.com/cournape/zipfile2"; description = "A backwards-compatible improved zipfile class"; maintainers = with maintainers; [ genericnerdyusername ]; license = licenses.psfl; }; } pkgs/development/python-modules/zipfile2/no-setuid.patch 0 → 100644 +15 −0 Original line number Diff line number Diff line diff --git a/zipfile2/tests/test__zipfile.py b/zipfile2/tests/test__zipfile.py index 60f2ed2..db6e5bc 100644 --- a/zipfile2/tests/test__zipfile.py +++ b/zipfile2/tests/test__zipfile.py @@ -585,8 +585,8 @@ class TestsPermissionExtraction(unittest.TestCase): if index & 1 << order: mode |= permissions[permgroup][order] for order in range(3): - if specialindex & 1 << order: - mode |= permissions['special'][order] + if specialindex & 1 << order and order == 0: + raise unittest.SkipTest("The nix build process doesn't allow you to use the setuid bit") os.chmod(path, mode) real_permission = os.stat(path).st_mode & 0xFFF self.files.append((path, real_permission)) pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -13244,6 +13244,8 @@ self: super: with self; { zimports = callPackage ../development/python-modules/zimports { }; zipfile2 = callPackage ../development/python-modules/zipfile2 { }; zipp = callPackage ../development/python-modules/zipp { }; zipstream = callPackage ../development/python-modules/zipstream { }; Loading Loading
pkgs/development/python-modules/zipfile2/default.nix 0 → 100644 +27 −0 Original line number Diff line number Diff line { buildPythonPackage , fetchFromGitHub , lib }: buildPythonPackage rec { pname = "zipfile2"; version = "0.0.12"; src = fetchFromGitHub { owner = "cournape"; repo = pname; rev = "v${version}"; hash = "sha256-BwcEgW4XrQqz0Jmtbyxf8q0mWTJXv2dL3Tk7N/IYuMI="; }; patches = [ ./no-setuid.patch ]; pythonImportsCheck = [ "zipfile2" ]; meta = with lib; { homepage = "https://github.com/cournape/zipfile2"; description = "A backwards-compatible improved zipfile class"; maintainers = with maintainers; [ genericnerdyusername ]; license = licenses.psfl; }; }
pkgs/development/python-modules/zipfile2/no-setuid.patch 0 → 100644 +15 −0 Original line number Diff line number Diff line diff --git a/zipfile2/tests/test__zipfile.py b/zipfile2/tests/test__zipfile.py index 60f2ed2..db6e5bc 100644 --- a/zipfile2/tests/test__zipfile.py +++ b/zipfile2/tests/test__zipfile.py @@ -585,8 +585,8 @@ class TestsPermissionExtraction(unittest.TestCase): if index & 1 << order: mode |= permissions[permgroup][order] for order in range(3): - if specialindex & 1 << order: - mode |= permissions['special'][order] + if specialindex & 1 << order and order == 0: + raise unittest.SkipTest("The nix build process doesn't allow you to use the setuid bit") os.chmod(path, mode) real_permission = os.stat(path).st_mode & 0xFFF self.files.append((path, real_permission))
pkgs/top-level/python-packages.nix +2 −0 Original line number Diff line number Diff line Loading @@ -13244,6 +13244,8 @@ self: super: with self; { zimports = callPackage ../development/python-modules/zimports { }; zipfile2 = callPackage ../development/python-modules/zipfile2 { }; zipp = callPackage ../development/python-modules/zipp { }; zipstream = callPackage ../development/python-modules/zipstream { }; Loading