mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
c-periphery: init at 2.4.2
This commit is contained in:
parent
bb121a85e7
commit
eda0e2250e
35
pkgs/by-name/c-/c-periphery/package.nix
Normal file
35
pkgs/by-name/c-/c-periphery/package.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, cmake
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "c-periphery";
|
||||
version = "2.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vsergeev";
|
||||
repo = "c-periphery";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-uUSXvMQcntUqD412UWkMif0wLxPhpPdnMb96Pqqh/B4=";
|
||||
};
|
||||
|
||||
outputs = [ "dev" "lib" "out" ];
|
||||
|
||||
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";
|
||||
homepage = "https://github.com/vsergeev/c-periphery";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user