deduplicate pkg with downstream overrideAttrs
This commit is contained in:
parent
87a973eab5
commit
7dfc7cd76f
1 changed files with 2 additions and 32 deletions
|
|
@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue