From b41b63b99277846e2e750f2f4d0b9bb7a88b4e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 30 Nov 2024 16:36:13 +0100 Subject: [PATCH 1/4] dunst: nixfmt --- pkgs/by-name/du/dunst/package.nix | 115 +++++++++++++++++------------- 1 file changed, 64 insertions(+), 51 deletions(-) diff --git a/pkgs/by-name/du/dunst/package.nix b/pkgs/by-name/du/dunst/package.nix index c5dc4b04eac7..3e91f374e327 100644 --- a/pkgs/by-name/du/dunst/package.nix +++ b/pkgs/by-name/du/dunst/package.nix @@ -1,30 +1,31 @@ -{ stdenv -, lib -, fetchFromGitHub -, makeWrapper -, pkg-config -, which -, perl -, jq -, libXrandr -, coreutils -, cairo -, dbus -, systemd -, gdk-pixbuf -, glib -, libX11 -, libXScrnSaver -, wayland -, wayland-protocols -, libXinerama -, libnotify -, pango -, xorgproto -, librsvg -, testers -, withX11 ? true -, withWayland ? true +{ + stdenv, + lib, + fetchFromGitHub, + makeWrapper, + pkg-config, + which, + perl, + jq, + libXrandr, + coreutils, + cairo, + dbus, + systemd, + gdk-pixbuf, + glib, + libX11, + libXScrnSaver, + wayland, + wayland-protocols, + libXinerama, + libnotify, + pango, + xorgproto, + librsvg, + testers, + withX11 ? true, + withWayland ? true, }: stdenv.mkDerivation (finalAttrs: { @@ -46,26 +47,32 @@ stdenv.mkDerivation (finalAttrs: { makeWrapper ]; - buildInputs = [ - cairo - dbus - gdk-pixbuf - glib - libnotify - pango - librsvg - ] ++ lib.optionals withX11 [ - libX11 - libXScrnSaver - libXinerama - xorgproto - libXrandr - ] ++ lib.optionals withWayland [ - wayland - wayland-protocols - ]; + buildInputs = + [ + cairo + dbus + gdk-pixbuf + glib + libnotify + pango + librsvg + ] + ++ lib.optionals withX11 [ + libX11 + libXScrnSaver + libXinerama + xorgproto + libXrandr + ] + ++ lib.optionals withWayland [ + wayland + wayland-protocols + ]; - outputs = [ "out" "man" ]; + outputs = [ + "out" + "man" + ]; makeFlags = [ "PREFIX=$(out)" @@ -73,16 +80,19 @@ stdenv.mkDerivation (finalAttrs: { "SYSCONFDIR=$(out)/etc" "SERVICEDIR_DBUS=$(out)/share/dbus-1/services" "SERVICEDIR_SYSTEMD=$(out)/lib/systemd/user" - ] - ++ lib.optional (!withX11) "X11=0" - ++ lib.optional (!withWayland) "WAYLAND=0"; + ] ++ lib.optional (!withX11) "X11=0" ++ lib.optional (!withWayland) "WAYLAND=0"; postInstall = '' wrapProgram $out/bin/dunst \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" wrapProgram $out/bin/dunstctl \ - --prefix PATH : "${lib.makeBinPath [ coreutils dbus ]}" + --prefix PATH : "${ + lib.makeBinPath [ + coreutils + dbus + ] + }" substituteInPlace $out/share/zsh/site-functions/_dunstctl $out/share/fish/vendor_completions.d/{dunstctl,dunstify} \ --replace-fail "jq" "${lib.getExe jq}" @@ -96,7 +106,10 @@ stdenv.mkDerivation (finalAttrs: { license = licenses.bsd3; # NOTE: 'unix' or even 'all' COULD work too, I'm not sure platforms = platforms.linux; - maintainers = with maintainers; [ domenkozar gepbird ]; + maintainers = with maintainers; [ + domenkozar + gepbird + ]; mainProgram = "dunst"; }; }) From 1d9f567adaf2c542a309de20257930e524c09ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 30 Nov 2024 16:40:55 +0100 Subject: [PATCH 2/4] dunst: add update script --- pkgs/by-name/du/dunst/package.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/du/dunst/package.nix b/pkgs/by-name/du/dunst/package.nix index 3e91f374e327..e37b9df29274 100644 --- a/pkgs/by-name/du/dunst/package.nix +++ b/pkgs/by-name/du/dunst/package.nix @@ -24,6 +24,7 @@ xorgproto, librsvg, testers, + nix-update-script, withX11 ? true, withWayland ? true, }: @@ -98,7 +99,12 @@ stdenv.mkDerivation (finalAttrs: { --replace-fail "jq" "${lib.getExe jq}" ''; - passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; }; + passthru = { + tests.version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + updateScript = nix-update-script { }; + }; meta = with lib; { description = "Lightweight and customizable notification daemon"; From 1ded47e2f231bb92de8fe143fa0acc75d0dc5ae0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 30 Nov 2024 16:42:09 +0100 Subject: [PATCH 3/4] dunst: 1.11.0 -> 1.12.0, update completions --- pkgs/by-name/du/dunst/package.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/du/dunst/package.nix b/pkgs/by-name/du/dunst/package.nix index e37b9df29274..1b0de91e263d 100644 --- a/pkgs/by-name/du/dunst/package.nix +++ b/pkgs/by-name/du/dunst/package.nix @@ -31,13 +31,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "dunst"; - version = "1.11.0"; + version = "1.12.0"; src = fetchFromGitHub { owner = "dunst-project"; repo = "dunst"; - rev = "v${finalAttrs.version}"; - hash = "sha256-eiFvvavXGNcHZnEGwlTLxRqFNdkvEZMwNIkVyDn1V6o="; + rev = "refs/tags/v${finalAttrs.version}"; + hash = "sha256-rnR/AErsjsaOMM/aF8VXZHV8b8OiUMRCi8IFLT4/8Vo="; }; nativeBuildInputs = [ @@ -95,7 +95,10 @@ stdenv.mkDerivation (finalAttrs: { ] }" - substituteInPlace $out/share/zsh/site-functions/_dunstctl $out/share/fish/vendor_completions.d/{dunstctl,dunstify} \ + substituteInPlace \ + $out/share/zsh/site-functions/_dunstctl \ + $out/share/bash-completion/completions/dunstctl \ + $out/share/fish/vendor_completions.d/{dunstctl,dunstify}.fish \ --replace-fail "jq" "${lib.getExe jq}" ''; From e33b3db86050308043c6d76a079fdf73212d3e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gutyina=20Gerg=C5=91?= Date: Sat, 30 Nov 2024 18:30:56 +0100 Subject: [PATCH 4/4] dunst: remove `with lib;` and order `meta` attrs --- pkgs/by-name/du/dunst/package.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/by-name/du/dunst/package.nix b/pkgs/by-name/du/dunst/package.nix index 1b0de91e263d..a11af25ca81f 100644 --- a/pkgs/by-name/du/dunst/package.nix +++ b/pkgs/by-name/du/dunst/package.nix @@ -109,16 +109,16 @@ stdenv.mkDerivation (finalAttrs: { updateScript = nix-update-script { }; }; - meta = with lib; { + meta = { description = "Lightweight and customizable notification daemon"; homepage = "https://dunst-project.org/"; - license = licenses.bsd3; - # NOTE: 'unix' or even 'all' COULD work too, I'm not sure - platforms = platforms.linux; - maintainers = with maintainers; [ + license = lib.licenses.bsd3; + mainProgram = "dunst"; + maintainers = with lib.maintainers; [ domenkozar gepbird ]; - mainProgram = "dunst"; + # NOTE: 'unix' or even 'all' COULD work too, I'm not sure + platforms = lib.platforms.linux; }; })