From 2f0431535fc14853fe7c3ed0253ea551ef7b9b31 Mon Sep 17 00:00:00 2001 From: chillcicada <2210227279@qq.com> Date: Sun, 17 May 2026 13:06:53 +0800 Subject: [PATCH] snipt: init at 0.1.0 --- pkgs/by-name/sn/snipt/package.nix | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 pkgs/by-name/sn/snipt/package.nix diff --git a/pkgs/by-name/sn/snipt/package.nix b/pkgs/by-name/sn/snipt/package.nix new file mode 100644 index 000000000000..ce204ff82087 --- /dev/null +++ b/pkgs/by-name/sn/snipt/package.nix @@ -0,0 +1,58 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + libx11, + libxi, + libxtst, + xdotool, + libxkbcommon, + versionCheckHook, + nix-update-script, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "snipt"; + version = "0.1.0"; + __structuredAttrs = true; + + src = fetchFromGitHub { + owner = "snipt"; + repo = "snipt"; + tag = "v${finalAttrs.version}"; + hash = "sha256-UMsoTJtpS4vInviDdCrnZQk2scYHM/5a8l7/HK+o8Tc="; + }; + + cargoHash = "sha256-mtw9mdUDxYhZcncTves0FH6COvRNVaMZOdapy3VEZrk="; + + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ + libx11 + libxi + libxtst + xdotool + libxkbcommon + ]; + + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "Powerful text snippet expansion tool"; + longDescription = '' + Snipt is a powerful text snippet expansion tool that boosts your productivity + by replacing short text shortcuts with longer content. + Just type a prefix (like `:`) followed by your shortcut, + and snipt automatically expands it into your predefined text. + ''; + homepage = "https://github.com/snipt/snipt"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ chillcicada ]; + mainProgram = "snipt"; + platforms = lib.platforms.unix; + }; +})