nur-packages

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

default.nix (1007B)


      1 {
      2   lib,
      3   python3Packages,
      4   fetchFromGitHub,
      5   modbus_tk,
      6 }:
      7 
      8 python3Packages.buildPythonApplication {
      9   pname = "modbus_sim_cli";
     10   version = "0-unstable-2019-02-27";
     11 
     12   src = fetchFromGitHub {
     13     owner = "dhoomakethu";
     14     repo = "modbus_sim_cli";
     15     rev = "080d773b7009fa9aa727097d2b2f8049b3f35290";
     16     hash = "sha256-ijW462q+xhw2I7ZXBhALq3xcSIUi/uEWrva+TCxkKzA=";
     17   };
     18 
     19   postPatch = ''
     20     sed -i '/trollius/d' requirements
     21     substituteInPlace modbus_sim/utils/config_parser.py \
     22       --replace-fail "yaml.load(conffile.read())" "yaml.safe_load(conffile)"
     23   '';
     24 
     25   dependencies = with python3Packages; [
     26     coloredlogs
     27     modbus_tk
     28     pyyaml
     29   ];
     30 
     31   preConfigure = ''
     32     find modbus_sim -name "*.py" | xargs 2to3 -w
     33   '';
     34 
     35   preBuild = ''
     36     export HOME=$TMPDIR
     37   '';
     38 
     39   meta = {
     40     description = "Modbus simulation command line version";
     41     homepage = "https://github.com/dhoomakethu/modbus_sim_cli";
     42     license = lib.licenses.mit;
     43     maintainers = [ lib.maintainers.sikmir ];
     44   };
     45 }