summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/elevate/default.nix
blob: 225ce304ea065b7840e52b3774ba100dc4f386e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{
  lib,
  fetchPypi,
  buildPythonPackage,
  fetchpatch,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "elevate";
  version = "0.1.3";
  format = "setuptools";

  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 = {
    description = "Python module for re-launching the current process as super-user";
    homepage = "https://github.com/barneygale/elevate";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ rkitover ];
  };
}