mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 17:23:08 +00:00
33afbf39f6
checkInputs used to be added to nativeBuildInputs. Now we have nativeCheckInputs to do that instead. Doing this treewide change allows to keep hashes identical to before the introduction of nativeCheckInputs.
70 lines
1.3 KiB
Nix
70 lines
1.3 KiB
Nix
{ lib
|
|
, fetchFromSourcehut
|
|
, buildGoModule
|
|
, buildPythonPackage
|
|
, srht
|
|
, redis
|
|
, alembic
|
|
, pystache
|
|
, pytest
|
|
, factory_boy
|
|
, python
|
|
, unzip
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "todosrht";
|
|
version = "0.72.2";
|
|
|
|
src = fetchFromSourcehut {
|
|
owner = "~sircmpwn";
|
|
repo = "todo.sr.ht";
|
|
rev = version;
|
|
sha256 = "sha256-FLjVO8Y/9s2gFfMXwcY7Rj3WNzPEBYs1AEjiVZFWsT8=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace Makefile \
|
|
--replace "all: api" ""
|
|
'';
|
|
|
|
todosrht-api = buildGoModule ({
|
|
inherit src version;
|
|
pname = "todosrht-api";
|
|
modRoot = "api";
|
|
vendorSha256 = "sha256-LB1H4jwnvoEyaaYJ09NI/M6IkgZwRet/fkso6b9EPV0=";
|
|
} // import ./fix-gqlgen-trimpath.nix { inherit unzip; });
|
|
|
|
propagatedBuildInputs = [
|
|
srht
|
|
redis
|
|
alembic
|
|
pystache
|
|
];
|
|
|
|
preBuild = ''
|
|
export PKGVER=${version}
|
|
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
|
'';
|
|
|
|
postInstall = ''
|
|
ln -s ${todosrht-api}/bin/api $out/bin/todosrht-api
|
|
'';
|
|
|
|
# pytest tests fail
|
|
nativeCheckInputs = [
|
|
pytest
|
|
factory_boy
|
|
];
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
pythonImportsCheck = [ "todosrht" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://todo.sr.ht/~sircmpwn/todo.sr.ht";
|
|
description = "Ticket tracking service for the sr.ht network";
|
|
license = licenses.agpl3Only;
|
|
maintainers = with maintainers; [ eadwu ];
|
|
};
|
|
}
|