From d80e223808012642c8a4532c402d5237d37d580c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 4 Sep 2024 22:07:59 +0200 Subject: [PATCH 1/4] libloragw-sx1301: init at 5.0.1r2 --- pkgs/by-name/li/libloragw-sx1301/package.nix | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/li/libloragw-sx1301/package.nix diff --git a/pkgs/by-name/li/libloragw-sx1301/package.nix b/pkgs/by-name/li/libloragw-sx1301/package.nix new file mode 100644 index 000000000000..71b40fe42fdb --- /dev/null +++ b/pkgs/by-name/li/libloragw-sx1301/package.nix @@ -0,0 +1,45 @@ +{ + lib, + stdenv, + fetchFromGitHub, + gitUpdater, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "libloragw-sx1301"; + version = "5.0.1r4"; + + src = fetchFromGitHub { + owner = "brocaar"; + repo = "lora_gateway"; + rev = "refs/tags/v${finalAttrs.version}"; + hash = "sha256-YxnFWJhH5iUR+6zA0Pf7a+VxFwYkw84CeoQmd01efqU="; + }; + + passthru.updateScript = gitUpdater { rev-prefix = "v"; }; + + makeFlags = [ + "-e" + "-C" + "libloragw" + ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{lib,include/libloragw-sx1301} + cp libloragw/libloragw.a $out/lib/libloragw-sx1301.a + cp libloragw/inc/* $out/include/libloragw-sx1301 + + runHook postInstall + ''; + + meta = { + description = "Driver/HAL to build a gateway using a concentrator board based on Semtech SX1301 multi-channel modem and SX1257/SX1255 RF transceivers"; + license = [ + lib.licenses.bsd3 + lib.licenses.mit + ]; + maintainers = [ lib.maintainers.stv0g ]; + platforms = lib.platforms.linux; + }; +}) From 194b5691c67d2b39446896210995d800caa8bd6c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 4 Sep 2024 22:08:24 +0200 Subject: [PATCH 2/4] libloragw-sx1302: init at 2.1.0r7 --- pkgs/by-name/li/libloragw-sx1302/package.nix | 51 ++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 pkgs/by-name/li/libloragw-sx1302/package.nix diff --git a/pkgs/by-name/li/libloragw-sx1302/package.nix b/pkgs/by-name/li/libloragw-sx1302/package.nix new file mode 100644 index 000000000000..44270575629e --- /dev/null +++ b/pkgs/by-name/li/libloragw-sx1302/package.nix @@ -0,0 +1,51 @@ +{ + lib, + stdenv, + fetchFromGitHub, + gitUpdater, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "libloragw-sx1302"; + version = "2.1.0r9"; + + src = fetchFromGitHub { + owner = "brocaar"; + repo = "sx1302_hal"; + rev = "refs/tags/V${finalAttrs.version}"; + hash = "sha256-NYu54UpMn2OZfGihBH9Kbp2kUcEy0epH1Tt5I3r6jTs="; + }; + + passthru.updateScript = gitUpdater { rev-prefix = "V"; }; + + makeFlags = [ + "-e" + "-C" + "libloragw" + ]; + + preBuild = '' + make -C libtools + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{lib,include/libloragw-sx1302} + cp libloragw/libloragw.a $out/lib/libloragw-sx1302.a + cp libloragw/inc/* $out/include/libloragw-sx1302 + cp libtools/*.a $out/lib/ + cp libtools/inc/* $out/include/ + + runHook postInstall + ''; + + meta = { + description = "SX1302 Hardware Abstraction Layer and Tools (packet forwarder...)"; + license = [ + lib.licenses.bsd3 + lib.licenses.mit + ]; + maintainers = [ lib.maintainers.stv0g ]; + platforms = lib.platforms.linux; + }; +}) From 6bd22a9174b1bad5ca4c0cc17fd2caf1ef0be34c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 4 Sep 2024 22:07:23 +0200 Subject: [PATCH 3/4] libloragw-2g4: init at 1.1.0 --- pkgs/by-name/li/libloragw-2g4/package.nix | 49 +++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 pkgs/by-name/li/libloragw-2g4/package.nix diff --git a/pkgs/by-name/li/libloragw-2g4/package.nix b/pkgs/by-name/li/libloragw-2g4/package.nix new file mode 100644 index 000000000000..820b6185ebb0 --- /dev/null +++ b/pkgs/by-name/li/libloragw-2g4/package.nix @@ -0,0 +1,49 @@ +{ + lib, + stdenv, + fetchFromGitHub, + gitUpdater, +}: +stdenv.mkDerivation (finalAttrs: { + pname = "libloragw-2g4"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "Lora-net"; + repo = "gateway_2g4_hal"; + rev = "refs/tags/V${finalAttrs.version}"; + hash = "sha256-EvsYCkZ55nEdZXhxp7AjCw954+uUIoi2Fc3xhaIjZys="; + }; + + passthru.updateScript = gitUpdater { rev-prefix = "V"; }; + + makeFlags = [ + "-e" + "-C" + "libloragw" + ]; + + preBuild = '' + make -C libtools + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/{lib,include/libloragw-2g4} + cp libloragw/libloragw.a $out/lib/libloragw-2g4.a + cp libloragw/inc/* $out/include/libloragw-2g4 + + runHook postInstall + ''; + + meta = { + description = "LoRa 2.4Ghz Gateway - Linux host Hardware Abstraction Layer, and tools (Packet Forwarder...)"; + license = [ + lib.licenses.bsd3 + lib.licenses.mit + ]; + maintainers = [ lib.maintainers.stv0g ]; + platforms = lib.platforms.linux; + }; +}) From 430bc942dae912e1fd99b0e10a9e697fadc588e1 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 22 Apr 2024 08:01:42 +0200 Subject: [PATCH 4/4] chirpstack-concentratord: init at 4.4.5 --- .../ch/chirpstack-concentratord/package.nix | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 pkgs/by-name/ch/chirpstack-concentratord/package.nix diff --git a/pkgs/by-name/ch/chirpstack-concentratord/package.nix b/pkgs/by-name/ch/chirpstack-concentratord/package.nix new file mode 100644 index 000000000000..33ed88b0e13f --- /dev/null +++ b/pkgs/by-name/ch/chirpstack-concentratord/package.nix @@ -0,0 +1,45 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + nix-update-script, + protobuf, + libloragw-2g4, + libloragw-sx1301, + libloragw-sx1302, +}: +rustPlatform.buildRustPackage rec { + pname = "chirpstack-concentratord"; + version = "4.4.2"; + + src = fetchFromGitHub { + owner = "chirpstack"; + repo = "chirpstack-concentratord"; + rev = "v${version}"; + hash = "sha256-UbUtNJuz8zfhHzyOiT/mRNtNRmdoNnuszrVSbLoVGK8="; + }; + + cargoHash = "sha256-JXIyrbBRGJR9mjvawU46mBfGYxZPpYl9aB9k3WBA/co="; + + buildInputs = [ + libloragw-2g4 + libloragw-sx1301 + libloragw-sx1302 + ]; + + nativeBuildInputs = [ + protobuf + rustPlatform.bindgenHook + ]; + + updateScript = nix-update-script { }; + + meta = { + description = "Concentrator HAL daemon for LoRa gateways"; + homepage = "https://www.chirpstack.io/"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.stv0g ]; + platforms = lib.platforms.linux; + mainProgram = "chirpstack-concentratord"; + }; +}