From 71e6fda65f0ce335087fb4fd22bf56fb7c11f1f2 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Thu, 22 May 2025 12:19:35 +0200 Subject: [PATCH 1/2] libdiscid: modernize The change to fetchFromGitHub necessitates a hash change, as the tarballs being distributed are not equal to the content of the git repository at the tag[1]. [1]: https://github.com/metabrainz/libdiscid/blob/v0.6.5/CMakeLists.txt#L172-L178 --- pkgs/by-name/li/libdiscid/package.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/li/libdiscid/package.nix b/pkgs/by-name/li/libdiscid/package.nix index 3be92789614b..376a680d394a 100644 --- a/pkgs/by-name/li/libdiscid/package.nix +++ b/pkgs/by-name/li/libdiscid/package.nix @@ -1,12 +1,13 @@ { lib, stdenv, - fetchurl, + fetchFromGitHub, cmake, pkg-config, + nix-update-script, }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libdiscid"; version = "0.6.4"; @@ -15,18 +16,22 @@ stdenv.mkDerivation rec { pkg-config ]; - src = fetchurl { - url = "http://ftp.musicbrainz.org/pub/musicbrainz/${pname}/${pname}-${version}.tar.gz"; - sha256 = "sha256-3V6PHJrq1ELiO3SanMkzY3LmLoitcHmitiiVsDkMsoI="; + src = fetchFromGitHub { + owner = "metabrainz"; + repo = "libdiscid"; + tag = "v${finalAttrs.version}"; + hash = "sha256-oN/qpzdTa5+rD7kwDOW6UCg7bbDOy/AYmP8sv9Q8+Kk="; }; NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework CoreFoundation -framework IOKit"; + passthru.updateScript = nix-update-script { }; + meta = with lib; { description = "C library for creating MusicBrainz DiscIDs from audio CDs"; - homepage = "http://musicbrainz.org/doc/libdiscid"; + homepage = "https://musicbrainz.org/doc/libdiscid"; maintainers = with maintainers; [ ehmry ]; license = licenses.lgpl21; platforms = platforms.all; }; -} +}) From da6d32b32c2716aeabd5d73f9474df55150fbe09 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Thu, 22 May 2025 12:20:57 +0200 Subject: [PATCH 2/2] libdiscid: 0.6.4 -> 0.6.5 Changelog: https://raw.githubusercontent.com/metabrainz/libdiscid/refs/tags/v0.6.5/ChangeLog --- pkgs/by-name/li/libdiscid/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/li/libdiscid/package.nix b/pkgs/by-name/li/libdiscid/package.nix index 376a680d394a..d3fca599aa51 100644 --- a/pkgs/by-name/li/libdiscid/package.nix +++ b/pkgs/by-name/li/libdiscid/package.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation (finalAttrs: { pname = "libdiscid"; - version = "0.6.4"; + version = "0.6.5"; nativeBuildInputs = [ cmake @@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: { owner = "metabrainz"; repo = "libdiscid"; tag = "v${finalAttrs.version}"; - hash = "sha256-oN/qpzdTa5+rD7kwDOW6UCg7bbDOy/AYmP8sv9Q8+Kk="; + hash = "sha256-lGq2iGt7c4h8HntEPeQcd7X+IykRLm0kvjrLswRWSSs="; }; NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework CoreFoundation -framework IOKit";