nur-packages

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

default.nix (657B)


      1 { lib, stdenv, rustPlatform, fetchFromGitLab, IOKit }:
      2 
      3 rustPlatform.buildRustPackage rec {
      4   pname = "modbus-tools";
      5   version = "0.2";
      6 
      7   src = fetchFromGitLab {
      8     owner = "alexs-sh";
      9     repo = "modbus-tools";
     10     rev = "v${version}";
     11     hash = "sha256-PA8EuZa2jKkd/pn6UGGJ6f7jac1bN2sS2fX3qmYVduQ=";
     12   };
     13 
     14   cargoLock.lockFile = ./Cargo.lock;
     15 
     16   postPatch = ''
     17     ln -s ${./Cargo.lock} Cargo.lock
     18   '';
     19 
     20   buildInputs = lib.optional stdenv.isDarwin IOKit;
     21 
     22   meta = with lib; {
     23     description = "Tool(s) for working with Modbus protocol";
     24     inherit (src.meta) homepage;
     25     license = licenses.mit;
     26     maintainers = [ maintainers.sikmir ];
     27   };
     28 }