musicpod: init at 1.11.0 (#341359)

This commit is contained in:
Maciej Krüger 2024-09-14 00:32:22 +02:00 committed by GitHub
commit e50aafe633
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4389 additions and 0 deletions

View File

@ -0,0 +1,56 @@
{
lib,
flutter324,
fetchFromGitHub,
mpv-unwrapped,
libass,
pulseaudio,
}:
flutter324.buildFlutterApplication rec {
pname = "musicpod";
version = "1.11.0";
src = fetchFromGitHub {
owner = "ubuntu-flutter-community";
repo = "musicpod";
rev = "v${version}";
hash = "sha256-Xs6qDSqd10mYjLNFiPV9Irthd/hK2kE4fC6i03QvOn0=";
};
postPatch = ''
substituteInPlace snap/gui/musicpod.desktop \
--replace-fail 'Icon=''${SNAP}/meta/gui/musicpod.png' 'Icon=musicpod'
'';
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
audio_service_mpris = "sha256-QRZ4a3w4MZP8/A4yXzP4P9FPwEVNXlntmBwE8I+s2Kk=";
media_kit_native_event_loop = "sha256-JBtFTYlztDQvN/qQcDxkK27mka2fSG+iiIIxk2mqEpY=";
media_kit_video = "sha256-JBtFTYlztDQvN/qQcDxkK27mka2fSG+iiIIxk2mqEpY=";
phoenix_theme = "sha256-5kgPAnK61vFi/sJ1jr3c5D2UZbxItW8YOk/IJEtHkZo=";
yaru = "sha256-3GexoQpwr7pazajAMyPl9rcYhmSgQeialZTvJsadP4k=";
};
buildInputs = [
mpv-unwrapped
libass
];
runtimeDependencies = [ pulseaudio ];
postInstall = ''
install -Dm644 snap/gui/musicpod.desktop -t $out/share/applications
install -Dm644 snap/gui/musicpod.png -t $out/share/pixmaps
'';
meta = {
description = "Music, radio, television and podcast player";
homepage = "https://github.com/ubuntu-flutter-community/musicpod";
license = lib.licenses.gpl3Only;
mainProgram = "musicpod";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
};
}

File diff suppressed because it is too large Load Diff

View File

@ -9,4 +9,5 @@
sqlcipher_flutter_libs = callPackage ./sqlcipher_flutter_libs { };
sqlite3 = callPackage ./sqlite3 { };
system_tray = callPackage ./system-tray { };
super_native_extensions = callPackage ./super_native_extensions { };
}

View File

@ -0,0 +1,77 @@
{
lib,
rustPlatform,
pkg-config,
at-spi2-atk,
gdk-pixbuf,
cairo,
gtk3,
writeText,
stdenv,
}:
{ version, src, ... }:
let
rustDep = rustPlatform.buildRustPackage {
pname = "super_native_extensions-rs";
inherit version src;
sourceRoot = "${src.name}/rust";
cargoLock =
rec {
_0_8_22 = {
lockFile = ./Cargo-0.8.22.lock;
outputHashes = {
"mime_guess-2.0.4" = "sha256-KSw0YUTGqNEWY9pMvQplUGajJgoP2BRwVX6qZPpB2rI=";
};
};
_0_8_21 = _0_8_22;
_0_8_20 = _0_8_22;
_0_8_19 = _0_8_22;
_0_8_18 = _0_8_22;
_0_8_17 = _0_8_22;
}
.${"_" + (lib.replaceStrings [ "." ] [ "_" ] version)} or (throw ''
Unsupported version of pub 'super_native_extensions': '${version}'
Please add ${src}/rust/Cargo.lock
to this path, and add corresponding entry here. If the lock
is the same with existing versions, add an alias here.
'');
nativeBuildInputs = [ pkg-config ];
buildInputs = [
at-spi2-atk
gdk-pixbuf
cairo
gtk3
];
passthru.libraryPath = "lib/libsuper_native_extensions.so";
};
fakeCargokitCmake = writeText "FakeCargokit.cmake" ''
function(apply_cargokit target manifest_dir lib_name any_symbol_name)
target_link_libraries("''${target}" PRIVATE ${rustDep}/${rustDep.passthru.libraryPath})
set("''${target}_cargokit_lib" ${rustDep}/${rustDep.passthru.libraryPath} PARENT_SCOPE)
endfunction()
'';
in
stdenv.mkDerivation {
pname = "super_native_extensions";
inherit version src;
inherit (src) passthru;
installPhase = ''
runHook preInstall
cp -r "$src" "$out"
chmod +rwx $out/cargokit/cmake/cargokit.cmake
cp ${fakeCargokitCmake} $out/cargokit/cmake/cargokit.cmake
runHook postInstall
'';
}