sourcehut: fix update script

This commit is contained in:
Julien Moutinho 2022-06-02 13:35:20 +02:00 committed by tomberek
parent a097ca163e
commit 5da4b29a99
2 changed files with 6 additions and 4 deletions

View file

@ -1,5 +1,5 @@
{ lib { lib
, fetchhg , fetchFromSourcehut
, buildGoModule , buildGoModule
, buildPythonPackage , buildPythonPackage
, srht , srht
@ -14,10 +14,12 @@ buildPythonPackage rec {
pname = "hgsrht"; pname = "hgsrht";
version = "0.31.2"; version = "0.31.2";
src = fetchhg { src = fetchFromSourcehut {
url = "https://hg.sr.ht/~sircmpwn/hg.sr.ht"; owner = "~sircmpwn";
repo = "hg.sr.ht";
rev = version; rev = version;
sha256 = "F0dBykSSrlis+mumULLxvKNxD75DWR9+IDTYbmhkMDI="; sha256 = "F0dBykSSrlis+mumULLxvKNxD75DWR9+IDTYbmhkMDI=";
vc = "hg";
}; };
postPatch = '' postPatch = ''
substituteInPlace Makefile \ substituteInPlace Makefile \

View file

@ -16,7 +16,7 @@ version() {
} }
src_url() { src_url() {
nix-instantiate --eval --strict --expr " with import $root {}; let src = sourcehut.python.pkgs.$1.drvAttrs.src; in src.url or src.meta.homepage" | tr -d '"' nix-instantiate --eval --strict --expr " with import $root {}; let src = sourcehut.python.pkgs.$1.drvAttrs.src; in src.meta.homepage" | tr -d '"'
} }
get_latest_version() { get_latest_version() {