python3Packages.elevate: init at 0.1.3

Needed by some Python software to re-exec with super-user privileges.

Add a patch to work correctly with NixOS shell script wrappers for
python executables.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2021-05-24 17:52:55 +00:00
parent 180d6d4de5
commit d5d6799485
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,35 @@
{ lib, fetchPypi, buildPythonPackage, fetchpatch, setuptools-scm }:
buildPythonPackage rec {
pname = "elevate";
version = "0.1.3";
src = fetchPypi {
inherit pname version;
sha256 = "53ad19fa1de301fb1de3f8768fb3a5894215716fd96a475690c4d0ff3b1de209";
};
patches = [
(fetchpatch {
# This is for not calling shell wrappers through Python, which fails.
url = "https://github.com/rkitover/elevate/commit/148b2bf698203ea39c9fe5d635ecd03cd94051af.patch";
sha256 = "1ky3z1jxl1g28wbwbx8qq8jgx8sa8pr8s3fdcpdhdx1blw28cv61";
})
];
nativeBuildInputs = [
setuptools-scm
];
# No tests included
doCheck = false;
pythonImportsCheck = [ "elevate" ];
meta = with lib; {
description = "Python module for re-launching the current process as super-user";
homepage = "https://github.com/barneygale/elevate";
license = licenses.mit;
maintainers = with maintainers; [ rkitover ];
};
}

View File

@ -2193,6 +2193,8 @@ in {
elementpath = callPackage ../development/python-modules/elementpath { };
elevate = callPackage ../development/python-modules/elevate { };
eliot = callPackage ../development/python-modules/eliot { };
elmax = callPackage ../development/python-modules/elmax { };