about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/pinnwand/steck.nix
blob: 32e2141d2a9d63f2a08ddaa4810413186edfa89b (plain) (blame)
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
41
42
43
44
45
46
47
48
49
50
51
{ lib
, pkgs
, python3Packages
, fetchPypi
, nixosTests
}:

python3Packages.buildPythonApplication rec {
  pname = "steck";
  version = "0.7.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1a3l427ibwck9zzzy1sp10hmjgminya08i4r9j4559qzy7lxghs1";
  };

  postPatch = ''
    cat setup.py
    substituteInPlace setup.py \
      --replace 'click>=7.0,<8.0' 'click' \
      --replace 'termcolor>=1.1.0,<2.0.0' 'termcolor'
  '';

  nativeBuildInputs = with python3Packages; [
    setuptools
  ];

  propagatedBuildInputs = with python3Packages; [
    pkgs.git
    appdirs
    click
    python-magic
    requests
    termcolor
    toml
  ];

  # tests are not in pypi package
  doCheck = false;

  passthru.tests = nixosTests.pinnwand;

  meta = with lib; {
    homepage = "https://github.com/supakeen/steck";
    license = licenses.mit;
    description = "Client for pinnwand pastebin";
    mainProgram = "steck";
    maintainers = with maintainers; [ hexa ];
  };
}