nixpkgs/pkgs/applications/version-management/sourcehut/lists.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.3 KiB
Nix
Raw Normal View History

{ lib
, fetchFromSourcehut
2022-05-05 23:05:06 +01:00
, buildGoModule
, buildPythonPackage
, srht
, asyncpg
, aiosmtpd
, pygit2
, emailthreads
, redis
, python
2022-05-05 23:05:06 +01:00
, unzip
}:
buildPythonPackage rec {
pname = "listssrht";
version = "0.51.11";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "lists.sr.ht";
rev = version;
sha256 = "sha256-Qb70oOazZfmHpC5r0oMYCFdvfAeKbq3mQA8+M56YYnY=";
};
2022-05-05 23:05:06 +01:00
listssrht-api = buildGoModule ({
inherit src version;
pname = "listssrht-api";
modRoot = "api";
vendorSha256 = "sha256-xnmMkRSokbhWD+kz0XQ9AinYdm6/50FRBISURPvlzD0=";
2022-06-02 12:44:52 +01:00
} // import ./fix-gqlgen-trimpath.nix { inherit unzip;});
2022-05-05 23:05:06 +01:00
postPatch = ''
substituteInPlace Makefile \
--replace "all: api" ""
'';
nativeBuildInputs = srht.nativeBuildInputs;
propagatedBuildInputs = [
srht
2019-11-30 02:53:14 +00:00
pygit2
asyncpg
aiosmtpd
emailthreads
redis
];
preBuild = ''
export PKGVER=${version}
export SRHT_PATH=${srht}/${python.sitePackages}/srht
'';
2022-05-05 23:05:06 +01:00
postInstall = ''
ln -s ${listssrht-api}/bin/api $out/bin/listssrht-api
'';
2021-08-15 22:11:47 +01:00
pythonImportsCheck = [ "listssrht" ];
meta = with lib; {
homepage = "https://git.sr.ht/~sircmpwn/lists.sr.ht";
description = "Mailing list service for the sr.ht network";
2021-08-15 21:54:11 +01:00
license = licenses.agpl3Only;
maintainers = with maintainers; [ eadwu ];
};
}