nixpkgs/pkgs/applications/version-management/sourcehut/paste.nix
Julien Moutinho 664edda544 sourcehut: fix #198478
The error:
> Executing pythonOutputDistPhase
> mv: cannot stat 'dist': No such file or directory
was caused by the non-idempotent hook `pythonOutputDistHook`
appearing in: 86ab83260f
and initially in: adbc59c9d3
being run twice due to the manual propagation of
`nativeBuildInputs` from sourcehut's core to sourcehut's services.

Kudos to Winter (@winterqt) for making sense of this bug.
2022-11-01 21:56:37 -04:00

44 lines
855 B
Nix

{ lib
, fetchFromSourcehut
, buildPythonPackage
, srht
, pyyaml
, python
}:
buildPythonPackage rec {
pname = "pastesrht";
version = "0.13.8";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "paste.sr.ht";
rev = version;
sha256 = "sha256-Zji9FyYUtsklYz4qyLbtduusteC7WujLCMmvZKcqYis=";
};
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 ];
};
}