mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 09:02:46 +00:00
52 lines
1.1 KiB
Nix
52 lines
1.1 KiB
Nix
{ stdenv, fetchgit, buildPythonPackage
|
|
, srht, redis, pyyaml, buildsrht
|
|
, writeText }:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "scmsrht";
|
|
version = "0.18.1";
|
|
|
|
src = fetchgit {
|
|
url = "https://git.sr.ht/~sircmpwn/scm.sr.ht";
|
|
rev = version;
|
|
sha256 = "1f0h8vbbqx34v1rgzqjkgbf0z7jhnp8hdlzmrxwhs74kj6zjb134";
|
|
};
|
|
|
|
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 ''
|
|
cp -f ${config} config.ini
|
|
'';
|
|
|
|
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 ];
|
|
};
|
|
}
|