diff --git a/nixos/modules/services/misc/ananicy.nix b/nixos/modules/services/misc/ananicy.nix index f76f534fb450..191666bc3625 100644 --- a/nixos/modules/services/misc/ananicy.nix +++ b/nixos/modules/services/misc/ananicy.nix @@ -84,7 +84,7 @@ in } // (if ((lib.getName cfg.package) == (lib.getName pkgs.ananicy-cpp)) then { # https://gitlab.com/ananicy-cpp/ananicy-cpp/-/blob/master/src/config.cpp#L12 loglevel = mkOD "warn"; # default is info but its spammy - cgroup_realtime_workaround = mkOD true; + cgroup_realtime_workaround = mkOD config.systemd.enableUnifiedCgroupHierarchy; } else { # https://github.com/Nefelim4ag/Ananicy/blob/master/ananicy.d/ananicy.conf check_disks_schedulers = mkOD true; diff --git a/nixos/modules/services/networking/nix-serve.nix b/nixos/modules/services/networking/nix-serve.nix index 390f0ddaee83..432938d59d90 100644 --- a/nixos/modules/services/networking/nix-serve.nix +++ b/nixos/modules/services/networking/nix-serve.nix @@ -26,6 +26,12 @@ in ''; }; + openFirewall = mkOption { + type = types.bool; + default = false; + description = "Open ports in the firewall for nix-serve."; + }; + secretKeyFile = mkOption { type = types.nullOr types.str; default = null; @@ -77,5 +83,9 @@ in "NIX_SECRET_KEY_FILE:${cfg.secretKeyFile}"; }; }; + + networking.firewall = mkIf cfg.openFirewall { + allowedTCPPorts = [ cfg.port ]; + }; }; } diff --git a/pkgs/applications/window-managers/tabbed/default.nix b/pkgs/applications/window-managers/tabbed/default.nix index 7366ff196954..67097ca151a0 100644 --- a/pkgs/applications/window-managers/tabbed/default.nix +++ b/pkgs/applications/window-managers/tabbed/default.nix @@ -18,9 +18,9 @@ stdenv.mkDerivation { buildInputs = [ xorgproto libX11 libXft ]; - makeFlags = [ - "PREFIX=$(out)" - ]; + makeFlags = [ "CC:=$(CC)" ]; + + installFlags = [ "PREFIX=$(out)" ]; meta = with lib; { homepage = "https://tools.suckless.org/tabbed"; diff --git a/pkgs/development/libraries/freenect/default.nix b/pkgs/development/libraries/freenect/default.nix index 0e96a346f418..59b161384045 100644 --- a/pkgs/development/libraries/freenect/default.nix +++ b/pkgs/development/libraries/freenect/default.nix @@ -18,6 +18,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config ]; + # see https://aur.archlinux.org/cgit/aur.git/commit/PKGBUILD?h=libfreenect&id=0d17db49ba64bcb9e3a4eed61cf55c9a5ceb97f1 + patchPhase = lib.concatMapStrings (x: '' + substituteInPlace ${x} --replace "{GLUT_LIBRARY}" "{GLUT_LIBRARIES}" + '') [ "examples/CMakeLists.txt" "wrappers/cpp/CMakeLists.txt" ]; + meta = { description = "Drivers and libraries for the Xbox Kinect device on Windows, Linux, and macOS"; homepage = "http://openkinect.org"; diff --git a/pkgs/development/libraries/science/math/itpp/default.nix b/pkgs/development/libraries/science/math/itpp/default.nix index 88560e0cd983..d7a0dcfe06a7 100644 --- a/pkgs/development/libraries/science/math/itpp/default.nix +++ b/pkgs/development/libraries/science/math/itpp/default.nix @@ -49,5 +49,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3; platforms = platforms.unix; maintainers = with maintainers; [ andrew-d ]; + broken = stdenv.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/trunk/itpp.x86_64-darwin }; } diff --git a/pkgs/development/python-modules/cairocffi/default.nix b/pkgs/development/python-modules/cairocffi/default.nix index 8e26517ba218..cc4e19d6beb7 100644 --- a/pkgs/development/python-modules/cairocffi/default.nix +++ b/pkgs/development/python-modules/cairocffi/default.nix @@ -12,16 +12,67 @@ , cairo , cffi , numpy -, withXcffib ? false, xcffib +, withXcffib ? false +, xcffib , python , glib , gdk-pixbuf -}@args: +}: + +buildPythonPackage rec { + pname = "cairocffi"; + version = "1.3.0"; -import ./generic.nix ({ - version = "1.2.0"; - sha256 = "sha256-mpebUAxkyBef7ChvM36P5kTsovLNBYYM4LYtJfIuoUA="; - dlopen_patch = ./dlopen-paths.patch; disabled = pythonOlder "3.5"; - inherit withXcffib; -} // args) + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-EIo6fLCeIDvdhQHZuq2R14bSBFYb1x6TZOizSJfEe5E="; + }; + + LC_ALL = "en_US.UTF-8"; + + # checkPhase require at least one 'normal' font and one 'monospace', + # otherwise glyph tests fails + FONTCONFIG_FILE = makeFontsConf { + fontDirectories = [ freefont_ttf ]; + }; + + propagatedBuildInputs = [ cairo cffi ] ++ lib.optional withXcffib xcffib; + propagatedNativeBuildInputs = [ cffi ]; + + # pytestCheckHook does not work + checkInputs = [ numpy pytest glibcLocales ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "pytest-runner" "" \ + --replace "pytest-cov" "" \ + --replace "pytest-flake8" "" \ + --replace "pytest-isort" "" \ + --replace "--flake8 --isort" "" + ''; + + checkPhase = '' + py.test $out/${python.sitePackages} + ''; + + patches = [ + # OSError: dlopen() failed to load a library: gdk-pixbuf-2.0 / gdk-pixbuf-2.0-0 + (substituteAll { + src = ./dlopen-paths.patch; + ext = stdenv.hostPlatform.extensions.sharedLibrary; + cairo = cairo.out; + glib = glib.out; + gdk_pixbuf = gdk-pixbuf.out; + }) + ./fix_test_scaled_font.patch + ]; + + meta = with lib; { + homepage = "https://github.com/SimonSapin/cairocffi"; + license = licenses.bsd3; + maintainers = with maintainers; [ SuperSandro2000 ]; + description = "cffi-based cairo bindings for Python"; + }; +} diff --git a/pkgs/development/python-modules/cairocffi/generic.nix b/pkgs/development/python-modules/cairocffi/generic.nix deleted file mode 100644 index 004cf8ae7841..000000000000 --- a/pkgs/development/python-modules/cairocffi/generic.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ version -, sha256 -, dlopen_patch -, disabled ? false -, ... -}@args: - -with args; - -buildPythonPackage rec { - pname = "cairocffi"; - inherit version disabled; - - src = fetchPypi { - inherit pname version sha256; - }; - - LC_ALL = "en_US.UTF-8"; - - # checkPhase require at least one 'normal' font and one 'monospace', - # otherwise glyph tests fails - FONTCONFIG_FILE = makeFontsConf { - fontDirectories = [ freefont_ttf ]; - }; - - propagatedBuildInputs = [ cairo cffi ] ++ lib.optional withXcffib xcffib; - propagatedNativeBuildInputs = [ cffi ]; - - # pytestCheckHook does not work - checkInputs = [ numpy pytest glibcLocales ]; - - postPatch = '' - substituteInPlace setup.cfg \ - --replace "pytest-runner" "" \ - --replace "pytest-cov" "" \ - --replace "pytest-flake8" "" \ - --replace "pytest-isort" "" \ - --replace "--flake8 --isort" "" - ''; - - checkPhase = '' - py.test $out/${python.sitePackages} - ''; - - patches = [ - # OSError: dlopen() failed to load a library: gdk-pixbuf-2.0 / gdk-pixbuf-2.0-0 - (substituteAll { - src = dlopen_patch; - ext = stdenv.hostPlatform.extensions.sharedLibrary; - cairo = cairo.out; - glib = glib.out; - gdk_pixbuf = gdk-pixbuf.out; - }) - ./fix_test_scaled_font.patch - ]; - - meta = with lib; { - homepage = "https://github.com/SimonSapin/cairocffi"; - license = licenses.bsd3; - maintainers = with maintainers; []; - description = "cffi-based cairo bindings for Python"; - }; -} diff --git a/pkgs/development/python-modules/cot/default.nix b/pkgs/development/python-modules/cot/default.nix index 607057b73f21..20ccfd6e0a90 100644 --- a/pkgs/development/python-modules/cot/default.nix +++ b/pkgs/development/python-modules/cot/default.nix @@ -1,27 +1,57 @@ -{ lib, stdenv, buildPythonPackage, fetchPypi, pythonOlder, isPy3k -, colorlog, pyvmomi, requests, verboselogs -, psutil, pyopenssl, setuptools -, mock, pytest-mock, pytestCheckHook, qemu +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, pythonOlder +, colorlog +, pyvmomi +, requests +, verboselogs +, pyopenssl +, setuptools +, mock +, pytest-mock +, pytestCheckHook +, qemu }: buildPythonPackage rec { pname = "cot"; version = "2.2.1"; - disabled = !isPy3k; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "f4b3553415f90daac656f89d3e82e79b3d751793239bb173a683b4cc0ceb2635"; + hash = "sha256-9LNVNBX5DarGVvidPoLnmz11F5Mjm7FzpoO0zAzrJjU="; }; - propagatedBuildInputs = [ colorlog pyvmomi requests verboselogs pyopenssl setuptools ] - ++ lib.optional (pythonOlder "3.3") psutil; + propagatedBuildInputs = [ + colorlog + pyvmomi + requests + verboselogs + pyopenssl + setuptools + ]; - checkInputs = [ mock pytestCheckHook pytest-mock qemu ]; + checkInputs = [ + mock + pytestCheckHook + pytest-mock + qemu + ]; + + prePatch = '' + # argparse is part of the standardlib + substituteInPlace setup.py \ + --replace "'argparse'," "" + ''; - # Many tests require network access and/or ovftool (https://code.vmware.com/web/tool/ovf) - # try enabling these tests with ovftool once/if it is added to nixpkgs disabledTests = [ + # Many tests require network access and/or ovftool (https://code.vmware.com/web/tool/ovf) + # try enabling these tests with ovftool once/if it is added to nixpkgs "HelperGenericTest" "TestCOTAddDisk" "TestCOTAddFile" @@ -34,14 +64,15 @@ buildPythonPackage rec { "TestQCOW2" "TestRAW" "TestVMDKConversion" + # CLI test fails with AssertionError + "test_help" ] ++ lib.optionals stdenv.isDarwin [ "test_serial_fixup_invalid_host" ]; - # argparse is part of the standardlib - prePatch = '' - substituteInPlace setup.py --replace "'argparse'," "" - ''; + pythonImportsCheck = [ + "COT" + ]; meta = with lib; { description = "Common OVF Tool"; diff --git a/pkgs/development/python-modules/flux-led/default.nix b/pkgs/development/python-modules/flux-led/default.nix index a8fa6b46cdd0..5e4ec4290fea 100644 --- a/pkgs/development/python-modules/flux-led/default.nix +++ b/pkgs/development/python-modules/flux-led/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "flux-led"; - version = "0.28.3"; + version = "0.28.4"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -17,7 +17,7 @@ buildPythonPackage rec { owner = "Danielhiversen"; repo = "flux_led"; rev = version; - sha256 = "sha256-IkH5cCJbBUekABUcRyJl00tZgx+WqipEVsK8/ks2KDk="; + sha256 = "sha256-mD6pTrUAzApJamqqcLzzQI2JDKy3PAn5TtQz5/aPFXg="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/hap-python/default.nix b/pkgs/development/python-modules/hap-python/default.nix index c58e50bee868..63a2e941f0fa 100644 --- a/pkgs/development/python-modules/hap-python/default.nix +++ b/pkgs/development/python-modules/hap-python/default.nix @@ -16,14 +16,14 @@ buildPythonPackage rec { pname = "hap-python"; - version = "4.3.0"; + version = "4.4.0"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "ikalchev"; repo = "HAP-python"; rev = "v${version}"; - sha256 = "sha256-G4KL6iMeVn/tmvFtFL8vyqHGNfqk6j8iG4tDK9VpCyM="; + sha256 = "sha256-dSiI2W4U4FYwMRBInpxb/wkQLKxPzLHIkLPNgiZEhUA="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/hwi/default.nix b/pkgs/development/python-modules/hwi/default.nix index d4d091c36f8b..1bd1e6650c8d 100644 --- a/pkgs/development/python-modules/hwi/default.nix +++ b/pkgs/development/python-modules/hwi/default.nix @@ -8,11 +8,15 @@ , mnemonic , pyaes , typing-extensions +, pythonOlder }: buildPythonPackage rec { pname = "hwi"; version = "2.0.2"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "bitcoin-core"; @@ -34,18 +38,21 @@ buildPythonPackage rec { # make compatible with libusb1 2.x postPatch = '' substituteInPlace setup.py \ - --replace 'libusb1>=1.7,<2.0' 'libusb1>=1.7' + --replace 'libusb1>=1.7,<2.0' 'libusb1>=1.7' \ + --replace "'python_requires': '>=3.6,<3.10'," "'python_requires': '>=3.6,<4'," ''; # tests require to clone quite a few firmwares doCheck = false; - pythonImportsCheck = [ "hwilib" ]; + pythonImportsCheck = [ + "hwilib" + ]; - meta = { + meta = with lib; { description = "Bitcoin Hardware Wallet Interface"; homepage = "https://github.com/bitcoin-core/hwi"; - license = with lib.licenses; [ mit ]; - maintainers = with lib.maintainers; [ prusnak ]; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ prusnak ]; }; } diff --git a/pkgs/development/python-modules/rich/default.nix b/pkgs/development/python-modules/rich/default.nix index ca7397598269..f6194970adbd 100644 --- a/pkgs/development/python-modules/rich/default.nix +++ b/pkgs/development/python-modules/rich/default.nix @@ -13,7 +13,7 @@ buildPythonPackage rec { pname = "rich"; - version = "10.16.2"; + version = "11.0.0"; format = "pyproject"; disabled = pythonOlder "3.6"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "willmcgugan"; repo = pname; rev = "v${version}"; - sha256 = "sha256-SVenprbWq+ucQPAM1e9sNVYWbGAeo7qdEBy+cvqAMK8="; + sha256 = "0vkwar22rv1j6a3kqj3c016j0vnnha0kwi79fkd90ib1n501m7rn"; }; nativeBuildInputs = [ poetry-core ]; diff --git a/pkgs/development/python-modules/surepy/default.nix b/pkgs/development/python-modules/surepy/default.nix index 9759443228d0..13c8107c9aef 100644 --- a/pkgs/development/python-modules/surepy/default.nix +++ b/pkgs/development/python-modules/surepy/default.nix @@ -33,7 +33,8 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ --replace 'aiohttp = {extras = ["speedups"], version = "^3.7.4"}' 'aiohttp = {extras = ["speedups"], version = ">=3.7.4"}' \ - --replace 'async-timeout = "^3.0.1"' 'async-timeout = ">=3.0.1"' + --replace 'async-timeout = "^3.0.1"' 'async-timeout = ">=3.0.1"' \ + --replace 'rich = "^10.1.0"' 'rich = ">=10.1.0"' ''; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/treex/default.nix b/pkgs/development/python-modules/treex/default.nix index bdea03896cb5..4e8c1431cc18 100644 --- a/pkgs/development/python-modules/treex/default.nix +++ b/pkgs/development/python-modules/treex/default.nix @@ -27,9 +27,12 @@ buildPythonPackage rec { sha256 = "1hl3wj71c7cp7jzkhyjy7xgs2vc8c89icq0bgfr49y4pwv69n43m"; }; - patches = [ - ./relax-deps.patch - ]; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'rich = "^10.7.0"' 'rich = ">=10.7.0"' \ + --replace 'PyYAML = "^5.4.1"' 'PyYAML = ">=5.4.1"' \ + --replace 'optax = "^0.0.9"' 'optax = ">=0.0.9"' + ''; nativeBuildInputs = [ poetry-core diff --git a/pkgs/development/python-modules/treex/relax-deps.patch b/pkgs/development/python-modules/treex/relax-deps.patch deleted file mode 100644 index 347098a4a6d1..000000000000 --- a/pkgs/development/python-modules/treex/relax-deps.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/pyproject.toml b/pyproject.toml -index f0ff8a0..56787ca 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -16,9 +16,9 @@ secondary = true - [tool.poetry.dependencies] - python = "^3.7" - flax = "^0.3.4" --PyYAML = "^5.4.1" -+PyYAML = ">=5.4.1" - rich = "^10.7.0" --optax = "^0.0.9" -+optax = ">=0.0.9" - einops = "^0.3.2" - treeo = "^0.0.9" - # treeo = { path = "../treeo", develop = true } diff --git a/pkgs/development/python-modules/yalexs/default.nix b/pkgs/development/python-modules/yalexs/default.nix index 057e2bdb31d1..d83b031fe4c4 100644 --- a/pkgs/development/python-modules/yalexs/default.nix +++ b/pkgs/development/python-modules/yalexs/default.nix @@ -16,7 +16,7 @@ buildPythonPackage rec { pname = "yalexs"; - version = "1.1.17"; + version = "1.1.19"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "bdraco"; repo = pname; rev = "v${version}"; - sha256 = "sha256-kCLL+0ZiraTW7swgdfS9vkLcr/s6lTccFQbC02rdNDY="; + sha256 = "sha256-i6UFsSY2DQ4jB316fy5cZ+2C93TTmvyB4Caxj3syPdo="; }; propagatedBuildInputs = [ diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index aab639140e5f..8888fba7b74d 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -2,7 +2,7 @@ # Do not edit! { - version = "2021.12.9"; + version = "2021.12.10"; components = { "abode" = ps: with ps; [ abodepy ]; "accuweather" = ps: with ps; [ accuweather ]; diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 1cf23984adb5..0cb5e13fbd27 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -177,7 +177,7 @@ let extraBuildInputs = extraPackages python.pkgs; # Don't forget to run parse-requirements.py after updating - hassVersion = "2021.12.9"; + hassVersion = "2021.12.10"; in python.pkgs.buildPythonApplication rec { pname = "homeassistant"; @@ -194,7 +194,7 @@ in python.pkgs.buildPythonApplication rec { owner = "home-assistant"; repo = "core"; rev = version; - hash = "sha256:17lh16c9kklx4q416ns12qjh1hc0g79y56kdkj1pvybblg0a07lm"; + hash = "sha256:0nyddcjy4diq5bakpb76frax44i0jraj2vvpfxrj50h9l5pdwsaf"; }; # leave this in, so users don't have to constantly update their downstream patch handling diff --git a/pkgs/servers/ombi/default.nix b/pkgs/servers/ombi/default.nix index 0be7a3f0097c..1e63b44450e7 100644 --- a/pkgs/servers/ombi/default.nix +++ b/pkgs/servers/ombi/default.nix @@ -10,14 +10,14 @@ let "Unsupported system: ${stdenv.hostPlatform.system}"); hash = { - x64-linux_hash = "sha256-4kvcBRMMH4AnTKSES5Cpst/omTRXVRq1V1y/z5njKJI="; - arm64-linux_hash = "sha256-NLsf0ldvlKSrHJyAXv5Ar2zIetoga6iZPOGTxFOqoQQ="; - x64-osx_hash = "sha256-tjvGuShz/fv3qUknFVKJ+tE/bVtIyPZ7dr4JfTEcDJY="; + x64-linux_hash = "sha256-BLtoT6UHsur+jFp4KBlE10/Z/V6RDy0k16H10IC98WQ="; + arm64-linux_hash = "sha256-s8EV/VqiUXWRTNxacx4sy6r+TIAqkqhESAYYa9s0uAQ="; + x64-osx_hash = "sha256-woXFYmX+499NTtWmmGBpZ12PxTUazJ8klA6IPQIDjLE="; }."${arch}-${os}_hash"; in stdenv.mkDerivation rec { pname = "ombi"; - version = "4.0.1468"; + version = "4.3.3"; sourceRoot = "."; diff --git a/pkgs/servers/ombi/update.sh b/pkgs/servers/ombi/update.sh index 1503edde9983..a549a9f1731d 100755 --- a/pkgs/servers/ombi/update.sh +++ b/pkgs/servers/ombi/update.sh @@ -15,7 +15,7 @@ updateHash() url="https://github.com/Ombi-app/Ombi/releases/download/v$version/$os-$arch.tar.gz" hash=$(nix-prefetch-url --type sha256 $url) - sriHash="$(nix to-sri --type sha256 $hash)" + sriHash="$(nix --extra-experimental-features nix-command hash to-sri --type sha256 $hash)" sed -i "s|$hashKey = \"[a-zA-Z0-9\/+-=]*\";|$hashKey = \"$sriHash\";|g" "$dirname/default.nix" }