From bc2a035553b0c018dc08e1bd7c39d01153372ecb Mon Sep 17 00:00:00 2001 From: BIOS9 <15035908+BIOS9@users.noreply.github.com> Date: Sun, 4 Jan 2026 19:16:29 +1300 Subject: [PATCH] slinktool: init at 4.5.0 --- pkgs/by-name/sl/slinktool/package.nix | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pkgs/by-name/sl/slinktool/package.nix diff --git a/pkgs/by-name/sl/slinktool/package.nix b/pkgs/by-name/sl/slinktool/package.nix new file mode 100644 index 000000000000..b5c3c010bfb5 --- /dev/null +++ b/pkgs/by-name/sl/slinktool/package.nix @@ -0,0 +1,46 @@ +{ + lib, + stdenv, + fetchFromGitHub, + versionCheckHook, + nix-update-script, +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "slinktool"; + version = "4.5.0"; + + src = fetchFromGitHub { + owner = "EarthScope"; + repo = "slinktool"; + tag = "v${finalAttrs.version}"; + hash = "sha256-4UUvjlSqtBTiO200pb4FEFXEvUAmA4OlegrgF4wZII4="; + }; + + # slinktool uses K&R-style function pointers in some places; fails with modern GCC + env.NIX_CFLAGS_COMPILE = "-std=gnu89"; + + installPhase = '' + runHook preInstall + + install -D slinktool $out/bin/slinktool + + runHook postInstall + ''; + + versionCheckProgramArg = "-V"; + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + + passthru.updateScript = nix-update-script { }; + + meta = { + description = "SeedLink client for data stream inspection, data collection and server testing"; + homepage = "https://github.com/EarthScope/slinktool"; + changelog = "https://github.com/EarthScope/slinktool/releases/tag/v${finalAttrs.version}"; + license = lib.licenses.lgpl3Only; + maintainers = with lib.maintainers; [ BIOS9 ]; + platforms = lib.platforms.all; + mainProgram = "slinktool"; + }; +})