From bdedbe34dd3c0fe3f6eb2407a80e5433353eb31c Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 28 Oct 2024 22:10:24 +0100 Subject: [PATCH 1/3] u3-tool: 0.3 -> 1.0 somehow only the version 0.3 is available in sourceforge as 'download'. However in svn the final release can be fetched. The same release is available for direct download via the mirror://sourceforge url the package now uses finalAttrs in favour of rec --- pkgs/by-name/u3/u3-tool/package.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/u3/u3-tool/package.nix b/pkgs/by-name/u3/u3-tool/package.nix index a9b2a7abf9b50..52035dae074b9 100644 --- a/pkgs/by-name/u3/u3-tool/package.nix +++ b/pkgs/by-name/u3/u3-tool/package.nix @@ -1,16 +1,17 @@ { lib, stdenv, fetchurl }: -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"; + url = "mirror://sourceforge/${finalAttrs.pname}/${finalAttrs.pname}-${finalAttrs.version}.tar.gz"; sha256 = "1p9c9kibd1pdbdfa0nd0i3n7bvzi3xg0chm38jg3xfl8gsn0390f"; }; + meta = with lib; { description = "Tool for controlling the special features of a 'U3 smart drive' USB Flash disk"; homepage = "https://sourceforge.net/projects/u3-tool/"; @@ -19,4 +20,4 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ makefu ]; mainProgram = "u3-tool"; }; -} +}) From 0192be7d39a8ea16523093baf8caa7d683d865f1 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 2 Nov 2024 10:50:46 +0100 Subject: [PATCH 2/3] u3-tool: use github mirror --- pkgs/by-name/u3/u3-tool/package.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/u3/u3-tool/package.nix b/pkgs/by-name/u3/u3-tool/package.nix index 52035dae074b9..8f337c61c94b2 100644 --- a/pkgs/by-name/u3/u3-tool/package.nix +++ b/pkgs/by-name/u3/u3-tool/package.nix @@ -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"; From 7496b4ce2e63222b2bd164bc7967f4893097e958 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 2 Nov 2024 22:57:23 +0100 Subject: [PATCH 3/3] u3-tool: fix style --- pkgs/by-name/u3/u3-tool/package.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/u3/u3-tool/package.nix b/pkgs/by-name/u3/u3-tool/package.nix index 8f337c61c94b2..dc59600c2601e 100644 --- a/pkgs/by-name/u3/u3-tool/package.nix +++ b/pkgs/by-name/u3/u3-tool/package.nix @@ -1,7 +1,9 @@ -{ lib, stdenv -, fetchFromGitHub -, autoreconfHook -, pkg-config +{ + lib, + stdenv, + fetchFromGitHub, + autoreconfHook, + pkg-config, }: stdenv.mkDerivation (finalAttrs: { @@ -23,13 +25,12 @@ stdenv.mkDerivation (finalAttrs: { autoreconfHook ]; - - meta = with lib; { + 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"; }; })