evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ze / zerobin / package.nix
blob62201ba6ca089042e9cb0412190dba41cf7cced9
1 { lib
2 , python3Packages
3 , fetchFromGitHub
4 , uglify-js
5 }:
7 python3Packages.buildPythonApplication rec {
8   pname = "zerobin";
9   version = "1.0.5";
11   src = fetchFromGitHub {
12     owner = "Tygs";
13     repo = "0bin";
14     rev = "v${version}";
15     sha256 = "1dfy3h823ylz4w2vv3mrmnmiyvf6rvyvsp4j3llr074w9id0zy16";
16   };
18   disabled = python3Packages.pythonOlder "3.7";
20   nativeBuildInputs = [
21     python3Packages.doit
22     python3Packages.pyscss
23     uglify-js
24   ];
26   propagatedBuildInputs = with python3Packages; [
27     appdirs
28     beaker
29     bleach
30     bottle
31     clize
32     lockfile
33     paste
34   ];
36   prePatch = ''
37     # replace /bin/bash in compress.sh
38     patchShebangs .
40     # relax version constraints of some dependencies
41     substituteInPlace setup.cfg \
42       --replace "clize==4.1.1" "clize" \
43       --replace "bleach==3.1.5" "bleach>=3.1.5,<6" \
44       --replace "bottle==0.12.18" "bottle>=0.12.18,<1" \
45       --replace "Paste==3.4.3" "Paste>=3.4.3,<4"
46   '';
48   buildPhase = ''
49     runHook preBuild
50     doit build
51     runHook postBuild
52   '';
54   # zerobin has no check, but checking would fail with:
55   # nix_run_setup runserver: Received extra arguments: test
56   # See https://github.com/NixOS/nixpkgs/pull/98734#discussion_r495823510
57   doCheck = false;
59   pythonImportsCheck = [ "zerobin" ];
61   meta = with lib; {
62     description = "Client side encrypted pastebin";
63     homepage = "https://0bin.net/";
64     license = licenses.wtfpl;
65     platforms = platforms.all;
66     maintainers = with maintainers; [ julm ];
67   };