Hello, I have trouble getting the correct url to package ostui. It uses sourcehut to host the code, I can’t figure out the url to download the tar.gz file from.
The releases only have .gz file . The official README has curl -L -o ostui.tgz https://hg.sr.ht/~ser/ostui/archive/v0.1.0.tar.gz
to download the source, but i don’t know how to implement it in fetchurl.
Here is my build.nix file
{ lib
, stdenv
, fetchurl
, buildGoModule
, mpv
}:
let
version = "1.0.1";
pname = "ostui";
hash = "";
in
buildGoModule {
inherit pname;
inherit version;
src = fetchurl {
name = "${pname}-${version}.tar.gz";
url = "https://hg.sr.ht/~ser/ostui/archive/v${version}.tar.gz";
inherit hash;
};
buildInputs = [
mpv
];
ldflags = [
"-s" "-w"
"-X main.Version=${version}"
"-L ${mpv}/lib"
];
vendorHash = "";
meta = with lib; {
homepage = "https://git.sr.ht/~ser/ostui";
description = "Ostui is a terminal client for *sonic music servers, inspired by ncmpcpp and musickube.";
license = licenses.gpl3Plus;
maintainers = [ ];
};
}