From 8dd0b5b818fb5e2f03bd942f7a62fbd84e198ee5 Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sun, 24 Oct 2021 17:52:08 +0200 Subject: [PATCH] netstick: init at unstable-2021-04-06 --- default.nix | 2 ++ flake.nix | 1 + netstick/default.nix | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 netstick/default.nix diff --git a/default.nix b/default.nix index 94cf0b4..be01d84 100644 --- a/default.nix +++ b/default.nix @@ -35,6 +35,8 @@ in pitchcontrol = callPackage ./mpv-scripts/pitchcontrol { }; }; + netstick = callPackage ./netstick { }; + nsz = callPythonPackage ./nsz { }; oha = callPackage ./oha { }; diff --git a/flake.nix b/flake.nix index d37b16b..fe9f658 100644 --- a/flake.nix +++ b/flake.nix @@ -54,6 +54,7 @@ gust_tools hcloud_exporter httpdirfs + netstick nsz oha playgsf diff --git a/netstick/default.nix b/netstick/default.nix new file mode 100644 index 0000000..a433535 --- /dev/null +++ b/netstick/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + pname = "netstick"; + version = "unstable-2021-04-06"; + + src = fetchFromGitHub { + owner = "moslevin"; + repo = pname; + rev = "274d510f6b058f1eeec13c3c586a891e8c4b75a4"; + sha256 = "sha256-+sI2jnkksrnoOzX621mLpLi19b3mmz3H63AIJSzuXOI="; + }; + + nativeBuildInputs = [ cmake ]; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace "-Werror" "-Werror -Wno-stringop-truncation" + ''; + + installPhase = '' + runHook preInstall + + install -D netstick $out/bin/netstick + install -D netstickd $out/bin/netstickd + + runHook postInstall + ''; + + meta = with lib; { + description = "Realtime Client/Server app allowing joystick (and other HID) data to be transferred over a local network"; + homepage = "https://github.com/moslevin/netstick"; + license = licenses.bsd3; + maintainers = with maintainers; [ sbruder ]; + platforms = platforms.linux; + }; +}