2021-12-06 16:07:01 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2021-09-22 15:38:15 +00:00
|
|
|
, fetchpatch
|
2020-08-20 17:08:02 +00:00
|
|
|
, nix-update-script
|
2020-04-24 23:36:52 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
2022-02-10 20:34:41 +00:00
|
|
|
, pkg-config
|
|
|
|
, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, vala
|
2022-06-16 17:23:12 +00:00
|
|
|
, wrapGAppsHook4
|
2022-09-22 12:36:57 +00:00
|
|
|
, elementary-gtk-theme
|
|
|
|
, elementary-icon-theme
|
2022-02-10 20:34:41 +00:00
|
|
|
, glib
|
2022-06-16 17:23:12 +00:00
|
|
|
, granite7
|
2022-02-10 20:34:41 +00:00
|
|
|
, gst_all_1
|
2022-06-16 17:23:12 +00:00
|
|
|
, gtk4
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "elementary-music";
|
2022-06-16 17:23:12 +00:00
|
|
|
version = "7.0.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "elementary";
|
2022-01-26 04:04:25 +00:00
|
|
|
repo = "music";
|
2020-04-24 23:36:52 +00:00
|
|
|
rev = version;
|
2022-06-16 17:23:12 +00:00
|
|
|
sha256 = "sha256-fZbOjZd6udJWM+jWXCmGwt6cyl/lXPsgM9XeTScbqts=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
patches = [
|
2022-06-16 17:23:12 +00:00
|
|
|
# Use file basename for fallback audio object title
|
|
|
|
# https://github.com/elementary/music/pull/710
|
2021-09-22 15:38:15 +00:00
|
|
|
(fetchpatch {
|
2022-06-16 17:23:12 +00:00
|
|
|
url = "https://github.com/elementary/music/commit/97a437edc7652e0b85b7d3c6fd87089c14ec02e2.patch";
|
|
|
|
sha256 = "sha256-VmK5dKfSKWAIxfaKXsC8tjg6Pqq1XSGxJDQOZWJX92w=";
|
2022-01-19 23:45:15 +00:00
|
|
|
})
|
2022-09-22 12:36:57 +00:00
|
|
|
# Skip invalid files instead of stopping playback
|
|
|
|
# https://github.com/elementary/music/pull/711
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/music/commit/88f332197d2131daeff3306ec2a484a28fa4db21.patch";
|
|
|
|
sha256 = "sha256-Zga0UmL1PAq4P58IjOuEiXGGn187a0/LHbXXze4sSpY=";
|
|
|
|
})
|
|
|
|
# Enable the NEXT button if repeat mode is set to ALL or ONE
|
|
|
|
# https://github.com/elementary/music/pull/712
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/music/commit/3249e3ca247dfd5ff6b14f4feeeeed63b435bcb8.patch";
|
|
|
|
sha256 = "sha256-nx/nlSSRxu4wy8QG5yYBi0BdRoUmnyry7mwzuk5NJxU=";
|
|
|
|
})
|
|
|
|
# Hard code GTK styles
|
|
|
|
# https://github.com/elementary/music/pull/723
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/elementary/music/commit/4e22268d38574e56eb3b42ae201c99cc98b510db.patch";
|
|
|
|
sha256 = "sha256-DZds7pg0vYL9vga+tP7KJHcjQTmdKHS+D+q/2aYfMmk=";
|
|
|
|
})
|
2021-09-22 15:38:15 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
python3
|
|
|
|
vala
|
2022-06-16 17:23:12 +00:00
|
|
|
wrapGAppsHook4
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [
|
2022-09-22 12:36:57 +00:00
|
|
|
elementary-icon-theme
|
2022-02-10 20:34:41 +00:00
|
|
|
glib
|
2022-06-16 17:23:12 +00:00
|
|
|
granite7
|
|
|
|
gtk4
|
2022-02-10 20:34:41 +00:00
|
|
|
] ++ (with gst_all_1; [
|
|
|
|
gst-plugins-bad
|
|
|
|
gst-plugins-base
|
|
|
|
gst-plugins-good
|
|
|
|
gst-plugins-ugly
|
|
|
|
gstreamer
|
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
chmod +x meson/post_install.py
|
|
|
|
patchShebangs meson/post_install.py
|
|
|
|
'';
|
|
|
|
|
2022-09-22 12:36:57 +00:00
|
|
|
preFixup = ''
|
|
|
|
gappsWrapperArgs+=(
|
|
|
|
# The GTK theme is hardcoded.
|
|
|
|
--prefix XDG_DATA_DIRS : "${elementary-gtk-theme}/share"
|
|
|
|
# The icon theme is hardcoded.
|
|
|
|
--prefix XDG_DATA_DIRS : "$XDG_ICON_DIRS"
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
2022-01-26 04:04:25 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = "pantheon.${pname}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Music player and library designed for elementary OS";
|
|
|
|
homepage = "https://github.com/elementary/music";
|
2021-09-22 15:38:15 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
2021-09-22 15:38:15 +00:00
|
|
|
maintainers = teams.pantheon.members;
|
2021-12-06 16:07:01 +00:00
|
|
|
mainProgram = "io.elementary.music";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|