snippetexpander: init at 1.0.1

This commit is contained in:
Ian M. Jones 2023-11-24 16:48:16 +00:00
parent a78de4f116
commit e476dfaab3
No known key found for this signature in database
4 changed files with 244 additions and 0 deletions

View File

@ -0,0 +1,47 @@
{ lib
, buildGoModule
, fetchFromSourcehut
, scdoc
, installShellFiles
, snippetexpanderd
}:
buildGoModule rec {
inherit (snippetexpanderd) src version;
pname = "snippetexpander";
vendorHash = "sha256-wSAho59yxcXTu1zQ5x783HT4gtfSM4GdsOEeC1wfHhE=";
proxyVendor = true;
modRoot = "cmd/snippetexpander";
nativeBuildInputs = [
scdoc
installShellFiles
];
buildInputs = [
snippetexpanderd
];
ldflags = [
"-s"
"-w"
];
postInstall = ''
make man
installManPage snippetexpander.1
'';
meta = with lib; {
description = "Your little expandable text snippet helper CLI";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
mainProgram = "snippetexpander";
};
}

View File

@ -0,0 +1,63 @@
{ lib
, stdenv
, buildGoModule
, fetchFromSourcehut
, pkg-config
, makeWrapper
, scdoc
, installShellFiles
, xorg
, gtk3
}:
buildGoModule rec {
pname = "snippetexpanderd";
version = "1.0.1";
src = fetchFromSourcehut {
owner = "~ianmjones";
repo = "snippetexpander";
rev = "v${version}";
hash = "sha256-y3TJ+L3kXYfZFzAD1vmhvP6Yarctu5LHq/74005h8sI=";
};
vendorHash = "sha256-QX8HI8I1ZJI6HJ1sl86OiJ4nxwFAjHH8h1zB9ASJaQs=";
modRoot = "cmd/snippetexpanderd";
nativeBuildInputs = [
pkg-config
makeWrapper
scdoc
installShellFiles
];
buildInputs = [
xorg.libX11
gtk3
];
ldflags = [
"-s"
"-w"
];
postInstall = ''
make man
installManPage snippetexpanderd.1 snippetexpander-placeholders.5
'';
postFixup = ''
wrapProgram $out/bin/snippetexpanderd \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 ]}
'';
meta = with lib; {
description = "Your little expandable text snippet helper daemon";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
mainProgram = "snippetexpanderd";
};
}

View File

@ -0,0 +1,70 @@
{ lib
, buildGoModule
, fetchFromSourcehut
, makeWrapper
, wails
, scdoc
, installShellFiles
, xorg
, gtk3
, webkitgtk
, gsettings-desktop-schemas
, snippetexpanderd
}:
buildGoModule rec {
inherit (snippetexpanderd) src version;
pname = "snippetexpandergui";
vendorHash = "sha256-iZfZdT8KlfZMVLQcYmo6EooIdsSGrpO/ojwT9Ft1GQI=";
proxyVendor = true;
modRoot = "cmd/snippetexpandergui";
nativeBuildInputs = [
makeWrapper
wails
scdoc
installShellFiles
];
buildInputs = [
xorg.libX11
gtk3
webkitgtk
gsettings-desktop-schemas
snippetexpanderd
];
ldflags = [
"-s"
"-w"
];
tags = [
"desktop"
"production"
];
postInstall = ''
mv build/linux/share $out/share
make man
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}
'';
meta = with lib; {
description = "Your little expandable text snippet helper GUI";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
mainProgram = "snippetexpandergui";
};
}

View File

@ -0,0 +1,64 @@
{ lib
, stdenv
, fetchFromSourcehut
, pkg-config
, vala
, wrapGAppsHook
, installShellFiles
, scdoc
, at-spi2-atk
, at-spi2-core
, dbus
, gtk3
, ibus
, libgee
, xorg
, snippetexpanderd
}:
stdenv.mkDerivation rec {
inherit (snippetexpanderd) src version;
pname = "snippetexpanderx";
sourceRoot = "source/cmd/snippetexpanderx";
nativeBuildInputs = [
pkg-config
vala
wrapGAppsHook
installShellFiles
scdoc
];
buildInputs = [
at-spi2-atk
at-spi2-core
dbus
gtk3
ibus
libgee
xorg.libX11
snippetexpanderd
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -m555 snippetexpanderx $out/bin/
installManPage snippetexpanderx.1
runHook postInstall
'';
# There are no tests.
doCheck = false;
meta = with lib; {
description = "Your little expandable text snippet helper auto expander daemon";
homepage = "https://snippetexpander.org";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ianmjones ];
platforms = platforms.linux;
mainProgram = "snippetexpanderx";
};
}