From 222a7a3a7ae07335dc0ef21dff62de8f99201f9b Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Mon, 22 Jun 2020 20:05:34 -0400 Subject: [PATCH] sourcehut.hubsrht: init at 0.10.6 --- .../version-management/sourcehut/default.nix | 2 ++ .../version-management/sourcehut/hub.nix | 31 +++++++++++++++++++ .../version-management/sourcehut/update.sh | 4 +-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/version-management/sourcehut/hub.nix diff --git a/pkgs/applications/version-management/sourcehut/default.nix b/pkgs/applications/version-management/sourcehut/default.nix index f6de0036afe..9d34eabd886 100644 --- a/pkgs/applications/version-management/sourcehut/default.nix +++ b/pkgs/applications/version-management/sourcehut/default.nix @@ -16,6 +16,7 @@ let dispatchsrht = self.callPackage ./dispatch.nix { }; gitsrht = self.callPackage ./git.nix { }; hgsrht = self.callPackage ./hg.nix { }; + hubsrht = self.callPackage ./hub.nix { }; listssrht = self.callPackage ./lists.nix { }; mansrht = self.callPackage ./man.nix { }; metasrht = self.callPackage ./meta.nix { }; @@ -31,6 +32,7 @@ in with python.pkgs; recurseIntoAttrs { dispatchsrht = toPythonApplication dispatchsrht; gitsrht = toPythonApplication gitsrht; hgsrht = toPythonApplication hgsrht; + hubsrht = toPythonApplication hubsrht; listssrht = toPythonApplication listssrht; mansrht = toPythonApplication mansrht; metasrht = toPythonApplication metasrht; diff --git a/pkgs/applications/version-management/sourcehut/hub.nix b/pkgs/applications/version-management/sourcehut/hub.nix new file mode 100644 index 00000000000..0b671940ec0 --- /dev/null +++ b/pkgs/applications/version-management/sourcehut/hub.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchgit, buildPythonPackage +, python +, srht }: + +buildPythonPackage rec { + pname = "hubsrht"; + version = "0.10.6"; + + src = fetchgit { + url = "https://git.sr.ht/~sircmpwn/hub.sr.ht"; + rev = version; + sha256 = "N54GOk9pxwoF1Wv0ZSe4kIAPBLl/zHrSu8OlKBkacVg="; + }; + + nativeBuildInputs = srht.nativeBuildInputs; + + propagatedBuildInputs = [ + srht + ]; + + preBuild = '' + export PKGVER=${version} + ''; + + meta = with stdenv.lib; { + homepage = "https://git.sr.ht/~sircmpwn/hub.sr.ht"; + description = "Project hub service for the sr.ht network"; + license = licenses.agpl3; + maintainers = with maintainers; [ eadwu ]; + }; +} diff --git a/pkgs/applications/version-management/sourcehut/update.sh b/pkgs/applications/version-management/sourcehut/update.sh index fdc0639c4c6..156d4cc35e4 100755 --- a/pkgs/applications/version-management/sourcehut/update.sh +++ b/pkgs/applications/version-management/sourcehut/update.sh @@ -40,8 +40,8 @@ update_version() { git commit -m "$1: $version_old -> $version" } -services=( "srht" "buildsrht" "dispatchsrht" "gitsrht" "hgsrht" "listssrht" "mansrht" "metasrht" - "pastesrht" "todosrht" "scmsrht" ) +services=( "srht" "buildsrht" "dispatchsrht" "gitsrht" "hgsrht" "hubsrht" "listssrht" "mansrht" + "metasrht" "pastesrht" "todosrht" "scmsrht" ) # Whether or not a specific service is requested if [ -n "$1" ]; then