Unverified Commit 6bcba527 authored by Thiago Kenji Okada's avatar Thiago Kenji Okada Committed by GitHub
Browse files

bloomeetunes: init at 2.10.9 (#360306)

parents 9187ff26 1b376d5f
Loading
Loading
Loading
Loading
+62 −0
Original line number Diff line number Diff line
{
  autoPatchelfHook,
  lib,
  fetchFromGitHub,
  flutter324,
  mpv,
  pkg-config,
  makeDesktopItem,
  wrapGAppsHook3,
  copyDesktopItems,
}:
flutter324.buildFlutterApplication rec {
  pname = "bloomeetunes";
  version = "2.10.9";

  src = fetchFromGitHub {
    owner = "HemantKArya";
    repo = "BloomeeTunes";
    rev = "v${version}+152";
    hash = "sha256-Yv0aSq2eBcHKpy4PPjAhx194UW8Gm0UJlE+F+onZYFM=";
  };

  pubspecLock = lib.importJSON ./pubspec.lock.json;

  desktopItems = [
    (makeDesktopItem {
      name = "bloomeetunes";
      exec = "bloomee";
      icon = "bloomeetunes";
      genericName = "Music Player";
      desktopName = "Bloomee Tunes";
    })
  ];

  nativeBuildInputs = [
    pkg-config
    autoPatchelfHook
    wrapGAppsHook3
    copyDesktopItems
  ];

  postInstall = ''
    install -Dm644 ./assets/icons/bloomee_new_logo_c.png $out/share/pixmaps/bloomeetunes.png
  '';

  extraWrapProgramArgs = ''
    --prefix LD_LIBRARY_PATH : "$out/app/bloomeetunes/lib:${
      lib.makeLibraryPath [
        mpv
      ]
    }"
  '';

  meta = {
    description = "Cross-platform music app designed to bring you ad-free tunes from various sources";
    homepage = "https://github.com/HemantKArya/BloomeeTunes";
    mainProgram = "bloomee";
    license = with lib.licenses; [ gpl2Plus ];
    maintainers = with lib.maintainers; [ aucub ];
    platforms = lib.platforms.linux;
  };
}
+1912 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
  handy_window = callPackage ./handy-window { };
  matrix = callPackage ./matrix { };
  media_kit_libs_linux = callPackage ./media_kit_libs_linux { };
  metadata_god = callPackage ./metadata_god { };
  olm = callPackage ./olm { };
  pdfrx = callPackage ./pdfrx { };
  printing = callPackage ./printing { };
+44 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchzip,
  replaceVars,
}:

{ version, src, ... }:

let
  inherit (stdenv.hostPlatform) system;
  selectSystem =
    attrs: attrs.${system} or (throw "metadata_god: ${stdenv.hostPlatform.system} is not supported");
  suffix = selectSystem {
    x86_64-linux = "linux-x64";
    aarch64-linux = "linux-arm64";
  };
  metadata_god = fetchzip {
    url = "https://github.com/KRTirtho/frb_plugins/releases/download/metadata_god-v0.5.3/linux.tar.gz";
    hash = "sha256-ZR/q1dF8w4Yab6dRRiS5ZCChVnoecFUrtGiHXGlll9A=";
    stripRoot = false;
  };
in
stdenv.mkDerivation {
  pname = "metadata_god";
  inherit version src;
  inherit (src) passthru;

  patches = [
    (replaceVars ./metadata_god.patch {
      output_lib = "${metadata_god}/${suffix}/libmetadata_god.so";
    })
  ];

  installPhase = ''
    runHook preInstall

    cp -r . $out

    runHook postInstall
  '';

  meta.sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
}
+33 −0
Original line number Diff line number Diff line
--- old/linux/CMakeLists.txt	2024-11-30 12:48:42.346266052 +0000
+++ new/linux/CMakeLists.txt	2024-11-30 12:50:45.495928529 +0000
@@ -9,29 +9,10 @@
 set(PROJECT_NAME "metadata_god")
 project(${PROJECT_NAME} LANGUAGES CXX)
 
-# Download the binaries if they are not already present.
-set(LibRoot "${CMAKE_CURRENT_SOURCE_DIR}/${LibraryVersion}")
-set(ArchivePath "${LibRoot}.tar.gz")
-if(NOT EXISTS ${ArchivePath})
-  file(DOWNLOAD
-    "https://github.com/KRTirtho/metadata_god/releases/download/${LibraryVersion}/other.tar.gz"
-    ${ArchivePath}
-    TLS_VERIFY ON
-  )
-endif()
-
-# Extract the binaries, overriding any already present.
-file(REMOVE_RECURSE ${LibRoot})
-file(MAKE_DIRECTORY ${LibRoot})
-execute_process(
-  COMMAND ${CMAKE_COMMAND} -E tar xzf ${ArchivePath}
-  WORKING_DIRECTORY ${LibRoot}
-)
-
 # List of absolute paths to libraries that should be bundled with the plugin.
 # This list could contain prebuilt libraries, or libraries created by an
 # external build triggered from this build file.
 set(metadata_god_bundled_libraries
-  "${LibRoot}/${FLUTTER_TARGET_PLATFORM}/libmetadata_god.so"
+  @output_lib@
   PARENT_SCOPE
 )