2019-01-22 02:01:52 +00:00
|
|
|
{ stdenv, fetchgit, buildPythonPackage
|
|
|
|
, srht, redis, pyyaml, buildsrht
|
|
|
|
, writeText }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "scmsrht";
|
2019-11-04 02:08:19 +00:00
|
|
|
version = "0.16.0";
|
2019-01-22 02:01:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~sircmpwn/scm.sr.ht";
|
|
|
|
rev = version;
|
2019-11-04 02:08:19 +00:00
|
|
|
sha256 = "0jny8ihn49n7bpw5nhdrfha78yzpxp277l50y1lj142r59kwmh22";
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = srht.nativeBuildInputs;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
srht
|
|
|
|
redis
|
|
|
|
pyyaml
|
|
|
|
buildsrht
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export PKGVER=${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
# No actual? tests but seems like it needs this anyway
|
|
|
|
preCheck = let
|
|
|
|
config = writeText "config.ini" ''
|
|
|
|
[webhooks]
|
|
|
|
private-key=K6JupPpnr0HnBjelKTQUSm3Ro9SgzEA2T2Zv472OvzI=
|
|
|
|
|
|
|
|
[builds.sr.ht]
|
|
|
|
origin=http://builds.sr.ht.local
|
|
|
|
oauth-client-id=
|
|
|
|
|
|
|
|
[meta.sr.ht]
|
|
|
|
origin=http://meta.sr.ht.local
|
|
|
|
'';
|
|
|
|
in ''
|
2019-10-05 16:00:49 +01:00
|
|
|
cp -f ${config} config.ini
|
2019-01-22 02:01:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://git.sr.ht/~sircmpwn/git.sr.ht;
|
|
|
|
description = "Shared support code for sr.ht source control services.";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
|
|
|
}
|