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

usbip-ssh: init at 0-unstable-2024-10-09 (#374864)

parents c7e30d2e 2773177f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -12392,6 +12392,12 @@
    github = "kaeeraa";
    githubId = 99148867;
  };
  kagehisa = {
    name = "Sven Woelfel";
    email = "woelfel.pub@gmail.com";
    github = "kagehisa";
    githubId = 37015428;
  };
  kaiha = {
    email = "kai.harries@gmail.com";
    github = "KaiHa";
+54 −0
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  fetchFromGitHub,
  perl,
  openssh,
  kmod,
  makeWrapper,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "usbip-ssh";
  version = "0-unstable-2024-10-09";

  src = fetchFromGitHub {
    owner = "turistu";
    repo = "usbip-ssh";
    rev = "1b38f2d7854048bf6129ffe992f3c9caa630e377";
    hash = "sha256-3kGGMlIMTXnBVLgsZijc0yLbyaZZSDf7lr46mg0viWw=";
  };

  nativeBuildInputs = [
    makeWrapper
  ];

  buildInputs = [
    perl
  ];

  installPhase = ''
    runHook preInstall
    install -Dm755 usbip-ssh -t $out/bin
    runHook postInstall
  '';

  postInstall = ''
    wrapProgram $out/bin/usbip-ssh --prefix PATH : ${
      lib.makeBinPath [
        perl
        openssh
        kmod
      ]
    }
  '';

  meta = {
    homepage = "https://github.com/turistu/usbip-ssh";
    description = "Import usb devices from another linux machine with ssh's connection forwarding mechanism";
    license = lib.licenses.gpl3Only;
    maintainers = with lib.maintainers; [ kagehisa ];
    mainProgram = "usbip-ssh";
    platforms = lib.platforms.linux;
  };
})