depot/third_party/nixpkgs/pkgs/applications/version-management/sourcehut/paste.nix
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

43 lines
855 B
Nix

{ lib
, fetchFromSourcehut
, buildPythonPackage
, srht
, pyyaml
, python
}:
buildPythonPackage rec {
pname = "pastesrht";
version = "0.15.1";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "paste.sr.ht";
rev = version;
sha256 = "sha256-IUFX7/V8AWqN+iuisLAyu7lMNIUCzSMoOfcZiYJTnrM=";
};
postPatch = ''
substituteInPlace Makefile \
--replace "all: api" ""
'';
propagatedBuildInputs = [
srht
pyyaml
];
preBuild = ''
export PKGVER=${version}
export SRHT_PATH=${srht}/${python.sitePackages}/srht
'';
pythonImportsCheck = [ "pastesrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/paste.sr.ht";
description = "Ad-hoc text file hosting service for the sr.ht network";
license = licenses.agpl3Only;
maintainers = with maintainers; [ eadwu ];
};
}