From 0ac7bb695e900a4fa19734ac12b0f51542d30da9 Mon Sep 17 00:00:00 2001 From: Matteo Pacini Date: Tue, 18 Jun 2024 18:14:30 +0100 Subject: [PATCH 1/2] easytag: fix ogg corruption, darwin build, add maintainer --- pkgs/applications/audio/easytag/default.nix | 25 ++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/audio/easytag/default.nix b/pkgs/applications/audio/easytag/default.nix index 34a4ddc64b37..4b27b65c2f25 100644 --- a/pkgs/applications/audio/easytag/default.nix +++ b/pkgs/applications/audio/easytag/default.nix @@ -1,19 +1,28 @@ { lib, stdenv, fetchurl, pkg-config, intltool, gtk3, glib, libid3tag, id3lib, taglib , libvorbis, libogg, opusfile, flac, itstool, libxml2, gsettings-desktop-schemas -, gnome, wrapGAppsHook3 +, gnome, wrapGAppsHook3, fetchpatch }: -let +stdenv.mkDerivation rec { pname = "easytag"; version = "2.4.3"; -in stdenv.mkDerivation rec { - name = "${pname}-${version}"; src = fetchurl { - url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz"; - sha256 = "1mbxnqrw1fwcgraa1bgik25vdzvf97vma5pzknbwbqq5ly9fwlgw"; + url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + hash = "sha256-/FHukqcF48WXnf8WVfdJbv+2i5jxraBUfoy7wDO2fdU="; }; + patches = [ + # https://gitlab.gnome.org/GNOME/easytag/-/merge_requests/8 + # Borrowed from Gentoo + ( + fetchpatch { + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/easytag/files/easytag-2.4.3-ogg-corruption.patch"; + hash = "sha256-z75dYTEVp1raSFROjpakLeBjF96sgWBxxRB6ut9wYXw="; + } + ) + ]; + NIX_LDFLAGS = "-lid3tag -lz"; nativeBuildInputs = [ pkg-config intltool itstool libxml2 wrapGAppsHook3 ]; @@ -36,7 +45,7 @@ in stdenv.mkDerivation rec { mainProgram = "easytag"; homepage = "https://gitlab.gnome.org/GNOME/easytag"; license = licenses.gpl2Plus; - maintainers = with maintainers; [ ]; - platforms = platforms.linux; + maintainers = with maintainers; [ matteopacini ]; + platforms = platforms.linux ++ platforms.darwin; }; } From 0361511cda72de5ff783f8f87cbe376469e721e8 Mon Sep 17 00:00:00 2001 From: Matteo Pacini Date: Tue, 18 Jun 2024 18:17:28 +0100 Subject: [PATCH 2/2] easytag: format with nixfmt-rfc-style --- pkgs/applications/audio/easytag/default.nix | 55 ++++++++++++++++----- 1 file changed, 43 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/audio/easytag/default.nix b/pkgs/applications/audio/easytag/default.nix index 4b27b65c2f25..55a4c474a296 100644 --- a/pkgs/applications/audio/easytag/default.nix +++ b/pkgs/applications/audio/easytag/default.nix @@ -1,6 +1,24 @@ -{ lib, stdenv, fetchurl, pkg-config, intltool, gtk3, glib, libid3tag, id3lib, taglib -, libvorbis, libogg, opusfile, flac, itstool, libxml2, gsettings-desktop-schemas -, gnome, wrapGAppsHook3, fetchpatch +{ + lib, + stdenv, + fetchurl, + pkg-config, + intltool, + gtk3, + glib, + libid3tag, + id3lib, + taglib, + libvorbis, + libogg, + opusfile, + flac, + itstool, + libxml2, + gsettings-desktop-schemas, + gnome, + wrapGAppsHook3, + fetchpatch, }: stdenv.mkDerivation rec { @@ -15,20 +33,33 @@ stdenv.mkDerivation rec { patches = [ # https://gitlab.gnome.org/GNOME/easytag/-/merge_requests/8 # Borrowed from Gentoo - ( - fetchpatch { - url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/easytag/files/easytag-2.4.3-ogg-corruption.patch"; - hash = "sha256-z75dYTEVp1raSFROjpakLeBjF96sgWBxxRB6ut9wYXw="; - } - ) + (fetchpatch { + url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-sound/easytag/files/easytag-2.4.3-ogg-corruption.patch"; + hash = "sha256-z75dYTEVp1raSFROjpakLeBjF96sgWBxxRB6ut9wYXw="; + }) ]; NIX_LDFLAGS = "-lid3tag -lz"; - nativeBuildInputs = [ pkg-config intltool itstool libxml2 wrapGAppsHook3 ]; + nativeBuildInputs = [ + pkg-config + intltool + itstool + libxml2 + wrapGAppsHook3 + ]; buildInputs = [ - gtk3 glib libid3tag id3lib taglib libvorbis libogg opusfile flac - gsettings-desktop-schemas gnome.adwaita-icon-theme + gtk3 + glib + libid3tag + id3lib + taglib + libvorbis + libogg + opusfile + flac + gsettings-desktop-schemas + gnome.adwaita-icon-theme ]; doCheck = false; # fails 1 out of 9 tests