From b9c9235842568bb21884f2c8fae847b4cb3746e6 Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:35:52 +0800 Subject: [PATCH 1/4] amberol: migrate to by-name --- .../amberol/default.nix => by-name/am/amberol/package.nix} | 0 pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 2 deletions(-) rename pkgs/{applications/audio/amberol/default.nix => by-name/am/amberol/package.nix} (100%) diff --git a/pkgs/applications/audio/amberol/default.nix b/pkgs/by-name/am/amberol/package.nix similarity index 100% rename from pkgs/applications/audio/amberol/default.nix rename to pkgs/by-name/am/amberol/package.nix diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bcc9af48f461..3aa114fcb758 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2995,8 +2995,6 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Security; }; - amberol = callPackage ../applications/audio/amberol { }; - inherit (callPackages ../development/tools/ammonite {}) ammonite_2_12 ammonite_2_13; From 6072d74fb1ed275cf960bfaf7fc317e4df237128 Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:36:09 +0800 Subject: [PATCH 2/4] amberol: format with nixfmt-rfc-style --- pkgs/by-name/am/amberol/package.nix | 39 +++++++++++++++-------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/am/amberol/package.nix b/pkgs/by-name/am/amberol/package.nix index 8ec6c3e6b1ab..53986de33698 100644 --- a/pkgs/by-name/am/amberol/package.nix +++ b/pkgs/by-name/am/amberol/package.nix @@ -1,22 +1,23 @@ -{ lib -, stdenv -, fetchFromGitLab -, rustPlatform -, cargo -, desktop-file-utils -, appstream-glib -, meson -, ninja -, pkg-config -, reuse -, rustc -, m4 -, wrapGAppsHook4 -, glib -, gtk4 -, gst_all_1 -, libadwaita -, dbus +{ + lib, + stdenv, + fetchFromGitLab, + rustPlatform, + cargo, + desktop-file-utils, + appstream-glib, + meson, + ninja, + pkg-config, + reuse, + rustc, + m4, + wrapGAppsHook4, + glib, + gtk4, + gst_all_1, + libadwaita, + dbus, }: stdenv.mkDerivation rec { From f75c29212eb38fda7d932ddb75bffbaa18de76cf Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:43:15 +0800 Subject: [PATCH 3/4] amberol: 0.10.3 -> 2024.1 --- pkgs/by-name/am/amberol/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/am/amberol/package.nix b/pkgs/by-name/am/amberol/package.nix index 53986de33698..0672ef8bea80 100644 --- a/pkgs/by-name/am/amberol/package.nix +++ b/pkgs/by-name/am/amberol/package.nix @@ -22,20 +22,20 @@ stdenv.mkDerivation rec { pname = "amberol"; - version = "0.10.3"; + version = "2024.1"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; repo = pname; rev = version; - hash = "sha256-nAoUO0bGToNGD2W8qJmTegrETOJDdM04hI1jjiYkZXI="; + hash = "sha256-WuyvTgh9Qc5WcgEssxkytwQpSACd82l5WKeMD0NFOp8="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-4ZoliqQ665KPDFl+1eBCE+1fZgr+FA7vesPstoRs0RU="; + hash = "sha256-C1ENyNUpgwGlZus/zIWD1mUrmWT9L0fH/1T4QaIxGJw="; }; postPatch = '' From 035b0edd66aeaf0c0743dec3ad1147248dfe9fa0 Mon Sep 17 00:00:00 2001 From: linsui <36977733+linsui@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:44:08 +0800 Subject: [PATCH 4/4] amberol: polish --- pkgs/by-name/am/amberol/package.nix | 47 +++++++++++++++-------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/pkgs/by-name/am/amberol/package.nix b/pkgs/by-name/am/amberol/package.nix index 0672ef8bea80..ba530618be91 100644 --- a/pkgs/by-name/am/amberol/package.nix +++ b/pkgs/by-name/am/amberol/package.nix @@ -27,14 +27,14 @@ stdenv.mkDerivation rec { src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; - repo = pname; + repo = "amberol"; rev = version; hash = "sha256-WuyvTgh9Qc5WcgEssxkytwQpSACd82l5WKeMD0NFOp8="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; - name = "${pname}-${version}"; + name = "amberol-${version}"; hash = "sha256-C1ENyNUpgwGlZus/zIWD1mUrmWT9L0fH/1T4QaIxGJw="; }; @@ -44,37 +44,40 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ appstream-glib + cargo desktop-file-utils + m4 meson ninja pkg-config reuse - m4 - wrapGAppsHook4 - rustPlatform.cargoSetupHook - cargo rustc + rustPlatform.cargoSetupHook + wrapGAppsHook4 ]; - buildInputs = [ - glib - gtk4 - libadwaita - gst_all_1.gstreamer - gst_all_1.gst-plugins-base - gst_all_1.gst-plugins-good - gst_all_1.gst-plugins-bad - gst_all_1.gst-plugins-ugly - gst_all_1.gst-libav - dbus - ]; + buildInputs = + [ + dbus + glib + gtk4 + libadwaita + ] + ++ (with gst_all_1; [ + gstreamer + gst-plugins-base + gst-plugins-good + gst-plugins-bad + gst-plugins-ugly + gst-libav + ]); - meta = with lib; { + meta = { homepage = "https://gitlab.gnome.org/World/amberol"; description = "Small and simple sound and music player"; - maintainers = with maintainers; [ linsui ]; - license = licenses.gpl3Plus; - platforms = platforms.linux; + maintainers = with lib.maintainers; [ linsui ]; + license = lib.licenses.gpl3Plus; + platforms = lib.platforms.linux; mainProgram = "amberol"; }; }