From a8fe4730e3727db9ccfeebc5d5a717a2fee73c05 Mon Sep 17 00:00:00 2001 From: wxt <3264117476@qq.com> Date: Sat, 21 Dec 2024 17:31:48 +0800 Subject: [PATCH] supergee: init at 0-unstable-2023-11-21 --- pkgs/by-name/su/supergee/package.nix | 84 ++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 pkgs/by-name/su/supergee/package.nix diff --git a/pkgs/by-name/su/supergee/package.nix b/pkgs/by-name/su/supergee/package.nix new file mode 100644 index 0000000000000..47e9fb429bf78 --- /dev/null +++ b/pkgs/by-name/su/supergee/package.nix @@ -0,0 +1,84 @@ +{ + lib, + stdenv, + fetchFromGitHub, + meson, + ninja, + vala, + gtk3, + beets, + libgee, + glib, + libxml2, + unstableGitUpdater, + pkg-config, + cmake, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "supergee"; + version = "0-unstable-2023-11-21"; + + src = fetchFromGitHub { + owner = "DannyGB"; + repo = "SuperGee"; + rev = "c1232f6a8a9d4161644d728df793ffd3cb5cc4af"; + hash = "sha256-lv7C4ku3MdiHxg1LfmnzT5Sx3DTtvP9g3XPOQlNBDkg="; + }; + + nativeBuildInputs = [ + meson + ninja + libxml2.bin + vala + pkg-config + cmake + glib.bin + ]; + + buildInputs = [ + gtk3 + libgee + glib + ]; + + postPatch = '' + substituteInPlace BeetService.vala \ + --replace-fail '"beet"' '"${lib.getExe beets}"' + ''; + + preConfigure = '' + pushd .. + find -exec chmod +w {} \; + mkdir build + cd build + mkdir SuperG@exe + glib-compile-resources --sourcedir ../resources --generate-source --target SuperG@exe/resources.c ../resources/superg.gresource.xml + popd + ''; + + installPhase = '' + runHook preInstall + + install -Dm755 SuperG $out/bin/SuperG + + runHook postInstall + ''; + + sourceRoot = "${finalAttrs.src.name}/src"; + + dontUseCmakeConfigure = true; + + passthru = { + updateScript = unstableGitUpdater { hardcodeZeroVersion = true; }; + }; + + meta = { + description = "Vala based UI for beets"; + homepage = "https://github.com/DannyGB/SuperGee"; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.linux; + mainProgram = "SuperG"; + maintainers = with lib.maintainers; [ bot-wxt1221 ]; + }; +})