nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit a44b2870bbf4442214b021378ed9122cb2f5c392
parent 373b0e6f9ae07fc6e5331fa910dfca9494646abe
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sun,  8 Sep 2024 11:16:15 +0400

Add shifu

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/misc/shifu/default.nix | 53+++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -390,6 +390,7 @@ lib.makeScope newScope ( serial-studio-bin = callPackage ./misc/serial-studio/bin.nix { }; serverpp = callPackage ./misc/serverpp { }; shellprof = callPackage ./misc/shellprof { }; + shifu = callPackage ./misc/shifu { }; socketcand = callPackage ./misc/socketcand { }; subprocess = callPackage ./misc/subprocess { }; tcvt = callPackage ./misc/tcvt { }; diff --git a/pkgs/misc/shifu/default.nix b/pkgs/misc/shifu/default.nix @@ -0,0 +1,53 @@ +{ + lib, + stdenv, + buildGoModule, + fetchFromGitHub, + installShellFiles, + libpcap, +}: + +buildGoModule rec { + pname = "shifu"; + version = "0.52.0"; + + src = fetchFromGitHub { + owner = "Edgenesis"; + repo = "shifu"; + rev = "v${version}"; + hash = "sha256-YAw4guowbleFWMtHYuAi03w0/SlHnbD0vqHjgmPbJro="; + }; + + vendorHash = "sha256-WRzWtYnoCMbIXNGq402pjpFcXjbzx+UZeg2T76bsE64="; + + nativeBuildInputs = [ installShellFiles ]; + + buildInputs = [ libpcap ]; + + subPackages = [ + "cmd/deviceshifu/cmdhttp" + "cmd/deviceshifu/cmdmqtt" + "cmd/deviceshifu/cmdopcua" + "cmd/deviceshifu/cmdplc4x" + "cmd/deviceshifu/cmdsocket" + "cmd/httpstub/powershellstub" + "cmd/httpstub/sshstub" + "cmd/shifuctl" + "cmd/telemetryservice" + ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd shifuctl \ + --bash <($out/bin/shifuctl completion bash) \ + --fish <($out/bin/shifuctl completion fish) \ + --zsh <($out/bin/shifuctl completion zsh) + ''; + + meta = { + description = "Kubernetes-native IoT gateway"; + homepage = "https://shifu.dev/"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.sikmir ]; + mainProgram = "shifuctl"; + }; +}