571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
69 lines
1.5 KiB
Nix
69 lines
1.5 KiB
Nix
{ lib
|
|
, python3Packages
|
|
, fetchFromGitHub
|
|
, uglify-js
|
|
}:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "zerobin";
|
|
version = "1.0.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Tygs";
|
|
repo = "0bin";
|
|
rev = "v${version}";
|
|
sha256 = "1dfy3h823ylz4w2vv3mrmnmiyvf6rvyvsp4j3llr074w9id0zy16";
|
|
};
|
|
|
|
disabled = python3Packages.pythonOlder "3.7";
|
|
|
|
nativeBuildInputs = [
|
|
python3Packages.doit
|
|
python3Packages.pyscss
|
|
uglify-js
|
|
];
|
|
|
|
propagatedBuildInputs = with python3Packages; [
|
|
appdirs
|
|
beaker
|
|
bleach
|
|
bottle
|
|
clize
|
|
lockfile
|
|
paste
|
|
];
|
|
|
|
prePatch = ''
|
|
# replace /bin/bash in compress.sh
|
|
patchShebangs .
|
|
|
|
# relax version constraints of some dependencies
|
|
substituteInPlace setup.cfg \
|
|
--replace "clize==4.1.1" "clize" \
|
|
--replace "bleach==3.1.5" "bleach>=3.1.5,<6" \
|
|
--replace "bottle==0.12.18" "bottle>=0.12.18,<1" \
|
|
--replace "Paste==3.4.3" "Paste>=3.4.3,<4"
|
|
'';
|
|
|
|
buildPhase = ''
|
|
runHook preBuild
|
|
doit build
|
|
runHook postBuild
|
|
'';
|
|
|
|
# zerobin has no check, but checking would fail with:
|
|
# nix_run_setup runserver: Received extra arguments: test
|
|
# See https://github.com/NixOS/nixpkgs/pull/98734#discussion_r495823510
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "zerobin" ];
|
|
|
|
meta = with lib; {
|
|
description = "Client side encrypted pastebin";
|
|
homepage = "https://0bin.net/";
|
|
license = licenses.wtfpl;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ julm ];
|
|
};
|
|
}
|