nur-packages

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

commit 5aefba20ed2248e9556bd6cdbf6657ba79f8a28b
parent a738c8ec17046c5c22b9b1ffd414d6b6ceaad79e
Author: Nikolay Korotkiy <sikmir@disroot.org>
Date:   Sat, 20 Jan 2024 19:44:57 +0400

Add c-periphery

Diffstat:
Mpkgs/default.nix | 1+
Apkgs/development/libraries/c-periphery/default.nix | 30++++++++++++++++++++++++++++++
2 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/pkgs/default.nix b/pkgs/default.nix @@ -83,6 +83,7 @@ lib.makeScope newScope ( ### DEVELOPMENT / LIBRARIES + c-periphery = callPackage ./development/libraries/c-periphery { }; libgnunetchat = callPackage ./development/libraries/libgnunetchat { }; libshell = callPackage ./development/libraries/libshell { }; microjson = callPackage ./development/libraries/microjson { }; diff --git a/pkgs/development/libraries/c-periphery/default.nix b/pkgs/development/libraries/c-periphery/default.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + pname = "c-periphery"; + version = "2.4.2"; + + src = fetchFromGitHub { + owner = "vsergeev"; + repo = "c-periphery"; + rev = "v${version}"; + hash = "sha256-uUSXvMQcntUqD412UWkMif0wLxPhpPdnMb96Pqqh/B4="; + }; + + postPatch = '' + substituteInPlace src/libperiphery.pc.in \ + --replace '=''${prefix}/' '=' \ + --replace '=''${exec_prefix}/' '=' + ''; + + nativeBuildInputs = [ cmake ]; + + meta = with lib; { + description = "A C library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux"; + inherit (src.meta) homepage; + license = licenses.mit; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.linux; + skip.ci = stdenv.isDarwin; + }; +}