nur-packages

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

default.nix (721B)


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