2019-01-22 02:01:52 +00:00
|
|
|
{ stdenv, fetchgit, buildPythonPackage
|
|
|
|
, python
|
|
|
|
, buildGoModule
|
|
|
|
, srht, redis, celery, pyyaml, markdown }:
|
|
|
|
|
|
|
|
let
|
2020-04-16 21:24:42 +01:00
|
|
|
version = "0.56.13";
|
2019-01-22 02:01:52 +00:00
|
|
|
|
|
|
|
buildWorker = src: buildGoModule {
|
|
|
|
inherit src version;
|
|
|
|
pname = "builds-sr-ht-worker";
|
|
|
|
|
2020-08-11 22:04:55 +01:00
|
|
|
vendorSha256 = "0prdlihcy5yz760llwyby747yy2981dn3gy401a48df7ndlfj6lp";
|
2020-08-04 01:26:27 +01:00
|
|
|
|
2020-08-11 22:04:55 +01:00
|
|
|
doCheck = false;
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
|
|
|
in buildPythonPackage rec {
|
|
|
|
inherit version;
|
|
|
|
pname = "buildsrht";
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~sircmpwn/builds.sr.ht";
|
|
|
|
rev = version;
|
2020-06-02 21:44:52 +01:00
|
|
|
sha256 = "0la9i93fxxphi4gf913ccjiqlfn92h3nbpl9gxcwcplm2vvi4nmq";
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
./use-srht-path.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = srht.nativeBuildInputs;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
srht
|
|
|
|
redis
|
|
|
|
celery
|
|
|
|
pyyaml
|
|
|
|
markdown
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export PKGVER=${version}
|
|
|
|
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/lib
|
|
|
|
mkdir -p $out/bin/builds.sr.ht
|
|
|
|
|
|
|
|
cp -r images $out/lib
|
|
|
|
cp contrib/submit_image_build $out/bin/builds.sr.ht
|
|
|
|
cp ${buildWorker "${src}/worker"}/bin/worker $out/bin/builds.sr.ht-worker
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://git.sr.ht/~sircmpwn/builds.sr.ht";
|
2019-01-22 02:01:52 +00:00
|
|
|
description = "Continuous integration service for the sr.ht network";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
2020-07-31 04:58:04 +01:00
|
|
|
}
|