diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 7d40d3b5548e..55643facea03 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -278,7 +278,7 @@ let format' = format; in let additionalSpace=$(( $(numfmt --from=iec '${additionalSpace}') + reservedSpace )) # Compute required space in filesystem blocks - diskUsage=$(find . ! -type d -exec 'du' '--apparent-size' '--block-size' "${blockSize}" '{}' ';' | cut -f1 | sum_lines) + diskUsage=$(find . ! -type d -print0 | du --files0-from=- --apparent-size --block-size "${blockSize}" | cut -f1 | sum_lines) # Each inode takes space! numInodes=$(find . | wc -l) # Convert to bytes, inodes take two blocks each! diff --git a/pkgs/development/python-modules/dataclasses-json/default.nix b/pkgs/development/python-modules/dataclasses-json/default.nix index 943339448b41..f97217cd29ea 100644 --- a/pkgs/development/python-modules/dataclasses-json/default.nix +++ b/pkgs/development/python-modules/dataclasses-json/default.nix @@ -1,6 +1,6 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , stringcase , typing-inspect , marshmallow-enum @@ -13,9 +13,11 @@ buildPythonPackage rec { pname = "dataclasses-json"; version = "0.5.4"; - src = fetchPypi { - inherit pname version; - sha256 = "6c3976816fd3cdd8db3be2b516b64fc083acd46ac22c680d3dc24cb1d6ae3367"; + src = fetchFromGitHub { + owner = "lidatong"; + repo = pname; + rev = "v${version}"; + sha256 = "193xklf1xrsin7fr24yqx5ckr4m5s9v1bdyr00qr51j74hiy8qsv"; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/krakenex/default.nix b/pkgs/development/python-modules/krakenex/default.nix new file mode 100644 index 000000000000..bf907eb847de --- /dev/null +++ b/pkgs/development/python-modules/krakenex/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, requests +}: + +buildPythonPackage rec { + pname = "krakenex"; + version = "2.1.0"; + + src = fetchFromGitHub { + owner = "veox"; + repo = "python3-krakenex"; + rev = "v${version}"; + sha256 = "0j8qmpk6lm57h80i5njhgvm1qnxllm18dlqxfd4kyxdb93si4z2p"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # no tests implemented + doCheck = false; + + pythonImportsCheck = [ "krakenex" ]; + + meta = with lib; { + description = "Kraken.com cryptocurrency exchange API"; + homepage = "https://github.com/veox/python3-krakenex"; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/pykrakenapi/default.nix b/pkgs/development/python-modules/pykrakenapi/default.nix new file mode 100644 index 000000000000..e3620e7de6ad --- /dev/null +++ b/pkgs/development/python-modules/pykrakenapi/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, krakenex +, pandas +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pykrakenapi"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "dominiktraxl"; + repo = "pykrakenapi"; + rev = "v${version}"; + sha256 = "0byqa4qk6a8ww1y822izpcfscv4frcfjysw6lx1pqyqjr23bfnbh"; + }; + + propagatedBuildInputs = [ + krakenex + pandas + ]; + + # tests require network connection + doCheck = false; + + pythonImportsCheck = [ "pykrakenapi" ]; + + meta = with lib; { + description = "Python implementation of the Kraken API"; + homepage = "https://github.com/dominiktraxl/pykrakenapi"; + license = licenses.lgpl3Plus; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/pysiaalarm/default.nix b/pkgs/development/python-modules/pysiaalarm/default.nix new file mode 100644 index 000000000000..206d24a40dc5 --- /dev/null +++ b/pkgs/development/python-modules/pysiaalarm/default.nix @@ -0,0 +1,54 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, dataclasses-json +, pycryptodome +, setuptools +, pytest-asyncio +, pytest-cases +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pysiaalarm"; + version = "3.0.0"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + inherit pname version; + sha256 = "b1c3a3d48d399bc91014167f59b23af601044d182db9267c23a9cf3559922122"; + }; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "==" ">=" + substituteInPlace pytest.ini \ + --replace "--cov pysiaalarm --cov-report term-missing" "" + ''; + + propagatedBuildInputs = [ + dataclasses-json + pycryptodome + setuptools + ]; + + checkInputs = [ + pytest-asyncio + pytest-cases + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pysiaalarm" + "pysiaalarm.aio" + ]; + + meta = with lib; { + description = "Python package for creating a client that talks with SIA-based alarm systems"; + homepage = "https://github.com/eavanvalkenburg/pysiaalarm"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/web/twitter-bootstrap/default.nix b/pkgs/development/web/twitter-bootstrap/default.nix index 65625ca7d21f..8e3fd36b73fa 100644 --- a/pkgs/development/web/twitter-bootstrap/default.nix +++ b/pkgs/development/web/twitter-bootstrap/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "bootstrap"; - version = "5.0.1"; + version = "5.0.2"; src = fetchurl { url = "https://github.com/twbs/bootstrap/releases/download/v${version}/${pname}-${version}-dist.zip"; - sha256 = "sha256-eep9s1YxTHeDDh+WhDMENho/N3AfJHVitis22bIGa6w="; + sha256 = "sha256-ZvvBNDF9sjcO4JnLPRkzC1B1YG3fcMyjM9qwFlAg9sE="; }; nativeBuildInputs = [ unzip ]; diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index c17cb8d1714d..d528473e2592 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -432,7 +432,7 @@ "kodi" = ps: with ps; [ pykodi ]; "konnected" = ps: with ps; [ aiohttp-cors konnected ]; "kostal_plenticore" = ps: with ps; [ ]; # missing inputs: kostal_plenticore - "kraken" = ps: with ps; [ ]; # missing inputs: krakenex pykrakenapi + "kraken" = ps: with ps; [ krakenex pykrakenapi ]; "kulersky" = ps: with ps; [ pykulersky ]; "kwb" = ps: with ps; [ ]; # missing inputs: pykwb "lacrosse" = ps: with ps; [ pylacrosse ]; @@ -750,7 +750,7 @@ "shodan" = ps: with ps; [ shodan ]; "shopping_list" = ps: with ps; [ aiohttp-cors ]; "sht31" = ps: with ps; [ ]; # missing inputs: Adafruit-GPIO Adafruit-SHT31 - "sia" = ps: with ps; [ ]; # missing inputs: pysiaalarm + "sia" = ps: with ps; [ pysiaalarm ]; "sigfox" = ps: with ps; [ ]; "sighthound" = ps: with ps; [ pillow simplehound ]; "signal_messenger" = ps: with ps; [ ]; # missing inputs: pysignalclirestapi diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index a03f3f6189e4..d688fe721b6a 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -512,6 +512,7 @@ in with py.pkgs; buildPythonApplication rec { "knx" "kodi" "konnected" + "kraken" "kulersky" "lastfm" "lcn" @@ -644,6 +645,7 @@ in with py.pkgs; buildPythonApplication rec { "shell_command" "shelly" "shopping_list" + "sia" "sigfox" "sighthound" "simplisafe" @@ -679,6 +681,7 @@ in with py.pkgs; buildPythonApplication rec { "surepetcare" "switch" "switcher_kis" + "syncthing" "system_health" "system_log" "tado" diff --git a/pkgs/tools/security/exploitdb/default.nix b/pkgs/tools/security/exploitdb/default.nix index 0e73ac2325ed..d5d9138a15a4 100644 --- a/pkgs/tools/security/exploitdb/default.nix +++ b/pkgs/tools/security/exploitdb/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "exploitdb"; - version = "2021-06-23"; + version = "2021-06-25"; src = fetchFromGitHub { owner = "offensive-security"; repo = pname; rev = version; - sha256 = "15gxxs5wjxvcjh5q9h17p163byzl33zg5yjlay1f1n2ng8nypygi"; + sha256 = "sha256-xaRk/H2jITtU+93+7KxrYTTl0cCObvqcd+F9NNhjMjo="; }; installPhase = '' diff --git a/pkgs/tools/security/gpg-tui/default.nix b/pkgs/tools/security/gpg-tui/default.nix index acef238c1fe6..50a014374f1a 100644 --- a/pkgs/tools/security/gpg-tui/default.nix +++ b/pkgs/tools/security/gpg-tui/default.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage rec { pname = "gpg-tui"; - version = "0.5.0"; + version = "0.6.0"; src = fetchFromGitHub { owner = "orhun"; repo = "gpg-tui"; rev = "v${version}"; - sha256 = "sha256-D3H1tJ+7ObNssrc/eMzYQPxeA8cOpGgRF/5VX2kfha0="; + sha256 = "sha256-aKMO/T7jojlQGdtOqsEqTtnSBkVjyFuXmPxvFjVYl4Y="; }; - cargoSha256 = "sha256-0NctI16ZsOAEkuCRQ45aOl4p2a3N6Nx88HwtbWht/UY="; + cargoSha256 = "sha256-hRpzW2kISPZ2lwun+nqTi8vIv+9j6r/0yI1TjtH+ltw="; nativeBuildInputs = [ gpgme # for gpgme-config diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d050c89bfe8e..a528aee7b664 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3884,6 +3884,8 @@ in { korean-lunar-calendar = callPackage ../development/python-modules/korean-lunar-calendar { }; + krakenex = callPackage ../development/python-modules/krakenex { }; + kubernetes = callPackage ../development/python-modules/kubernetes { }; labelbox = callPackage ../development/python-modules/labelbox { }; @@ -5309,6 +5311,8 @@ in { pyisy = callPackage ../development/python-modules/pyisy { }; + pykrakenapi = callPackage ../development/python-modules/pykrakenapi { }; + pynndescent = callPackage ../development/python-modules/pynndescent { }; pynobo = callPackage ../development/python-modules/pynobo { }; @@ -5325,6 +5329,8 @@ in { pyshark = callPackage ../development/python-modules/pyshark { }; + pysiaalarm = callPackage ../development/python-modules/pysiaalarm { }; + pytest-subprocess = callPackage ../development/python-modules/pytest-subprocess { }; python-codon-tables = callPackage ../development/python-modules/python-codon-tables { };