diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 55bec9bd9c643..4c46dd00caac1 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4976,6 +4976,12 @@ githubId = 424946; name = "James Earl Douglas"; }; + EBADBEEF = { + name = "EBADBEEF"; + email = "errno@ebadf.com"; + github = "EBADBEEF"; + githubId = 4167946; + }; ebbertd = { email = "daniel@ebbert.nrw"; github = "ebbertd"; diff --git a/pkgs/by-name/zx/zxtune/disable_updates.patch b/pkgs/by-name/zx/zxtune/disable_updates.patch new file mode 100644 index 0000000000000..f25921d83b123 --- /dev/null +++ b/pkgs/by-name/zx/zxtune/disable_updates.patch @@ -0,0 +1,20 @@ +--- ./apps/zxtune-qt/ui/desktop/mainwindow.cpp.orig 2023-11-03 10:58:54.073651511 -0700 ++++ ./apps/zxtune-qt/ui/desktop/mainwindow.cpp 2023-11-03 10:59:08.900608850 -0700 +@@ -106,14 +106,9 @@ + Require(connect(actionReportBug, &QAction::triggered, this, &DesktopMainWindowImpl::ReportIssue)); + Require(connect(actionAboutQt, &QAction::triggered, this, &DesktopMainWindowImpl::ShowAboutQt)); + Require(connect(actionPreferences, &QAction::triggered, this, &DesktopMainWindowImpl::ShowPreferences)); +- if (Update::CheckOperation* op = Update::CheckOperation::Create(*this)) +- { +- Require(connect(actionCheckUpdates, &QAction::triggered, op, &Update::CheckOperation::Execute)); +- } +- else +- { +- actionCheckUpdates->setEnabled(false); +- } ++ ++ // Nix: disable update checks completely ++ actionCheckUpdates->setEnabled(false); + + Require(connect(Controls, &PlaybackControls::OnPrevious, MultiPlaylist, &Playlist::UI::ContainerView::Prev)); + Require(connect(Controls, &PlaybackControls::OnNext, MultiPlaylist, &Playlist::UI::ContainerView::Next)); diff --git a/pkgs/by-name/zx/zxtune/package.nix b/pkgs/by-name/zx/zxtune/package.nix new file mode 100644 index 0000000000000..959b80952c1e5 --- /dev/null +++ b/pkgs/by-name/zx/zxtune/package.nix @@ -0,0 +1,148 @@ +{ lib +, stdenv +, fetchFromBitbucket +, nix-update-script +, boost +, zlib +# File backends (for decoding and encoding) +, withMp3 ? true +, lame +, withOgg ? true +, libvorbis +, withFlac ? true +, flac +# Audio backends (for playback) +, withOpenal ? false +, openal +, withSDL ? false +, SDL +, withOss ? false +, withAlsa ? stdenv.hostPlatform.isLinux +, alsa-lib +, withPulse ? stdenv.hostPlatform.isLinux +, libpulseaudio +# GUI audio player +, withQt ? true +, qt5 +, zip +}: +let + dlopenBuildInputs = [] + ++ lib.optional withMp3 lame + ++ lib.optional withOgg libvorbis + ++ lib.optional withFlac flac + ++ lib.optional withOpenal openal + ++ lib.optional withSDL SDL + ++ lib.optional withAlsa alsa-lib + ++ lib.optional withPulse libpulseaudio; + supportWayland = (!stdenv.hostPlatform.isDarwin); + platformName = "linux"; + staticBuildInputs = [ boost zlib ] + ++ lib.optional withQt (if (supportWayland) then qt5.qtwayland else qt5.qtbase); +in stdenv.mkDerivation rec { + pname = "zxtune"; + version = "5055"; + + outputs = [ "out" ]; + + src = fetchFromBitbucket { + owner = "zxtune"; + repo = "zxtune"; + rev = "r${version}"; + hash = "sha256-ABXGbzjdsPUuQnwZQOho4s2xRSDGzbZdA6/hCkBb7zE="; + }; + + passthru.updateScript = nix-update-script { + extraArgs = [ "--version-regex" "r([0-9]+)" ]; + }; + + strictDeps = true; + + nativeBuildInputs = lib.optionals withQt [ zip qt5.wrapQtAppsHook ]; + + buildInputs = staticBuildInputs ++ dlopenBuildInputs; + + patches = [ + ./disable_updates.patch + ]; + + # Fix use of old OpenAL header path + postPatch = '' + substituteInPlace src/sound/backends/gates/openal_api.h \ + --replace "#include