uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
46
pkgs/development/python-modules/python-snap7/default.nix
Normal file
46
pkgs/development/python-modules/python-snap7/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, snap7
|
||||
, fetchFromGitHub
|
||||
, setuptools
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-snap7";
|
||||
version = "1.2";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gijzelaerr";
|
||||
repo = "python-snap7";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-xkkJE3wTqS6spwEmQ+HBY1Szao1VFoqmQ041vnAYuqQ=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
prePatch = ''
|
||||
substituteInPlace snap7/common.py \
|
||||
--replace "lib_location = None" "lib_location = '${snap7}/lib/libsnap7.so'"
|
||||
'';
|
||||
|
||||
# Tests require root privileges to open privilaged ports
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [
|
||||
"snap7"
|
||||
"snap7.util"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python wrapper for the snap7 PLC communication library";
|
||||
homepage = "https://github.com/gijzelaerr/python-snap7";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ freezeboy ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue