I was trying to build a derivation for GitHub - ubuntu-flutter-community/musicpod: Music, radio, television and podcast player for Ubuntu, Windows, MacOs and Android which is a music player built for ubuntu that depends on libmpv. but when I add libmpv to my list of buildInputs I kept getting many errors of libraries that have not been found, like sdl2, libvdnav, libdovi, mujs and etc(Which I think are libraries that libmpv depends on). I thought adding libmpv once would also include the libraries it depends on, but thats not the case in mine. This is how I am writing my derivation musicpod.nix · GitHub and these are the kind of errors I am getting. I appreciate any kind of help.
I found all the required dependencies:
Nix derivation for Musicpod
{
lib,
fetchFromGitHub,
flutter,
pkg-config,
alsa-lib,
ffmpeg-headless,
lcms,
libass,
libbluray,
libcaca,
libdovi,
libdrm,
libdvdnav,
libdvdread,
libplacebo,
libpulseaudio,
libuchardet,
libunwind,
libva,
libvdpau,
lua,
mesa,
mpv,
mujs,
nv-codec-headers-11,
openal,
pipewire,
rubberband,
SDL2,
shaderc,
vulkan-loader,
xorg,
zimg,
}:
let
version = "1.3.9";
in
flutter.buildFlutterApplication {
pname = "musicpod";
inherit version;
src = fetchFromGitHub {
owner = "ubuntu-flutter-community";
repo = "musicpod";
rev = version;
hash = "sha256-7s9hVFx1gbSYOll9fq0S0/r9VoBjSlGIZzakE+UKEfg=";
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
"mpris_service" = "sha256-dA4aILtRKjAMPpCxjLAsBAkVvw5KM12dWukhbGBNy9A=";
"phoenix_theme" = "sha256-QYbWhEZOQkYP61YUKHXCXfCRBHoges62+lVnBUHolOc=";
"yaru" = "sha256-yCsmvjNXOntDApyKirO2tpjjemOGk8gieJL0k0dDLqs=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
alsa-lib
ffmpeg-headless
lcms
libass
libbluray
libcaca
libdovi
libdrm
libdvdnav
libdvdread
libplacebo
libpulseaudio
libuchardet
libunwind
libva
libvdpau
lua
mesa
mpv
mujs
nv-codec-headers-11
openal
pipewire
rubberband
SDL2
shaderc
vulkan-loader
xorg.libXpresent
xorg.libXScrnSaver
xorg.libXv
zimg
];
meta = {
description = "Music, Radio, Television and Podcast player for Linux Desktop, MacOS, Windows and Android made with Flutter";
homepage = "https://github.com/ubuntu-flutter-community/musicpod";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.all;
};
}
Sadly, it fails to build anyway:
musicpod> [ +1 ms] [50/103] Generating libsuper_native_extensions.so, _phony_
musicpod> [ ] FAILED: plugins/super_native_extensions/libsuper_native_extensions.so plugins/super_native_extensions/_phony_ /build/source/build/linux/x64/release/plugins/super_native_extensions/libsuper_native_extensions.so /build/source/build/linux/x64/release/plugins/super_native_extensions/_phony_
musicpod> [ +1 ms] cd /build/source/build/linux/x64/release/plugins/super_native_extensions && /nix/store/jldwz6vv5ki21bprmhq6abpnmpr71l55-cmake-3.29.2/bin/cmake -E env CARGOKIT_CMAKE=/nix/store/jldwz6vv5ki21bprmhq6abpnmpr71l55-cmake-3.29.2/bin/cmake CARGOKIT_CONFIGURATION=Release CARGOKIT_MANIFEST_DIR=/build/source/linux/flutter/ephemeral/.plugin_symlinks/super_native_extensions/linux/../rust CARGOKIT_TARGET_TEMP_DIR=/build/source/build/linux/x64/release/plugins/super_native_extensions/cargokit_build CARGOKIT_OUTPUT_DIR=/build/source/build/linux/x64/release/plugins/super_native_extensions CARGOKIT_TARGET_PLATFORM=linux-x64 CARGOKIT_TOOL_TEMP_DIR=/build/source/build/linux/x64/release/plugins/super_native_extensions/cargokit_build/tool CARGOKIT_ROOT_PROJECT_DIR=/build/source/linux /nix/store/q8bbcjjxadkvyvkqzisv6xdwbp7xsxms-pub-super_native_extensions-0.7.0/cargokit/run_build_tool.sh build-cmake
musicpod> [ +3 ms] no such file or directory
musicpod> [ ] [ +24 ms] Failed obtaining PRETTY_NAME for Linux: PathNotFoundException: Cannot open file, path = '/usr/lib/os-release' (OS Error: No such file or directory, errno = 2)
Looks like it wants to run this script, which would need to be patched.