Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, python3Packages 3, fetchFromGitHub 4, nodePackages 5}: 6 7python3Packages.buildPythonApplication rec { 8 pname = "zerobin"; 9 version = "1.0.5"; 10 11 src = fetchFromGitHub { 12 owner = "Tygs"; 13 repo = "0bin"; 14 rev = "v${version}"; 15 sha256 = "1dfy3h823ylz4w2vv3mrmnmiyvf6rvyvsp4j3llr074w9id0zy16"; 16 }; 17 18 disabled = python3Packages.pythonOlder "3.7"; 19 20 nativeBuildInputs = [ 21 python3Packages.doit 22 python3Packages.pyscss 23 nodePackages.uglify-js 24 ]; 25 26 propagatedBuildInputs = with python3Packages; [ 27 appdirs 28 beaker 29 bleach 30 bottle 31 clize 32 lockfile 33 paste 34 ]; 35 36 prePatch = '' 37 # replace /bin/bash in compress.sh 38 patchShebangs . 39 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 ''; 47 48 buildPhase = '' 49 runHook preBuild 50 doit build 51 runHook postBuild 52 ''; 53 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; 58 59 pythonImportsCheck = [ "zerobin" ]; 60 61 meta = with lib; { 62 description = "A client side encrypted pastebin"; 63 homepage = "https://0bin.net/"; 64 license = licenses.wtfpl; 65 platforms = platforms.all; 66 maintainers = with maintainers; [ julm ]; 67 }; 68}