openopc: new package

"OPC (OLE for Process Control) toolkit designed for use with Python"

This package contains a python module (OpenOPC) and a command line
client (opc). The OpenOPC Gateway Service for Windows is also copied to
$out, for reference.

It only works with python2.7 (not python3.x), so I'm not adding it to
python-packages.nix.

Also add needed dependency, python-pyro3, a distributed object
middleware for Python (IPC/RPC).

http://openopc.sourceforge.net/

+69
+46
pkgs/tools/misc/openopc/default.nix
··· 1 + { stdenv, fetchurl, pythonFull }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "openopc-${version}"; 5 + version = "1.2.0"; 6 + 7 + src = fetchurl { 8 + url = "mirror://sourceforge/project/openopc/openopc/${version}/OpenOPC-${version}.source.tar.bz2"; 9 + sha256 = "0mm77fiipz5zy82l6pr3wk18bfril81milv2rdxr954c4gw5smyd"; 10 + }; 11 + 12 + # There is no setup.py or any other "build system" file in the source archive. 13 + installPhase = '' 14 + mkdir -p "$out/bin" 15 + mkdir -p "$out/share/doc/openopc" 16 + mkdir -p "$out/${pythonFull.python.sitePackages}" 17 + mkdir -p "$out/libexec/opc" 18 + 19 + cp src/OpenOPC.py "$out/${pythonFull.python.sitePackages}" 20 + cp src/opc.py "$out/libexec/opc/" 21 + 22 + cat > "$out/bin/opc" << __EOF__ 23 + #!${stdenv.shell} 24 + export PYTHONPATH="$out/${pythonFull.python.sitePackages}" 25 + exec ${pythonFull}/bin/${pythonFull.python.executable} "$out/libexec/opc/opc.py" "\$@" 26 + __EOF__ 27 + chmod a+x "$out/bin/opc" 28 + 29 + cp -R *.txt doc/* "$out/share/doc/openopc/" 30 + 31 + # Copy these MS Windows tools, for reference. 32 + cp src/OpenOPCService.py src/SystemHealth.py "$out/libexec/opc/" 33 + ''; 34 + 35 + meta = with stdenv.lib; { 36 + description = "OPC (OLE for Process Control) toolkit designed for use with Python"; 37 + homepage = http://openopc.sourceforge.net/; 38 + # """OpenOPC for Python is freely available under the terms of the GNU GPL. 39 + # However, the OpenOPC library module is licensed under the "GPL + linking 40 + # exception" license, which generally means that programs written using the 41 + # OpenOPC library may be licensed under any terms.""" 42 + license = licenses.gpl2; 43 + platforms = platforms.linux; 44 + maintainers = [ maintainers.bjornfor ]; 45 + }; 46 + }
+6
pkgs/top-level/all-packages.nix
··· 1694 1694 1695 1695 openobex = callPackage ../tools/bluetooth/openobex { }; 1696 1696 1697 + openopc = callPackage ../tools/misc/openopc { 1698 + pythonFull = python27Full.override { 1699 + extraLibs = [ python27Packages.pyro3 ]; 1700 + }; 1701 + }; 1702 + 1697 1703 openresolv = callPackage ../tools/networking/openresolv { }; 1698 1704 1699 1705 opensc = callPackage ../tools/security/opensc { };
+17
pkgs/top-level/python-packages.nix
··· 5984 5984 }; 5985 5985 }); 5986 5986 5987 + pyro3 = buildPythonPackage (rec { 5988 + name = "Pyro-3.16"; 5989 + 5990 + src = fetchurl { 5991 + url = "http://pypi.python.org/packages/source/P/Pyro/${name}.tar.gz"; 5992 + md5 = "59d4d3f4a8786776c9d7f9051b8f1a69"; 5993 + }; 5994 + 5995 + meta = with stdenv.lib; { 5996 + description = "Distributed object middleware for Python (IPC/RPC)"; 5997 + homepage = http://pythonhosted.org/Pyro/; 5998 + license = licenses.mit; 5999 + platforms = platforms.unix; 6000 + maintainers = [ maintainers.bjornfor ]; 6001 + }; 6002 + }); 6003 + 5987 6004 pyrss2gen = buildPythonPackage (rec { 5988 6005 name = "PyRSS2Gen-1.0.0"; 5989 6006