u3-tool: use github mirror

This commit is contained in:
makefu 2024-11-02 10:50:46 +01:00
parent bdedbe34dd
commit 0192be7d39
No known key found for this signature in database
GPG Key ID: 36F7711F3FC0F225

View File

@ -1,4 +1,8 @@
{ lib, stdenv, fetchurl }:
{ lib, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
}:
stdenv.mkDerivation (finalAttrs: {
pname = "u3-tool";
@ -6,11 +10,19 @@ stdenv.mkDerivation (finalAttrs: {
enableParallelBuilding = true;
src = fetchurl {
url = "mirror://sourceforge/${finalAttrs.pname}/${finalAttrs.pname}-${finalAttrs.version}.tar.gz";
sha256 = "1p9c9kibd1pdbdfa0nd0i3n7bvzi3xg0chm38jg3xfl8gsn0390f";
src = fetchFromGitHub {
# original sourceforge mirror does not provide direct access to tag 1.0
owner = "marcusrugger";
repo = "u3-tool";
rev = "${finalAttrs.pname}-${finalAttrs.version}";
hash = "sha256-c3cfWUUT5lwy8OedAtwvhuNEa5hgfwrKGJPY/zAlALw=";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
];
meta = with lib; {
description = "Tool for controlling the special features of a 'U3 smart drive' USB Flash disk";