nur-packages

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

default.nix (769B)


      1 { lib, stdenv, fetchFromGitHub, cmake }:
      2 
      3 stdenv.mkDerivation rec {
      4   pname = "c-periphery";
      5   version = "2.4.2";
      6 
      7   src = fetchFromGitHub {
      8     owner = "vsergeev";
      9     repo = "c-periphery";
     10     rev = "v${version}";
     11     hash = "sha256-uUSXvMQcntUqD412UWkMif0wLxPhpPdnMb96Pqqh/B4=";
     12   };
     13 
     14   postPatch = ''
     15     substituteInPlace src/libperiphery.pc.in \
     16       --replace '=''${prefix}/' '=' \
     17       --replace '=''${exec_prefix}/' '='
     18   '';
     19 
     20   nativeBuildInputs = [ cmake ];
     21 
     22   meta = with lib; {
     23     description = "A C library for peripheral I/O (GPIO, LED, PWM, SPI, I2C, MMIO, Serial) in Linux";
     24     inherit (src.meta) homepage;
     25     license = licenses.mit;
     26     maintainers = [ maintainers.sikmir ];
     27     platforms = platforms.linux;
     28     skip.ci = stdenv.isDarwin;
     29   };
     30 }