2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
fetchPypi,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchpatch,
|
|
|
|
setuptools-scm,
|
|
|
|
}:
|
2021-06-06 07:54:09 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "elevate";
|
|
|
|
version = "0.1.3";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-06-06 07:54:09 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "53ad19fa1de301fb1de3f8768fb3a5894215716fd96a475690c4d0ff3b1de209";
|
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
2024-06-05 15:53:02 +00:00
|
|
|
# This is for not calling shell wrappers through Python, which fails.
|
|
|
|
url = "https://github.com/rkitover/elevate/commit/148b2bf698203ea39c9fe5d635ecd03cd94051af.patch";
|
|
|
|
sha256 = "1ky3z1jxl1g28wbwbx8qq8jgx8sa8pr8s3fdcpdhdx1blw28cv61";
|
2021-06-06 07:54:09 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools-scm ];
|
2021-06-06 07:54:09 +00:00
|
|
|
|
|
|
|
# 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 ];
|
|
|
|
};
|
|
|
|
}
|