From 7dfc7cd76f32006ed25f74fc5a84ae691e05ae70 Mon Sep 17 00:00:00 2001 From: emanueljg Date: Sat, 24 May 2025 23:45:04 +0200 Subject: [PATCH] deduplicate pkg with downstream overrideAttrs --- nix/package.nix | 34 ++-------------------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/nix/package.nix b/nix/package.nix index d96b6b9..09dcbac 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -1,17 +1,6 @@ -{ buildGoModule +{ discordo , lib -, makeWrapper -, xsel -, wl-clipboard - -, xorgClipboardSupport ? true -, waylandClipboardSupport ? true -}: -let - anyClipboardSupport = xorgClipboardSupport || waylandClipboardSupport; -in -buildGoModule { - pname = "discordo"; +}: discordo.overrideAttrs { version = "git"; src = let fs = lib.fileset; in fs.toSource { @@ -26,23 +15,4 @@ buildGoModule { }; vendorHash = "sha256-gEwTpt/NPN1+YpTBmW8F34UotowrOcA0mfFgBdVFiTA="; - - nativeBuildInputs = lib.optional anyClipboardSupport makeWrapper; - - postInstall = lib.optionalString xorgClipboardSupport '' - wrapProgram $out/bin/discordo \ - --prefix PATH : ${lib.makeBinPath [ xsel ]} - '' + lib.optionalString waylandClipboardSupport '' - wrapProgram $out/bin/discordo \ - --prefix PATH : ${lib.makeBinPath [ wl-clipboard ]} - ''; - - meta = { - description = "A lightweight, secure, and feature-rich Discord terminal client"; - homepage = "https://github.com/ayn2op/discordo"; - license = lib.licenses.gpl3; - maintainers = [ lib.maintainers.arian-d ]; - mainProgram = "discordo"; - }; } -