Commit 2e78a24

HPCesia <me@hpcesia.com>
2026-05-19 14:20:43
new package: nocturne
1 parent a9887de
pkgs/nocturne/default.nix
@@ -0,0 +1,103 @@
+# Modifed from https://forge.kruemmelspalter.org/communix/nur-packages/src/branch/main/pkgs/nocturne/default.nix
+# Also in NUR https://github.com/nix-community/nur-combined/blob/4c3b2c48edfcb14533c0989fbfd3ba7f68200f9a/repos/Baum/pkgs/nocturne/default.nix
+{
+  lib,
+  stdenv,
+  python3,
+  fetchFromGitHub,
+  fetchFromGitLab,
+  gtk4,
+  shared-mime-info,
+  libadwaita,
+  libsecret,
+  meson,
+  ninja,
+  blueprint-compiler,
+  pkg-config,
+  wrapGAppsHook4,
+  desktop-file-utils,
+  gst_all_1,
+  gobject-introspection,
+  xdg-user-dirs,
+}: let
+  gtk4New = gtk4.overrideAttrs (old: rec {
+    version = "4.22.1";
+    nativeBuildInputs = old.nativeBuildInputs ++ [shared-mime-info];
+    src = fetchFromGitLab {
+      domain = "gitlab.gnome.org";
+      owner = "GNOME";
+      repo = "gtk";
+      tag = version;
+      hash = "sha256-MTW5qCq3Sj0aSGPfGQphN1t4cs4rPbLPBc7BRgOktDE=";
+    };
+  });
+  libadwaitaNew = (
+    (libadwaita.overrideAttrs (_: rec {
+      version = "1.9.0";
+      src = fetchFromGitLab {
+        domain = "gitlab.gnome.org";
+        owner = "GNOME";
+        repo = "libadwaita";
+        tag = version;
+        hash = "sha256-JAKP8CjLCKGZvHoB26ih/J3xAru4wiVf/ObG0L8r4pY=";
+      };
+    })).override
+    {
+      gtk4 = gtk4New;
+    }
+  );
+in
+  stdenv.mkDerivation {
+    pname = "nocturne";
+    version = "1.1.1";
+
+    src = fetchFromGitHub {
+      owner = "Jeffser";
+      repo = "Nocturne";
+      rev = "74f1420a9a2171e48440686f083720ba49a554aa";
+      hash = "sha256-7B9wtuxfsF6brtLkIEeWII4IvXwdJHnZ1Wr3uLfoqHU=";
+    };
+
+    nativeBuildInputs = [
+      (blueprint-compiler.override {
+        libadwaita = libadwaitaNew;
+      })
+      desktop-file-utils
+      gobject-introspection
+      meson
+      ninja
+      pkg-config
+      wrapGAppsHook4
+    ];
+
+    buildInputs = [
+      gst_all_1.gstreamer
+      gtk4New
+      libadwaitaNew
+      libsecret
+      xdg-user-dirs
+      (python3.withPackages (py:
+        with py; [
+          colorthief
+          (callPackage ./mpris-server.nix {})
+          requests
+          syncedlyrics
+          tinytag
+        ]))
+    ];
+
+    preFixup = ''
+      gappsWrapperArgs+=(
+        --prefix GI_TYPELIB_PATH : "${gtk4New}/lib/girepository-1.0"
+        --prefix GI_TYPELIB_PATH : "${libadwaitaNew}/lib/girepository-1.0"
+        --prefix PATH : "${lib.getBin xdg-user-dirs}/bin"
+      )
+    '';
+
+    meta = with lib; {
+      description = "An Adwaita Music Player / Library Manager ";
+      homepage = "https://github.com/Jeffser/Nocturne";
+      license = licenses.gpl3Plus;
+      platforms = platforms.linux;
+    };
+  }
pkgs/nocturne/mpris-server.nix
@@ -0,0 +1,45 @@
+# From https://forge.kruemmelspalter.org/communix/nur-packages/src/branch/main/pkgs/mpris-server/default.nix
+# Also in NUR https://github.com/nix-community/nur-combined/blob/4c3b2c48edfcb14533c0989fbfd3ba7f68200f9a/repos/Baum/pkgs/mpris-server/default.nix
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  emoji,
+  pydbus,
+  pygobject3,
+  unidecode,
+  setuptools,
+  strenum,
+}:
+buildPythonPackage rec {
+  pname = "mpris-server";
+  version = "0.9.6";
+  pyproject = true;
+
+  src = fetchPypi {
+    pname = "mpris_server";
+    inherit version;
+    hash = "sha256-T0ZeDQiYIAhKR8aw3iv3rtwzc+R0PTQuIh6+Hi4rIHQ=";
+  };
+
+  build-system = [setuptools];
+
+  dependencies = [
+    emoji
+    pydbus
+    pygobject3
+    strenum
+    unidecode
+  ];
+
+  pythonImportsCheck = ["mpris_server"];
+
+  # upstream has no tests
+  doCheck = false;
+
+  meta = {
+    description = "Publish a MediaPlayer2 MPRIS device to D-Bus";
+    homepage = "https://pypi.org/project/mpris-server/";
+    license = lib.licenses.agpl3Only;
+  };
+}
default.nix
@@ -33,6 +33,8 @@
 
       musly-player = callPackage ./pkgs/musly-player {};
 
+      nocturne = callPackage ./pkgs/nocturne {};
+
       particle-music = callPackage ./pkgs/particle-music {};
 
       shimmie2-unwrapped = callPackage ./pkgs/shimmie2/unwrapped.nix {};
README.md
@@ -15,6 +15,7 @@
 | `localbooru-bin` | [localbooru-bin](https://github.com/resucutie/localbooru) | `1.6.1` | [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html) | Cross platform local booru collection that exclusively works on local storage, without selfhosting |
 | `mo2-lint` | [mo2-lint](https://github.com/Furglitch/modorganizer2-linux-installer) | `0-unstable-2026-05-18` | [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html) | An easy-to-use Mod Organizer 2 installer for Linux, rewrited in Python. |
 | `musly-player` | [musly-player](https://github.com/dddevid/Musly) | `1.0.13` | [CC-BY-NC-SA-4.0](https://spdx.org/licenses/CC-BY-NC-SA-4.0.html) | A beautiful Flutter music streaming client for Subsonic-compatible servers with a modern Apple Music-inspired UI. |
+| `nocturne` | [nocturne](https://github.com/Jeffser/Nocturne) | `1.1.1` | [GPL-3.0-or-later](https://spdx.org/licenses/GPL-3.0-or-later.html) | An Adwaita Music Player / Library Manager  |
 | `particle-music` | [particle-music](https://github.com/AfalpHy/ParticleMusic) | `2.2.1` | [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) | A cross-platform local music player based on Flutter |
 | `shimmie2` | [shimmie2](https://github.com/shish/shimmie2) | `2.12.2` | [GPL-2.0](https://spdx.org/licenses/GPL-2.0.html) | An easy-to-install community image gallery (aka booru) |
 | `shimmie2-unwrapped` | [shimmie2-unwrapped](https://github.com/shish/shimmie2) | `2.12.2` | [GPL-2.0](https://spdx.org/licenses/GPL-2.0.html) | An easy-to-install community image gallery (aka booru) |