Unverified Commit def16087 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

slinktool: init at 4.5.0 (#476795)

parents 16c809e9 262fd5ca
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3488,6 +3488,11 @@
    githubId = 30630233;
    name = "Timo Triebensky";
  };
  BIOS9 = {
    name = "NightFish";
    github = "BIOS9";
    githubId = 15035908;
  };
  birdee = {
    name = "birdee";
    github = "BirdeeHub";
+46 −0
Original line number Diff line number Diff line
{
  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/${finalAttrs.src.tag}";
    license = lib.licenses.lgpl3Only;
    maintainers = with lib.maintainers; [ BIOS9 ];
    platforms = lib.platforms.all;
    mainProgram = "slinktool";
  };
})