Merge pull request #300050 from ianmjones/snippetexpander-1.0.2

snippetexpander: 1.0.1 -> 1.0.2

authored by Weijia Wang and committed by GitHub 92323443 74f7e19d

+57 -34
+16 -5
pkgs/by-name/sn/snippetexpander/package.nix
··· 1 1 { lib 2 2 , buildGoModule 3 3 , fetchFromSourcehut 4 + , makeWrapper 4 5 , scdoc 5 6 , installShellFiles 6 7 , snippetexpanderd 8 + , snippetexpanderx 7 9 }: 8 10 9 11 buildGoModule rec { ··· 11 13 12 14 pname = "snippetexpander"; 13 15 14 - vendorHash = "sha256-wSAho59yxcXTu1zQ5x783HT4gtfSM4GdsOEeC1wfHhE="; 16 + vendorHash = "sha256-W9NkENdZRzqSAONI9QS2EI5aERK+AaPqwYwITKLwXQE="; 15 17 16 18 proxyVendor = true; 17 19 18 20 modRoot = "cmd/snippetexpander"; 19 21 20 22 nativeBuildInputs = [ 23 + makeWrapper 21 24 scdoc 22 25 installShellFiles 23 26 ]; 24 27 25 28 buildInputs = [ 26 29 snippetexpanderd 30 + snippetexpanderx 27 31 ]; 28 32 29 33 ldflags = [ 30 34 "-s" 31 35 "-w" 36 + "-X 'main.version=${src.rev}'" 32 37 ]; 33 38 34 39 postInstall = '' ··· 36 41 installManPage snippetexpander.1 37 42 ''; 38 43 39 - meta = with lib; { 44 + postFixup = '' 45 + # Ensure snippetexpanderd and snippetexpanderx are available to start/stop. 46 + wrapProgram $out/bin/snippetexpander \ 47 + --prefix PATH : ${lib.makeBinPath [ snippetexpanderd snippetexpanderx ]} 48 + ''; 49 + 50 + meta = { 40 51 description = "Your little expandable text snippet helper CLI"; 41 52 homepage = "https://snippetexpander.org"; 42 - license = licenses.gpl2Plus; 43 - maintainers = with maintainers; [ ianmjones ]; 44 - platforms = platforms.linux; 53 + license = lib.licenses.gpl2Plus; 54 + maintainers = with lib.maintainers; [ ianmjones ]; 55 + platforms = lib.platforms.linux; 45 56 mainProgram = "snippetexpander"; 46 57 }; 47 58 }
+20 -14
pkgs/by-name/sn/snippetexpanderd/package.nix
··· 2 2 , stdenv 3 3 , buildGoModule 4 4 , fetchFromSourcehut 5 - , pkg-config 6 5 , makeWrapper 7 6 , scdoc 8 7 , installShellFiles 9 - , xorg 10 - , gtk3 8 + , xclip 9 + , wl-clipboard 10 + , xdotool 11 + , wtype 11 12 }: 12 13 13 14 buildGoModule rec { 14 15 pname = "snippetexpanderd"; 15 - version = "1.0.1"; 16 + version = "1.0.2"; 16 17 17 18 src = fetchFromSourcehut { 18 19 owner = "~ianmjones"; 19 20 repo = "snippetexpander"; 20 21 rev = "v${version}"; 21 - hash = "sha256-y3TJ+L3kXYfZFzAD1vmhvP6Yarctu5LHq/74005h8sI="; 22 + hash = "sha256-iEoBri+NuFfLkARUBA+D/Fe9xk6PPV62N/YRqPv9C/A="; 22 23 }; 23 24 24 - vendorHash = "sha256-QX8HI8I1ZJI6HJ1sl86OiJ4nxwFAjHH8h1zB9ASJaQs="; 25 + vendorHash = "sha256-W9NkENdZRzqSAONI9QS2EI5aERK+AaPqwYwITKLwXQE="; 26 + 27 + proxyVendor = true; 25 28 26 29 modRoot = "cmd/snippetexpanderd"; 27 30 28 31 nativeBuildInputs = [ 29 - pkg-config 30 32 makeWrapper 31 33 scdoc 32 34 installShellFiles 33 35 ]; 34 36 35 37 buildInputs = [ 36 - xorg.libX11 37 - gtk3 38 + xclip 39 + wl-clipboard 40 + xdotool 41 + wtype 38 42 ]; 39 43 40 44 ldflags = [ 41 45 "-s" 42 46 "-w" 47 + "-X 'main.version=${src.rev}'" 43 48 ]; 44 49 45 50 postInstall = '' ··· 48 53 ''; 49 54 50 55 postFixup = '' 56 + # Ensure xclip/wcopy and xdotool/wtype are available for copy and paste duties. 51 57 wrapProgram $out/bin/snippetexpanderd \ 52 - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ xorg.libX11 ]} 58 + --prefix PATH : ${lib.makeBinPath [ xclip wl-clipboard xdotool wtype ]} 53 59 ''; 54 60 55 - meta = with lib; { 61 + meta = { 56 62 description = "Your little expandable text snippet helper daemon"; 57 63 homepage = "https://snippetexpander.org"; 58 - license = licenses.gpl2Plus; 59 - maintainers = with maintainers; [ ianmjones ]; 60 - platforms = platforms.linux; 64 + license = lib.licenses.gpl2Plus; 65 + maintainers = with lib.maintainers; [ ianmjones ]; 66 + platforms = lib.platforms.linux; 61 67 mainProgram = "snippetexpanderd"; 62 68 }; 63 69 }
+15 -11
pkgs/by-name/sn/snippetexpandergui/package.nix
··· 1 1 { lib 2 2 , buildGoModule 3 3 , fetchFromSourcehut 4 - , makeWrapper 4 + , wrapGAppsHook 5 5 , wails 6 6 , scdoc 7 7 , installShellFiles ··· 10 10 , webkitgtk 11 11 , gsettings-desktop-schemas 12 12 , snippetexpanderd 13 + , snippetexpanderx 13 14 }: 14 15 15 16 buildGoModule rec { ··· 17 18 18 19 pname = "snippetexpandergui"; 19 20 20 - vendorHash = "sha256-iZfZdT8KlfZMVLQcYmo6EooIdsSGrpO/ojwT9Ft1GQI="; 21 + vendorHash = "sha256-W9NkENdZRzqSAONI9QS2EI5aERK+AaPqwYwITKLwXQE="; 21 22 22 23 proxyVendor = true; 23 24 24 25 modRoot = "cmd/snippetexpandergui"; 25 26 26 27 nativeBuildInputs = [ 27 - makeWrapper 28 28 wails 29 29 scdoc 30 30 installShellFiles 31 + wrapGAppsHook 31 32 ]; 32 33 33 34 buildInputs = [ 34 35 xorg.libX11 35 36 gtk3 36 37 webkitgtk 37 - gsettings-desktop-schemas 38 38 snippetexpanderd 39 + snippetexpanderx 39 40 ]; 40 41 41 42 ldflags = [ 42 43 "-s" 43 44 "-w" 45 + "-X 'main.version=${src.rev}'" 44 46 ]; 45 47 46 48 tags = [ ··· 54 56 installManPage snippetexpandergui.1 55 57 ''; 56 58 57 - postFixup = '' 58 - wrapProgram $out/bin/snippetexpandergui \ 59 - --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name} 59 + preFixup = '' 60 + gappsWrapperArgs+=( 61 + # Ensure snippetexpanderd and snippetexpanderx are available to start/stop. 62 + --prefix PATH : ${lib.makeBinPath [ snippetexpanderd snippetexpanderx ]} 63 + ) 60 64 ''; 61 65 62 - meta = with lib; { 66 + meta = { 63 67 description = "Your little expandable text snippet helper GUI"; 64 68 homepage = "https://snippetexpander.org"; 65 - license = licenses.gpl2Plus; 66 - maintainers = with maintainers; [ ianmjones ]; 67 - platforms = platforms.linux; 69 + license = lib.licenses.gpl2Plus; 70 + maintainers = with lib.maintainers; [ ianmjones ]; 71 + platforms = lib.platforms.linux; 68 72 mainProgram = "snippetexpandergui"; 69 73 }; 70 74 }
+6 -4
pkgs/by-name/sn/snippetexpanderx/package.nix
··· 42 42 snippetexpanderd 43 43 ]; 44 44 45 + makeFlags = [ "VERSION=${src.rev}" ]; 46 + 45 47 installPhase = '' 46 48 runHook preInstall 47 49 mkdir -p $out/bin ··· 53 55 # There are no tests. 54 56 doCheck = false; 55 57 56 - meta = with lib; { 58 + meta = { 57 59 description = "Your little expandable text snippet helper auto expander daemon"; 58 60 homepage = "https://snippetexpander.org"; 59 - license = licenses.gpl2Plus; 60 - maintainers = with maintainers; [ ianmjones ]; 61 - platforms = platforms.linux; 61 + license = lib.licenses.gpl2Plus; 62 + maintainers = with lib.maintainers; [ ianmjones ]; 63 + platforms = lib.platforms.linux; 62 64 mainProgram = "snippetexpanderx"; 63 65 }; 64 66 }