From 32119d6d6d81b76256473f4e9c1836f8ca361067 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Barnouin?= Date: Thu, 14 Nov 2024 10:32:58 +0100 Subject: [PATCH] first commit --- README.md | 0 default.nix | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) create mode 100644 README.md create mode 100644 default.nix diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..e96dcf1 --- /dev/null +++ b/default.nix @@ -0,0 +1,85 @@ +{ lib +, stdenv +, fetchFromGitea +, nix-update-script +, meson +, ninja +, gettext +, desktop-file-utils +, cargo +, rustPlatform +, rustc +, pkg-config +, glib +, libadwaita +, libhandy +, gtk4 +, openssl +, alsa-lib +, libpulseaudio +, wrapGAppsHook4 +, blueprint-compiler +, gst_all_1 +}: + +stdenv.mkDerivation rec { + pname = "spot"; + version = "0.6.0"; + + src = fetchFromGitea { + domain = "git.le43.eu"; + owner = "tbarnouin"; + repo = "spot"; + rev = "main"; + hash = "sha256-C/HeqN1Y/bNYWx3WsqIKf6rjLBI3TPs5h+kLClvurYQ="; + }; + + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-HIjA+oDFegsnnV3EViaWfsNhmqPB1yl8rIVS5LbTu/A="; + }; + + nativeBuildInputs = [ + gettext + meson + ninja + pkg-config + gtk4 # for gtk-update-icon-cache + glib # for glib-compile-schemas + desktop-file-utils + cargo + rustPlatform.cargoSetupHook + rustc + wrapGAppsHook4 + blueprint-compiler + ]; + + buildInputs = [ + glib + gtk4 + libadwaita + libhandy + openssl + alsa-lib + libpulseaudio + gst_all_1.gst-plugins-base + gst_all_1.gstreamer + ]; + + # https://github.com/xou816/spot/issues/313 + mesonBuildType = "release"; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = with lib; { + description = "Native Spotify client for the GNOME desktop"; + mainProgram = "spot"; + homepage = "https://github.com/xou816/spot"; + license = licenses.mit; + maintainers = [ ]; + platforms = platforms.linux; + }; +}