nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 69 lines 1.6 kB view raw
1{ 2 lib, 3 python3Packages, 4 fetchFromGitHub, 5 uglify-js, 6}: 7 8python3Packages.buildPythonApplication rec { 9 pname = "zerobin"; 10 version = "1.0.5"; 11 format = "setuptools"; 12 13 src = fetchFromGitHub { 14 owner = "Tygs"; 15 repo = "0bin"; 16 rev = "v${version}"; 17 sha256 = "1dfy3h823ylz4w2vv3mrmnmiyvf6rvyvsp4j3llr074w9id0zy16"; 18 }; 19 20 nativeBuildInputs = [ 21 python3Packages.doit 22 python3Packages.pyscss 23 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 = { 62 description = "Client side encrypted pastebin"; 63 homepage = "https://github.com/Tygs/0bin"; 64 changelog = "https://github.com/Tygs/0bin/releases/tag/v${version}"; 65 license = lib.licenses.wtfpl; 66 platforms = lib.platforms.all; 67 maintainers = with lib.maintainers; [ julm ]; 68 }; 69}