about summary refs log tree commit diff
path: root/pkgs/applications/audio/easytag/default.nix
blob: 35ba2666f0b6bb054c57891aca545667c21ceb67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{
  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 {
  pname = "easytag";
  version = "2.4.3";

  src = fetchurl {
    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?id=b175a159c1138702bdfb009ff4d6565019ed3c4a";
      hash = "sha256-z75dYTEVp1raSFROjpakLeBjF96sgWBxxRB6ut9wYXw=";
    })
  ];

  NIX_LDFLAGS = "-lid3tag -lz";

  nativeBuildInputs = [
    pkg-config
    intltool
    itstool
    libxml2
    wrapGAppsHook3
  ];
  buildInputs = [
    gtk3
    glib
    libid3tag
    id3lib
    taglib
    libvorbis
    libogg
    opusfile
    flac
    gsettings-desktop-schemas
    gnome.adwaita-icon-theme
  ];

  doCheck = false; # fails 1 out of 9 tests

  passthru = {
    updateScript = gnome.updateScript {
      packageName = pname;
      versionPolicy = "none";
    };
  };

  meta = with lib; {
    description = "View and edit tags for various audio files";
    mainProgram = "easytag";
    homepage = "https://gitlab.gnome.org/GNOME/easytag";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ matteopacini ];
    platforms = platforms.linux ++ platforms.darwin;
  };
}