Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
41 lines
849 B
Nix
41 lines
849 B
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
cmake,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "c-periphery";
|
|
version = "2.4.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "vsergeev";
|
|
repo = "c-periphery";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-azqGw7KW6/UrQ4eUPkeH8d6l6sSbotNMAAbn5pNMOB8=";
|
|
};
|
|
|
|
outputs = [
|
|
"dev"
|
|
"lib"
|
|
"out"
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/libperiphery.pc.in \
|
|
--replace '=''${prefix}/' '=' \
|
|
--replace '=''${exec_prefix}/' '='
|
|
'';
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
meta = {
|
|
description = "C library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux";
|
|
homepage = "https://github.com/vsergeev/c-periphery";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ sikmir ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|