2019-01-22 02:01:52 +00:00
|
|
|
{ stdenv, fetchgit, buildPythonPackage
|
|
|
|
, python
|
|
|
|
, buildGoModule
|
2020-04-16 20:49:37 +00:00
|
|
|
, srht, minio, pygit2, scmsrht }:
|
2019-01-22 02:01:52 +00:00
|
|
|
|
|
|
|
let
|
2020-10-11 13:43:09 +00:00
|
|
|
version = "0.61.10";
|
2019-01-22 02:01:52 +00:00
|
|
|
|
2019-11-04 02:20:02 +00:00
|
|
|
buildShell = src: buildGoModule {
|
|
|
|
inherit src version;
|
2019-12-30 01:03:37 +00:00
|
|
|
pname = "gitsrht-shell";
|
2020-09-05 23:16:01 +00:00
|
|
|
vendorSha256 = "1abyv2s5l3bs0iylpgyj3jri2hh1iy8fiadxm7g6l2vl58h0b9ba";
|
2019-11-04 02:20:02 +00:00
|
|
|
};
|
|
|
|
|
2019-01-22 02:01:52 +00:00
|
|
|
buildDispatcher = src: buildGoModule {
|
|
|
|
inherit src version;
|
2019-12-30 01:03:37 +00:00
|
|
|
pname = "gitsrht-dispatcher";
|
2020-08-11 21:04:55 +00:00
|
|
|
vendorSha256 = "1lzkf13m54pq0gnn3bcxc80nfg76hgck4l8q8jpaicrsiwgcyrd9";
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
2019-12-30 01:03:37 +00:00
|
|
|
|
|
|
|
buildKeys = src: buildGoModule {
|
|
|
|
inherit src version;
|
|
|
|
pname = "gitsrht-keys";
|
2020-10-11 13:43:09 +00:00
|
|
|
vendorSha256 = "1d94cqy7x0q0agwg515xxsbl70b3qrzxbzsyjhn1pbyj532brn7f";
|
2019-12-30 01:03:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
buildUpdateHook = src: buildGoModule {
|
|
|
|
inherit src version;
|
|
|
|
pname = "gitsrht-update-hook";
|
2020-10-11 13:43:09 +00:00
|
|
|
vendorSha256 = "0fwzqpjv8x5y3w3bfjd0x0cvqjjak23m0zj88hf32jpw49xmjkih";
|
2019-12-30 01:03:37 +00:00
|
|
|
};
|
2020-06-23 00:18:41 +00:00
|
|
|
|
|
|
|
buildAPI = src: buildGoModule {
|
|
|
|
inherit src version;
|
|
|
|
pname = "gitsrht-api";
|
2020-09-05 23:16:01 +00:00
|
|
|
vendorSha256 = "0d6kmsbsgj2q5nddx4w675zbsiarffj9vqplwvqk7dwz4id2wnif";
|
2020-06-23 00:18:41 +00:00
|
|
|
};
|
2019-01-22 02:01:52 +00:00
|
|
|
in buildPythonPackage rec {
|
|
|
|
pname = "gitsrht";
|
2020-06-23 00:18:41 +00:00
|
|
|
inherit version;
|
2019-01-22 02:01:52 +00:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://git.sr.ht/~sircmpwn/git.sr.ht";
|
|
|
|
rev = version;
|
2020-10-11 13:43:09 +00:00
|
|
|
sha256 = "0g7aj5wlns0m3kf2aajqjjb5fwk5vbb8frrkdfp4118235h3xcqy";
|
2019-01-22 02:01:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = srht.nativeBuildInputs;
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
srht
|
2020-04-16 20:49:37 +00:00
|
|
|
minio
|
2019-01-22 02:01:52 +00:00
|
|
|
pygit2
|
|
|
|
scmsrht
|
|
|
|
];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
export PKGVER=${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/bin
|
2019-11-04 02:20:02 +00:00
|
|
|
cp ${buildShell "${src}/gitsrht-shell"}/bin/gitsrht-shell $out/bin/gitsrht-shell
|
2019-01-22 02:01:52 +00:00
|
|
|
cp ${buildDispatcher "${src}/gitsrht-dispatch"}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch
|
2019-12-30 01:03:37 +00:00
|
|
|
cp ${buildKeys "${src}/gitsrht-keys"}/bin/gitsrht-keys $out/bin/gitsrht-keys
|
|
|
|
cp ${buildUpdateHook "${src}/gitsrht-update-hook"}/bin/gitsrht-update-hook $out/bin/gitsrht-update-hook
|
2020-06-23 00:18:41 +00:00
|
|
|
cp ${buildAPI "${src}/api"}/bin/api $out/bin/gitsrht-api
|
2019-01-22 02:01:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://git.sr.ht/~sircmpwn/git.sr.ht";
|
2019-01-22 02:01:52 +00:00
|
|
|
description = "Git repository hosting service for the sr.ht network";
|
|
|
|
license = licenses.agpl3;
|
|
|
|
maintainers = with maintainers; [ eadwu ];
|
|
|
|
};
|
2020-07-31 03:58:04 +00:00
|
|
|
}
|