sourcehut: init
builds-sr-ht: init at 0.45.13 dispatch-sr-ht: init at 0.11.0 git-sr-ht: init at 0.32.3 hg-sr-ht: init at 0.13.0 lists-sr-ht: init at 0.36.3 man-sr-ht: init at 0.12.4 meta-sr-ht: init at 0.34.3 paste-sr-ht: init at 0.5.1 todo-sr-ht: init at 0.46.8
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
{ stdenv, fetchgit, buildPythonPackage
|
||||
, python
|
||||
, buildGoModule
|
||||
, srht, redis, celery, pyyaml, markdown }:
|
||||
|
||||
let
|
||||
version = "0.45.13";
|
||||
|
||||
buildWorker = src: buildGoModule {
|
||||
inherit src version;
|
||||
pname = "builds-sr-ht-worker";
|
||||
goPackagePath = "git.sr.ht/~sircmpwn/builds.sr.ht/worker";
|
||||
|
||||
modSha256 = "1jm259ncw8dgqp0fqbjn30c4y3v3vwqj41gfh99jx30bwlmpgfax";
|
||||
};
|
||||
in buildPythonPackage rec {
|
||||
inherit version;
|
||||
pname = "buildsrht";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://git.sr.ht/~sircmpwn/builds.sr.ht";
|
||||
rev = version;
|
||||
sha256 = "002pcj2a98gbmv77a10449w1q6iqhqjz4fim8hm4qm7vn6bwp0hz";
|
||||
};
|
||||
|
||||
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; {
|
||||
homepage = https://git.sr.ht/~sircmpwn/builds.sr.ht;
|
||||
description = "Continuous integration service for the sr.ht network";
|
||||
license = licenses.agpl3;
|
||||
maintainers = with maintainers; [ eadwu ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user