nixpkgs/pkgs/by-name/c-/c-periphery/package.nix
Alexis Hildebrandt 755b915a15 treewide: Remove indefinite article from meta.description
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \
  | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
2024-06-09 23:07:45 +02:00

36 lines
827 B
Nix

{ 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 = "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;
};
})