diff --git a/pkgs/by-name/u3/u3-tool/package.nix b/pkgs/by-name/u3/u3-tool/package.nix index a9b2a7abf9b5..dc59600c2601 100644 --- a/pkgs/by-name/u3/u3-tool/package.nix +++ b/pkgs/by-name/u3/u3-tool/package.nix @@ -1,22 +1,36 @@ -{ lib, stdenv, fetchurl }: +{ + lib, + stdenv, + fetchFromGitHub, + autoreconfHook, + pkg-config, +}: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "u3-tool"; - version = "0.3"; + version = "1.0"; enableParallelBuilding = true; - src = fetchurl { - url = "mirror://sourceforge/${pname}/${pname}-${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="; }; - meta = with lib; { + nativeBuildInputs = [ + pkg-config + autoreconfHook + ]; + + meta = { description = "Tool for controlling the special features of a 'U3 smart drive' USB Flash disk"; homepage = "https://sourceforge.net/projects/u3-tool/"; - license = licenses.gpl2Plus; - platforms = with platforms; linux; - maintainers = with maintainers; [ makefu ]; + license = lib.licenses.gpl2Plus; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ makefu ]; mainProgram = "u3-tool"; }; -} +})