Merge master into staging-next

This commit is contained in:
Frederik Rietdijk
2019-07-19 16:33:38 +02:00
127 changed files with 4167 additions and 1404 deletions

View File

@@ -33,11 +33,11 @@
buildPythonPackage rec {
pname = "azure-cli-core";
version = "2.0.66";
version = "2.0.69";
src = fetchPypi {
inherit pname version;
sha256 = "0fp6b2x1l9bg07pca7asm80rnjlc4kkm061s3nrb55yj6awsnim5";
sha256 = "797c4fab2285aa2ac316daf692c1e8f6b14186c059805e8a57332b4d83d7bb23";
};
propagatedBuildInputs = [

View File

@@ -0,0 +1,26 @@
{ lib, buildPythonPackage, fetchPypi, isPy3k, pyusb, pyserial }:
buildPythonPackage rec {
pname = "facedancer";
version = "2019.3.2";
src = fetchPypi {
inherit pname version;
sha256 = "1zhwnlfksblgp54njd9gjsrr5ibg12cx1x9xxcqkcdfhn3m2kmm0";
};
disabled = !isPy3k;
propagatedBuildInputs = [ pyusb pyserial ];
preBuild = ''
echo "$version" > VERSION
'';
meta = with lib; {
description = "library for emulating usb devices";
homepage = https://greatscottgadgets.com/greatfet/;
license = licenses.bsd3;
maintainers = with maintainers; [ mog ];
};
}

View File

@@ -1,28 +1,33 @@
{ buildPythonPackage, fetchFromGitHub, isPyPy, lib
, psutil, setuptools, bottle, batinfo, pysnmp
, hddtemp
, hddtemp, future
# Optional dependencies:
, netifaces # IP module
# Tests:
, unittest2
}:
buildPythonPackage rec {
name = "glances-${version}";
version = "3.1.0";
version = "3.1.1";
disabled = isPyPy;
src = fetchFromGitHub {
owner = "nicolargo";
repo = "glances";
rev = "v${version}";
sha256 = "0zjpp017i8b8bijdaj85rya7rmdqh4g8vkb42q14q2sw6agxz3zi";
sha256 = "1x9gw7hzw3p8zki82wdf359yxj0ylfw2096a4y621kj0p4xqsr4q";
};
# Some tests fail in the sandbox (they e.g. require access to /sys/class/power_supply):
patches = lib.optional doCheck ./skip-failing-tests.patch;
# Requires access to /sys/class/power_supply
doCheck = true;
checkInputs = [ unittest2 ];
buildInputs = [ unittest2 ];
propagatedBuildInputs = [ psutil setuptools bottle batinfo pysnmp hddtemp ];
propagatedBuildInputs = [ psutil setuptools bottle batinfo pysnmp hddtemp future
netifaces
];
preConfigure = ''
sed -i 's/data_files\.append((conf_path/data_files.append(("etc\/glances"/' setup.py;

View File

@@ -50,3 +50,11 @@ diff --git a/unitest.py b/unitest.py
def test_006_swap(self):
"""Check MEMSWAP plugin."""
stats_to_check = ['used', 'free', 'total']
@@ -191,6 +196,7 @@ class TestGlances(unittest.TestCase):
self.assertTrue(type(stats_grab) is list, msg='Folders stats is not a list')
print('INFO: Folders stats: %s' % stats_grab)
+ @unittest.skip("Fails on NixOS (TODO)")
def test_012_ip(self):
"""Check IP plugin."""
print('INFO: [TEST_012] Check IP stats')

View File

@@ -0,0 +1,34 @@
{ lib, fetchFromGitHub, buildPythonPackage, isPy3k, future, pyusb, ipython, pygreat }:
buildPythonPackage rec {
pname = "GreatFET";
version = "2019.5.1.dev0";
src = fetchFromGitHub {
owner = "greatscottgadgets";
repo = "greatfet";
rev = "a927f21d59ccface00635146103a807c1d2b0ad8";
sha256 = "054vkx4xkbhxhh5grjbs9kw3pjkv1zapp91ysrqr0c8mg1pc7zxv";
};
disabled = !isPy3k;
propagatedBuildInputs = [ future pyusb ipython pygreat ];
doCheck = false;
preBuild = ''
cd host
echo "$version" > ../VERSION
'';
meta = {
description = "Hardware hacking with the greatfet";
homepage = https://greatscottgadgets.com/greatfet;
license = lib.licenses.bsd3;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ mog ];
};
}

View File

@@ -0,0 +1,57 @@
{ lib
, buildPythonPackage
, fetchPypi
, multipledispatch
, numpy
, pandas
, pytz
, regex
, toolz
, isPy27
, pytest
, sqlalchemy
, requests
, tables
, pyarrow
, graphviz
}:
buildPythonPackage rec {
pname = "ibis-framework";
version = "1.2.0";
disabled = isPy27;
src = fetchPypi {
inherit pname version;
sha256 = "3a0b79dae6924be0a79669c881a9a1d4817997ad2f81a0f3b1cd03d70aebb071";
};
propagatedBuildInputs = [
multipledispatch
numpy
pandas
pytz
regex
toolz
sqlalchemy
requests
graphviz
tables
pyarrow
];
checkInputs = [
pytest
];
checkPhase = ''
pytest ibis
'';
meta = with lib; {
description = "Productivity-centric Python Big Data Framework";
homepage = https://github.com/ibis-project/ibis;
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -0,0 +1,30 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, python
, isPy27
}:
buildPythonPackage rec {
pname = "ibis";
version = "1.6.0";
disabled = isPy27;
src = fetchFromGitHub {
owner = "dmulholl";
repo = pname;
rev = version;
sha256 = "0xqhk397gzanvj2znwcgy4n5l1lc9r310smxkhjbm1xwvawpixx0";
};
checkPhase = ''
${python.interpreter} test_ibis.py
'';
meta = with lib; {
description = "A lightweight template engine";
homepage = https://github.com/dmulholland/ibis;
license = licenses.publicDomain;
maintainers = [ maintainers.costrouc ];
};
}

View File

@@ -37,6 +37,10 @@ buildPythonPackage rec {
sed -i -e "s|'ifconfig'|'${nettools}/bin/ifconfig'|" src/wormhole/ipaddrs.py
'';
postInstall = ''
install -Dm644 docs/wormhole.1 $out/share/man/man1/wormhole.1
'';
preCheck = ''
export PATH=$out/bin:$PATH
export LANG="en_US.UTF-8"

View File

@@ -0,0 +1,31 @@
{ stdenv, buildPythonPackage, isPy3k, fetchFromGitHub, future, pyusb }:
buildPythonPackage rec {
pname = "pygreat";
version = "2019.5.1.dev0";
src = fetchFromGitHub {
owner = "greatscottgadgets";
repo = "libgreat";
rev = "14c00b7c8f036f4d467e4b1a324ffa3566b126fa";
sha256 = "1h0z83k1k4z8j36z936h61l8j3cjr3wsxr86k91v5c5h93g9dkqh";
};
propagatedBuildInputs = [ future pyusb ];
disabled = !isPy3k;
preBuild = ''
cd host
substituteInPlace setup.py --replace "'backports.functools_lru_cache'" ""
substituteInPlace pygreat/comms.py --replace "from backports.functools_lru_cache import lru_cache as memoize_with_lru_cache" "from functools import lru_cache as memoize_with_lru_cache"
echo "$version" > ../VERSION
'';
meta = with stdenv.lib; {
description = "Python library for talking with libGreat devices";
homepage = https://greatscottgadgets.com/greatfet/;
license = with licenses; [ bsd3 ];
};
}

View File

@@ -1,8 +1,8 @@
{ stdenv, buildPythonPackage, fetchPypi, glibcLocales, mock, pytest, botocore,
{ stdenv, buildPythonPackage, fetchPypi, fetchpatch, glibcLocales, mock, pytest, botocore,
testfixtures, pillow, six, twisted, w3lib, lxml, queuelib, pyopenssl,
service-identity, parsel, pydispatcher, cssselect, lib }:
buildPythonPackage rec {
version = "1.6.0";
version = "1.7.1";
pname = "Scrapy";
checkInputs = [ glibcLocales mock pytest botocore testfixtures pillow ];
@@ -16,6 +16,12 @@ buildPythonPackage rec {
# root and readonly. As a consequence scrapy can't edit the
# project templates.
./permissions-fix.patch
# Fix configparser import for python2. See: https://github.com/scrapy/scrapy/pull/3887
(fetchpatch {
url = "https://github.com/scrapy/scrapy/commit/21345dc9ec60dcc1cd2e5c0eace5788aa502ce23.patch";
sha256 = "09834rcjyggvyj6zignvfga2xbqkknygly5p4a96k2mvz0xn3v6z";
})
];
LC_ALL="en_US.UTF-8";
@@ -25,12 +31,13 @@ buildPythonPackage rec {
# Ignore test_retry_dns_error because tries to resolve an invalid dns and weirdly fails with "Reactor was unclean"
# Ignore xml encoding test on darwin because lxml can't find encodings https://bugs.launchpad.net/lxml/+bug/707396
checkPhase = ''
pytest -p no:doctest --ignore=tests/test_linkextractors_deprecated.py --ignore=tests/test_proxy_connect.py --deselect tests/test_crawl.py::CrawlTestCase::test_retry_dns_error ${lib.optionalString stdenv.isDarwin "--deselect tests/test_utils_iterators.py::LxmlXmliterTestCase::test_xmliter_encoding"}
substituteInPlace pytest.ini --replace "addopts = --doctest-modules" "addopts ="
pytest --ignore=tests/test_linkextractors_deprecated.py --ignore=tests/test_proxy_connect.py --deselect tests/test_crawl.py::CrawlTestCase::test_retry_dns_error ${lib.optionalString stdenv.isDarwin "--deselect tests/test_utils_iterators.py::LxmlXmliterTestCase::test_xmliter_encoding"}
'';
src = fetchPypi {
inherit pname version;
sha256 = "558dfd10ac53cb324ecd7eefd3eac412161c7507c082b01b0bcd2c6e2e9f0766";
sha256 = "da8987d199092c3bb33d4d1d021507cd933aa67f5177e2d36f31343e8a6bd7f1";
};
postInstall = ''