commit 2b44210012c43d03697242cb3d926c8d68b448bb
parent e92a795ee94c0d19c2524ae791a22a74eb8a48d1
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date: Wed, 6 Mar 2024 17:47:15 +0400
Add libsockcanpp
Diffstat:
2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/pkgs/default.nix b/pkgs/default.nix
@@ -88,6 +88,7 @@ lib.makeScope newScope (
libgnunetchat = callPackage ./development/libraries/libgnunetchat { };
libshell = callPackage ./development/libraries/libshell { };
microjson = callPackage ./development/libraries/microjson { };
+ libsockcanpp = callPackage ./development/libraries/libsockcanpp { };
### DEVELOPMENT / PERL MODULES
diff --git a/pkgs/development/libraries/libsockcanpp/default.nix b/pkgs/development/libraries/libsockcanpp/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, fetchFromGitHub, cmake }:
+
+stdenv.mkDerivation (finalAttrs: {
+ pname = "libsockcanpp";
+ version = "0-unstable-2024-02-21";
+
+ src = fetchFromGitHub {
+ owner = "SimonCahill";
+ repo = "libsockcanpp";
+ rev = "621383ebefab3c154c05778315acc7e781924fdb";
+ hash = "sha256-ohxSqM4fjti+02Z6ld3tKX/kzZgWn+spvHpPbq/KBSU=";
+ };
+
+ postPatch = ''
+ substituteInPlace CMakeLists.txt \
+ --replace-fail ''$\{CMAKE_INSTALL_PREFIX\}/ ""
+ '';
+
+ nativeBuildInputs = [ cmake ];
+
+ preInstall = ''
+ mv {,lib}sockcanppConfigVersion.cmake
+ '';
+
+ meta = with lib; {
+ description = "A C++ wrapper around Linux's socketcan featureset";
+ inherit (finalAttrs.src.meta) homepage;
+ license = licenses.asl20;
+ maintainers = [ maintainers.sikmir ];
+ platforms = platforms.linux;
+ skip.ci = stdenv.isDarwin;
+ };
+})