commit 534a92dcb4a83ecbf063127845d68b12a1e601f6
parent d6b114ff010abfe2e01b1fe47b7672fe2ae717b3
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Sun, 14 Jul 2024 01:45:54 +0400
Add isotp-c
Diffstat:
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -82,6 +82,7 @@ lib.makeScope newScope (
### DEVELOPMENT / LIBRARIES
iso15765-canbus = callPackage ./development/libraries/iso15765-canbus { };
+ isotp-c = callPackage ./development/libraries/isotp-c { };
libgnunetchat = callPackage ./development/libraries/libgnunetchat { };
libshell = callPackage ./development/libraries/libshell { };
microjson = callPackage ./development/libraries/microjson { };
diff --git a/pkgs/development/libraries/isotp-c/default.nix b/pkgs/development/libraries/isotp-c/default.nix
@@ -0,0 +1,34 @@
+{
+ lib,
+ stdenv,
+ fetchFromGitHub,
+ cmake,
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+ pname = "isotp-c";
+ version = "1.1.2";
+
+ src = fetchFromGitHub {
+ owner = "SimonCahill";
+ repo = "isotp-c";
+ rev = "v${finalAttrs.version}";
+ hash = "sha256-bfZXPQQjNIH2wa16RB4/8u9roocEIJhFKQaYMfY7Y4c=";
+ };
+
+ nativeBuildInputs = [ cmake ];
+
+ installPhase = ''
+ install -Dm644 $src/*.h -t $out/include
+ install -Dm644 libisotp.so -t $out/lib
+ '';
+
+ meta = {
+ description = "An implementation of the ISO-TP (ISO15765-2) CAN protocol in C";
+ homepage = "https://github.com/SimonCahill/isotp-c";
+ license = lib.licenses.mit;
+ maintainers = [ lib.maintainers.sikmir ];
+ platforms = lib.platforms.linux;
+ skip.ci = stdenv.isDarwin;
+ };
+})