snippetexpander: 1.0.1 -> 1.0.2

This commit is contained in:
Ian M. Jones 2024-03-29 17:54:53 +00:00
parent ac9da6874a
commit 2a85869152
No known key found for this signature in database
4 changed files with 57 additions and 34 deletions

View File

@ -1,9 +1,11 @@
{ lib
, buildGoModule
, fetchFromSourcehut
, makeWrapper
, scdoc
, installShellFiles
, snippetexpanderd
, snippetexpanderx
}:
buildGoModule rec {
@ -11,24 +13,27 @@ buildGoModule rec {
pname = "snippetexpander";
vendorHash = "sha256-wSAho59yxcXTu1zQ5x783HT4gtfSM4GdsOEeC1wfHhE=";
vendorHash = "sha256-W9NkENdZRzqSAONI9QS2EI5aERK+AaPqwYwITKLwXQE=";
proxyVendor = true;
modRoot = "cmd/snippetexpander";
nativeBuildInputs = [
makeWrapper
scdoc
installShellFiles
];
buildInputs = [
snippetexpanderd
snippetexpanderx
];
ldflags = [
"-s"
"-w"
"-X 'main.version=${src.rev}'"
];
postInstall = ''
@ -36,12 +41,18 @@ buildGoModule rec {
installManPage snippetexpander.1
'';
meta = with lib; {
postFixup = ''
# Ensure snippetexpanderd and snippetexpanderx are available to start/stop.
wrapProgram $out/bin/snippetexpander \
--prefix PATH : ${lib.makeBinPath [ snippetexpanderd snippetexpanderx ]}
'';
meta = {
description = "Your little expandable text snippet helper CLI";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ ianmjones ];
platforms = lib.platforms.linux;
mainProgram = "snippetexpander";
};
}

View File

@ -2,44 +2,49 @@
, stdenv
, buildGoModule
, fetchFromSourcehut
, pkg-config
, makeWrapper
, scdoc
, installShellFiles
, xorg
, gtk3
, xclip
, wl-clipboard
, xdotool
, wtype
}:
buildGoModule rec {
pname = "snippetexpanderd";
version = "1.0.1";
version = "1.0.2";
src = fetchFromSourcehut {
owner = "~ianmjones";
repo = "snippetexpander";
rev = "v${version}";
hash = "sha256-y3TJ+L3kXYfZFzAD1vmhvP6Yarctu5LHq/74005h8sI=";
hash = "sha256-iEoBri+NuFfLkARUBA+D/Fe9xk6PPV62N/YRqPv9C/A=";
};
vendorHash = "sha256-QX8HI8I1ZJI6HJ1sl86OiJ4nxwFAjHH8h1zB9ASJaQs=";
vendorHash = "sha256-W9NkENdZRzqSAONI9QS2EI5aERK+AaPqwYwITKLwXQE=";
proxyVendor = true;
modRoot = "cmd/snippetexpanderd";
nativeBuildInputs = [
pkg-config
makeWrapper
scdoc
installShellFiles
];
buildInputs = [
xorg.libX11
gtk3
xclip
wl-clipboard
xdotool
wtype
];
ldflags = [
"-s"
"-w"
"-X 'main.version=${src.rev}'"
];
postInstall = ''
@ -48,16 +53,17 @@ buildGoModule rec {
'';
postFixup = ''
# Ensure xclip/wcopy and xdotool/wtype are available for copy and paste duties.
wrapProgram $out/bin/snippetexpanderd \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 ]}
--prefix PATH : ${lib.makeBinPath [ xclip wl-clipboard xdotool wtype ]}
'';
meta = with lib; {
meta = {
description = "Your little expandable text snippet helper daemon";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ ianmjones ];
platforms = lib.platforms.linux;
mainProgram = "snippetexpanderd";
};
}

View File

@ -1,7 +1,7 @@
{ lib
, buildGoModule
, fetchFromSourcehut
, makeWrapper
, wrapGAppsHook
, wails
, scdoc
, installShellFiles
@ -10,6 +10,7 @@
, webkitgtk
, gsettings-desktop-schemas
, snippetexpanderd
, snippetexpanderx
}:
buildGoModule rec {
@ -17,30 +18,31 @@ buildGoModule rec {
pname = "snippetexpandergui";
vendorHash = "sha256-iZfZdT8KlfZMVLQcYmo6EooIdsSGrpO/ojwT9Ft1GQI=";
vendorHash = "sha256-W9NkENdZRzqSAONI9QS2EI5aERK+AaPqwYwITKLwXQE=";
proxyVendor = true;
modRoot = "cmd/snippetexpandergui";
nativeBuildInputs = [
makeWrapper
wails
scdoc
installShellFiles
wrapGAppsHook
];
buildInputs = [
xorg.libX11
gtk3
webkitgtk
gsettings-desktop-schemas
snippetexpanderd
snippetexpanderx
];
ldflags = [
"-s"
"-w"
"-X 'main.version=${src.rev}'"
];
tags = [
@ -54,17 +56,19 @@ buildGoModule rec {
installManPage snippetexpandergui.1
'';
postFixup = ''
wrapProgram $out/bin/snippetexpandergui \
--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}
preFixup = ''
gappsWrapperArgs+=(
# Ensure snippetexpanderd and snippetexpanderx are available to start/stop.
--prefix PATH : ${lib.makeBinPath [ snippetexpanderd snippetexpanderx ]}
)
'';
meta = with lib; {
meta = {
description = "Your little expandable text snippet helper GUI";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ ianmjones ];
platforms = lib.platforms.linux;
mainProgram = "snippetexpandergui";
};
}

View File

@ -42,6 +42,8 @@ stdenv.mkDerivation rec {
snippetexpanderd
];
makeFlags = [ "VERSION=${src.rev}" ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
@ -53,12 +55,12 @@ stdenv.mkDerivation rec {
# There are no tests.
doCheck = false;
meta = with lib; {
meta = {
description = "Your little expandable text snippet helper auto expander daemon";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ ianmjones ];
platforms = lib.platforms.linux;
mainProgram = "snippetexpanderx";
};
}