diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000000..4a581f9dcea3 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,32 @@ +# This file contains a list of commits that are not likely what you +# are looking for in a blame, such as mass reformatting or renaming. +# You can set this file as a default ignore file for blame by running +# the following command. +# +# $ git config blame.ignoreRevsFile .git-blame-ignore-revs +# +# To temporarily not use this file add +# --ignore-revs-file="" +# to your blame command. +# +# The ignoreRevsFile can't be set globally due to blame failing if the file isn't present. +# To not have to set the option in every repository it is needed in, +# save the following script in your path with the name "git-bblame" +# now you can run +# $ git bblame $FILE +# to use the .git-blame-ignore-revs file if it is present. +# +# #!/usr/bin/env bash +# repo_root=$(git rev-parse --show-toplevel) +# if [[ -e $repo_root/.git-blame-ignore-revs ]]; then +# git blame --ignore-revs-file="$repo_root/.git-blame-ignore-revs" $@ +# else +# git blame $@ +# fi + + +# nixos/modules/rename: Sort alphabetically +1f71224fe86605ef4cd23ed327b3da7882dad382 + +# nixos: fix module paths in rename.nix +d08ede042b74b8199dc748323768227b88efcf7c diff --git a/lib/modules.nix b/lib/modules.nix index e9fc1007fc20..79d54e4a5387 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -151,8 +151,7 @@ rec { }; _module.freeformType = mkOption { - # Disallow merging for now, but could be implemented nicely with a `types.optionType` - type = types.nullOr (types.uniq types.attrs); + type = types.nullOr types.optionType; internal = true; default = null; description = '' diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index a1c592cf4ef0..e4bb7ad21900 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -240,6 +240,11 @@ checkConfigOutput '^"24"$' config.foo ./freeform-attrsOf.nix ./freeform-str-dep- checkConfigError 'infinite recursion encountered' config.foo ./freeform-attrsOf.nix ./freeform-unstr-dep-str.nix checkConfigError 'The option .* is used but not defined' config.foo ./freeform-lazyAttrsOf.nix ./freeform-unstr-dep-str.nix checkConfigOutput '^"24"$' config.foo ./freeform-lazyAttrsOf.nix ./freeform-unstr-dep-str.nix ./define-value-string.nix +# submodules in freeformTypes should have their locations annotated +checkConfigOutput '/freeform-submodules.nix"$' config.fooDeclarations.0 ./freeform-submodules.nix +# freeformTypes can get merged using `types.type`, including submodules +checkConfigOutput '^10$' config.free.xxx.foo ./freeform-submodules.nix +checkConfigOutput '^10$' config.free.yyy.bar ./freeform-submodules.nix ## types.anything # Check that attribute sets are merged recursively @@ -299,6 +304,13 @@ checkConfigOutput "10" config.processedToplevel ./raw.nix checkConfigError "The option .multiple. is defined multiple times" config.multiple ./raw.nix checkConfigOutput "bar" config.priorities ./raw.nix +# Test that types.optionType merges types correctly +checkConfigOutput '^10$' config.theOption.int ./optionTypeMerging.nix +checkConfigOutput '^"hello"$' config.theOption.str ./optionTypeMerging.nix + +# Test that types.optionType correctly annotates option locations +checkConfigError 'The option .theOption.nested. in .other.nix. is already declared in .optionTypeFile.nix.' config.theOption.nested ./optionTypeFile.nix + cat < + + + types.optionType + + + + The type of an option’s type. Its merging operation ensures + that nested options have the correct file location + annotated, and that if possible, multiple option definitions + are correctly merged together. The main use case is as the + type of the _module.freeformType option. + + + types.attrs diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index 99bdb11b0112..5b60b17312f9 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -83,6 +83,7 @@ in { b43Firmware_5_1_138 b43Firmware_6_30_163_46 b43FirmwareCutter + xow_dongle-firmware ] ++ optional pkgs.stdenv.hostPlatform.isx86 facetimehd-firmware; }) (mkIf cfg.wirelessRegulatoryDatabase { diff --git a/nixos/modules/hardware/xone.nix b/nixos/modules/hardware/xone.nix new file mode 100644 index 000000000000..89690d8c6fb1 --- /dev/null +++ b/nixos/modules/hardware/xone.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.hardware.xone; +in +{ + options.hardware.xone = { + enable = mkEnableOption "the xone driver for Xbox One and Xbobx Series X|S accessories"; + }; + + config = mkIf cfg.enable { + boot = { + blacklistedKernelModules = [ "xpad" "mt76x2u" ]; + extraModulePackages = with config.boot.kernelPackages; [ xone ]; + }; + hardware.firmware = [ pkgs.xow_dongle-firmware ]; + }; + + meta = { + maintainers = with maintainers; [ rhysmdnz ]; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index c6f4ec5f08c3..fd6bd087fb7d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -91,6 +91,7 @@ ./hardware/video/switcheroo-control.nix ./hardware/video/uvcvideo/default.nix ./hardware/video/webcam/facetimehd.nix + ./hardware/xone.nix ./hardware/xpadneo.nix ./i18n/input-method/default.nix ./i18n/input-method/fcitx.nix diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 7f437c8d02f6..5a6545bb1d9f 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -1857,8 +1857,8 @@ let mktplcRef = { name = "code-spell-checker"; publisher = "streetsidesoftware"; - version = "2.1.5"; - sha256 = "sha256-nIR3PtbtnSbAU0rS+qVtPsj++Dbfp/k86dWkx4xYcno="; + version = "2.1.7"; + sha256 = "sha256-C0jYDIDBK1JH8eFaFmCUilBXCbU5y2TRF3OZAw9ijoY="; }; meta = with lib; { changelog = "https://marketplace.visualstudio.com/items/streetsidesoftware.code-spell-checker/changelog"; diff --git a/pkgs/applications/misc/playonlinux/default.nix b/pkgs/applications/misc/playonlinux/default.nix index 761d7f6f0f40..74f340815177 100644 --- a/pkgs/applications/misc/playonlinux/default.nix +++ b/pkgs/applications/misc/playonlinux/default.nix @@ -22,11 +22,12 @@ , jq , xorg , libGL -, steam-run-native +, steam-run # needed for avoiding crash on file selector , gsettings-desktop-schemas , glib , wrapGAppsHook +, hicolor-icon-theme }: let @@ -89,6 +90,8 @@ in stdenv.mkDerivation { xorg.libX11 libGL python + gsettings-desktop-schemas + hicolor-icon-theme ]; postPatch = '' @@ -103,16 +106,6 @@ in stdenv.mkDerivation { install -D -m644 etc/PlayOnLinux.desktop $out/share/applications/playonlinux.desktop - makeWrapper $out/share/playonlinux/playonlinux{,-wrapper} \ - --prefix PATH : ${binpath} \ - --prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/GConf - # steam-run is needed to run the downloaded wine executables - mkdir -p $out/bin - cat > $out/bin/playonlinux < "OFF" + let result = enableFeature false + => "OFF" + let result = enableFeature «derivation» + => "ON" + */ + enableCmakeFeature = p: if (p == null || p == false) then "OFF" else "ON"; + + # Not really sure why I need to do this.. If I call clang-tools without the override it defaults to a different version and fails + clangTools = clang-tools.override { inherit stdenv llvmPackages; }; + # If boost has python enabled, then boost-python package will be installed which is used by libpulsars python wrapper + boost = if python3Support then boost17x.override { inherit stdenv; enablePython = python3Support; python = python3; } else boost17x; + defaultOptionals = [ boost protobuf ] + ++ lib.optional python3Support python3 + ++ lib.optional snappySupport snappy.dev + ++ lib.optional zlibSupport zlib + ++ lib.optional zstdSupport zstd + ++ lib.optional log4cxxSupport log4cxx; + +in +stdenv.mkDerivation rec { + pname = "libpulsar"; + version = "2.9.1"; + + src = fetchurl { + hash = "sha512-NKHiL7D/Lmnn6ICpQyUmmQYQETz4nZPJU9/4LMRDUQ3Pck6qDh+t6CRk+b9UQ2Vb0jvPIGTjEsSp2nC7TJk3ug=="; + url = "mirror://apache/pulsar/pulsar-${version}/apache-pulsar-${version}-src.tar.gz"; + }; + + sourceRoot = "apache-pulsar-${version}-src/pulsar-client-cpp"; + + # clang-tools needed for clang-format + nativeBuildInputs = [ cmake pkg-config clangTools ] + ++ defaultOptionals + ++ lib.optional gtestSupport gtest.dev; + + buildInputs = [ jsoncpp openssl curl ] + ++ defaultOptionals; + + # Needed for GCC on Linux + NIX_CFLAGS_COMPILE = [ "-Wno-error=return-type" ]; + + cmakeFlags = [ + "-DBUILD_TESTS=${enableCmakeFeature gtestSupport}" + "-DBUILD_PYTHON_WRAPPER=${enableCmakeFeature python3Support}" + "-DUSE_LOG4CXX=${enableCmakeFeature log4cxxSupport}" + "-DClangTools_PATH=${clangTools}/bin" + ]; + + enableParallelBuilding = true; + doInstallCheck = true; + installCheckPhase = '' + echo ${lib.escapeShellArg '' + #include + int main (int argc, char **argv) { + pulsar::Client client("pulsar://localhost:6650"); + return 0; + } + ''} > test.cc + $CXX test.cc -L $out/lib -I $out/include -lpulsar -o test + ''; + + meta = with lib; { + homepage = "https://pulsar.apache.org/docs/en/client-libraries-cpp"; + description = "Apache Pulsar C++ library"; + + platforms = platforms.all; + license = licenses.asl20; + maintainers = [ maintainers.corbanr ]; + }; +} diff --git a/pkgs/development/libraries/mimalloc/default.nix b/pkgs/development/libraries/mimalloc/default.nix index 1e9e44e09973..22d4567c562d 100644 --- a/pkgs/development/libraries/mimalloc/default.nix +++ b/pkgs/development/libraries/mimalloc/default.nix @@ -1,4 +1,5 @@ { lib, stdenv, fetchFromGitHub, cmake, ninja +, fetchpatch , secureBuild ? false }: @@ -7,14 +8,28 @@ let in stdenv.mkDerivation rec { pname = "mimalloc"; - version = "2.0.2"; + version = "2.0.5"; src = fetchFromGitHub { owner = "microsoft"; repo = pname; rev = "v${version}"; - sha256 = "sha256-n4FGld3bq6ZOSLTzXcVlucCGbQ5/eSFbijU0dfBD/T0="; + sha256 = "sha256-q3W/w1Ofqt6EbKF/Jf9wcC+7jAxh59B3cOGxudWQXlA="; }; + patches = [ + (fetchpatch { + name = "older-macos-fixes.patch"; + url = "https://github.com/microsoft/mimalloc/commit/40e0507a5959ee218f308d33aec212c3ebeef3bb.patch"; + sha256 = "15qx2a3axhhwbfzxdis98b8j14y9cfgca0i484aj2pjpqnm0pb8c"; + }) + ]; + + doCheck = true; + preCheck = let + ldLibraryPathEnv = if stdenv.isDarwin then "DYLD_LIBRARY_PATH" else "LD_LIBRARY_PATH"; + in '' + export ${ldLibraryPathEnv}="$(pwd)/build:''${${ldLibraryPathEnv}}" + ''; nativeBuildInputs = [ cmake ninja ]; cmakeFlags = [ "-DMI_INSTALL_TOPLEVEL=ON" ] ++ lib.optional secureBuild [ "-DMI_SECURE=ON" ]; @@ -25,10 +40,9 @@ stdenv.mkDerivation rec { in '' # first, move headers and cmake files, that's easy mkdir -p $dev/lib - mv $out/include $dev/include - mv $out/cmake $dev/lib/ + mv $out/lib/cmake $dev/lib/ - find $out/lib + find $dev $out -type f '' + (lib.optionalString secureBuild '' # pretend we're normal mimalloc ln -sfv $out/lib/libmimalloc-secure${suffix} $out/lib/libmimalloc${suffix} @@ -44,6 +58,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/microsoft/mimalloc"; license = licenses.bsd2; platforms = platforms.unix; - maintainers = with maintainers; [ thoughtpolice ]; + maintainers = with maintainers; [ kamadorueda thoughtpolice ]; }; } diff --git a/pkgs/development/python-modules/fleep/0001-Fixing-paths-on-tests.patch b/pkgs/development/python-modules/fleep/0001-Fixing-paths-on-tests.patch new file mode 100644 index 000000000000..234bf0cb379b --- /dev/null +++ b/pkgs/development/python-modules/fleep/0001-Fixing-paths-on-tests.patch @@ -0,0 +1,48 @@ +From 716fcfa3203bc881b543916bdb9a17460951cd26 Mon Sep 17 00:00:00 2001 +From: "P. R. d. O" +Date: Fri, 26 Nov 2021 07:13:32 -0600 +Subject: [PATCH] Fixing paths on tests + +--- + tests/maintest.py | 7 ++++++- + tests/speedtest.py | 7 ++++++- + 2 files changed, 12 insertions(+), 2 deletions(-) + +diff --git a/tests/maintest.py b/tests/maintest.py +index 0e24ca4..3484437 100644 +--- a/tests/maintest.py ++++ b/tests/maintest.py +@@ -1,6 +1,11 @@ + import fleep ++import os + +-with open("testfile", "rb") as file: ++current_dir = os.path.realpath(os.path.join(os.getcwd(), ++ os.path.dirname(__file__))) ++ ++with open(os.path.join(current_dir, "./testfile"), ++ "rb") as file: + info = fleep.get(file.read(128)) + + assert info.type == ["raster-image"] +diff --git a/tests/speedtest.py b/tests/speedtest.py +index 89338ab..829d563 100644 +--- a/tests/speedtest.py ++++ b/tests/speedtest.py +@@ -1,7 +1,12 @@ + import time + import fleep ++import os + +-with open("testfile", "rb") as file: ++current_dir = os.path.realpath(os.path.join(os.getcwd(), ++ os.path.dirname(__file__))) ++ ++with open(os.path.join(current_dir, "./testfile"), ++ "rb") as file: + stream = file.read(128) + + times = [] +-- +2.33.1 + diff --git a/pkgs/development/python-modules/fleep/default.nix b/pkgs/development/python-modules/fleep/default.nix new file mode 100644 index 000000000000..04b607325136 --- /dev/null +++ b/pkgs/development/python-modules/fleep/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, python +}: + +buildPythonPackage rec { + pname = "fleep"; + version = "1.0.1"; + + # Pypi version does not have tests + src = fetchFromGitHub { + owner = "floyernick"; + repo = "fleep-py"; + rev = "994bc2c274482d80ab13d89d8f7343eb316d3e44"; + sha256 = "sha256-TaU7njx98nxkhZawGMFqWj4g+yCtIX9aPWQHoamzfMY="; + }; + + patches = [ + ./0001-Fixing-paths-on-tests.patch + ]; + + checkPhase = '' + ${python.interpreter} tests/maintest.py + ${python.interpreter} tests/speedtest.py + ''; + + pythonImportsCheck = [ "fleep" ]; + + meta = with lib; { + description = "File format determination library"; + homepage = "https://github.com/floyernick/fleep-py"; + license = licenses.mit; + maintainers = with maintainers; [ wolfangaukang ]; + }; +} diff --git a/pkgs/development/python-modules/graphql-subscription-manager/default.nix b/pkgs/development/python-modules/graphql-subscription-manager/default.nix index db3aea752b70..afcbe157a1e2 100644 --- a/pkgs/development/python-modules/graphql-subscription-manager/default.nix +++ b/pkgs/development/python-modules/graphql-subscription-manager/default.nix @@ -8,7 +8,7 @@ buildPythonPackage rec { pname = "graphql-subscription-manager"; - version = "0.5.0"; + version = "0.5.1"; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "Danielhiversen"; repo = "PyGraphqlWebsocketManager"; rev = version; - sha256 = "sha256-18GR0OZeEh6EQT0kKCJyq7ckvKYKDJn/lugN5xlRg64="; + sha256 = "sha256-PVQa6JmBnToXuL/wNkYO0b+K1e9yrQgRUzWNUbFN5mM="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/nextcord/default.nix b/pkgs/development/python-modules/nextcord/default.nix new file mode 100644 index 000000000000..345a77239bf4 --- /dev/null +++ b/pkgs/development/python-modules/nextcord/default.nix @@ -0,0 +1,64 @@ +{ lib +, stdenv +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, substituteAll +, ffmpeg +, libopus +, aiohttp +, aiodns +, brotli +, cchardet +, orjson +, pynacl +}: + +buildPythonPackage rec { + pname = "nextcord"; + version = "2.0.0a8"; + + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "nextcord"; + repo = "nextcord"; + rev = version; + hash = "sha256-aYFY58zWZlZwW3xwa1iAK4w29AofKIkTyCjQ2nR8JrY="; + }; + + patches = [ + (substituteAll { + src = ./paths.patch; + ffmpeg = "${ffmpeg}/bin/ffmpeg"; + libopus = "${libopus}/lib/libopus${stdenv.hostPlatform.extensions.sharedLibrary}"; + }) + ]; + + propagatedBuildInputs = [ + aiodns + aiohttp + brotli + cchardet + orjson + pynacl + ]; + + # upstream has no tests + doCheck = false; + + pythonImportsCheck = [ + "nextcord" + "nextcord.ext.commands" + "nextcord.ext.tasks" + ]; + + meta = with lib; { + description = "Python wrapper for the Discord API forked from discord.py"; + homepage = "https://github.com/nextcord/nextcord"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/development/python-modules/nextcord/paths.patch b/pkgs/development/python-modules/nextcord/paths.patch new file mode 100644 index 000000000000..389637a18878 --- /dev/null +++ b/pkgs/development/python-modules/nextcord/paths.patch @@ -0,0 +1,26 @@ +diff --git a/nextcord/opus.py b/nextcord/opus.py +index 97d437a3..755e1a5c 100644 +--- a/nextcord/opus.py ++++ b/nextcord/opus.py +@@ -213,7 +213,7 @@ def _load_default() -> bool: + _filename = os.path.join(_basedir, 'bin', f'libopus-0.{_target}.dll') + _lib = libopus_loader(_filename) + else: +- _lib = libopus_loader(ctypes.util.find_library('opus')) ++ _lib = libopus_loader('@libopus@') + except Exception: + _lib = None + +diff --git a/nextcord/player.py b/nextcord/player.py +index bedefc5a..34de0459 100644 +--- a/nextcord/player.py ++++ b/nextcord/player.py +@@ -140,7 +140,7 @@ class FFmpegAudio(AudioSource): + .. versionadded:: 1.3 + """ + +- def __init__(self, source: Union[str, io.BufferedIOBase], *, executable: str = 'ffmpeg', args: Any, **subprocess_kwargs: Any): ++ def __init__(self, source: Union[str, io.BufferedIOBase], *, executable: str = '@ffmpeg@', args: Any, **subprocess_kwargs: Any): + piping = subprocess_kwargs.get('stdin') == subprocess.PIPE + if piping and isinstance(source, str): + raise TypeError("parameter conflict: 'source' parameter cannot be a string when piping to stdin") diff --git a/pkgs/development/tools/build-managers/leiningen/default.nix b/pkgs/development/tools/build-managers/leiningen/default.nix index 7dfb6c9b2ad5..80919cfc377f 100644 --- a/pkgs/development/tools/build-managers/leiningen/default.nix +++ b/pkgs/development/tools/build-managers/leiningen/default.nix @@ -3,16 +3,16 @@ stdenv.mkDerivation rec { pname = "leiningen"; - version = "2.9.7"; + version = "2.9.8"; src = fetchurl { url = "https://raw.github.com/technomancy/leiningen/${version}/bin/lein-pkg"; - sha256 = "sha256-948g0ZMfAoJw53vA8MAKWg76Tst6VnYwSjSuT0aeKB0="; + sha256 = "1sgnxw58srjxqnskl700p7r7n23pfpjvqpiqnz1m8r6c76jwnllr"; }; jarsrc = fetchurl { url = "https://github.com/technomancy/leiningen/releases/download/${version}/${pname}-${version}-standalone.jar"; - sha256 = "sha256-gvAUFKzs3bsOvW1XFQW7Zxpv0JMja82sJGjP5fLqqAI="; + sha256 = "13f4n15i0gsk9jq52gxivnsk32qjahmxgrddm54cf8ynw0a923ia"; }; JARNAME = "${pname}-${version}-standalone.jar"; diff --git a/pkgs/os-specific/linux/firmware/xow_dongle-firmware/default.nix b/pkgs/os-specific/linux/firmware/xow_dongle-firmware/default.nix new file mode 100644 index 000000000000..0375eb0eead8 --- /dev/null +++ b/pkgs/os-specific/linux/firmware/xow_dongle-firmware/default.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, fetchurl, cabextract }: + +stdenv.mkDerivation rec { + pname = "xow_dongle-firmware"; + version = "2017-07"; + + dontUnpack = true; + dontInstall = true; + + src = fetchurl { + url = "http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab"; + sha256 = "013g1zngxffavqrk5jy934q3bdhsv6z05ilfixdn8dj0zy26lwv5"; + }; + + nativeBuildInputs = [ cabextract ]; + + buildPhase = '' + cabextract -F FW_ACC_00U.bin ${src} + mkdir -p $out/lib/firmware + cp -a FW_ACC_00U.bin $out/lib/firmware/xow_dongle.bin + ''; + + meta = with lib; { + description = "Xbox One wireless dongle firmware"; + homepage = "https://www.xbox.com/en-NZ/accessories/adapters/wireless-adapter-windows"; + license = licenses.unfree; + maintainers = with lib.maintainers; [ rhysmdnz ]; + platforms = platforms.linux; + }; +} + + diff --git a/pkgs/os-specific/linux/xone/default.nix b/pkgs/os-specific/linux/xone/default.nix new file mode 100644 index 000000000000..f04ccc569dff --- /dev/null +++ b/pkgs/os-specific/linux/xone/default.nix @@ -0,0 +1,39 @@ +{ stdenv, lib, fetchFromGitHub, kernel, fetchurl }: + +stdenv.mkDerivation rec { + name = "xone-${version}-${kernel.version}"; + version = "0.2"; + + src = fetchFromGitHub { + owner = "medusalix"; + repo = "xone"; + rev = "v${version}"; + sha256 = "sha256-m4305Xl5w4nyAVqubjwWsiyPDVtfGykjlSW2eKEytVk="; + }; + + setSourceRoot = '' + export sourceRoot=$(pwd)/source + ''; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + makeFlags = [ + "-C" + "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "M=$(sourceRoot)" + "VERSION=${version}" + ]; + + buildFlags = [ "modules" ]; + installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; + installTargets = [ "modules_install" ]; + + meta = with lib; { + description = "Linux kernel driver for Xbox One and Xbox Series X|S accessories"; + homepage = "https://github.com/medusalix/xone"; + license = licenses.gpl2; + maintainers = with lib.maintainers; [ rhysmdnz ]; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/tools/misc/nncp/default.nix b/pkgs/tools/misc/nncp/default.nix index a9c2a43734e9..0e27139b5b39 100644 --- a/pkgs/tools/misc/nncp/default.nix +++ b/pkgs/tools/misc/nncp/default.nix @@ -3,12 +3,12 @@ stdenv.mkDerivation rec { pname = "nncp"; - version = "8.5.0"; + version = "8.6.0"; outputs = [ "out" "doc" "info" ]; src = fetchurl { url = "http://www.nncpgo.org/download/${pname}-${version}.tar.xz"; - sha256 = "sha256-6IUNJ3DE+nRc+bmpDO7l1gXlD6UDGggTSYRMFT57v/Q="; + sha256 = "sha256-rhbwoJwbfR2jdn4cD0ENnCmsyuYypEipVdtKDxW/g48="; }; nativeBuildInputs = [ go redo-apenwarr ]; diff --git a/pkgs/tools/networking/opendrop/default.nix b/pkgs/tools/networking/opendrop/default.nix new file mode 100644 index 000000000000..6a8937215105 --- /dev/null +++ b/pkgs/tools/networking/opendrop/default.nix @@ -0,0 +1,41 @@ +{ lib +, buildPythonApplication +, fetchPypi +, fleep +, libarchive-c +, pillow +, requests-toolbelt +, setuptools +, zeroconf }: + +buildPythonApplication rec { + pname = "opendrop"; + version = "0.13.0"; + + src = fetchPypi { + inherit version pname; + sha256 = "sha256-FE1oGpL6C9iBhI8Zj71Pm9qkObJvSeU2gaBZwK1bTQc="; + }; + + propagatedBuildInputs = [ + fleep + libarchive-c + pillow + requests-toolbelt + setuptools + zeroconf + ]; + + # There are tests, but getting the following error: + # nix_run_setup: error: argument action: invalid choice: 'test' (choose from 'receive', 'find', 'send') + # Opendrop works as intended though + doCheck = false; + + meta = with lib; { + description = "An open Apple AirDrop implementation written in Python"; + homepage = "https://owlink.org/"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ wolfangaukang ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/tools/networking/owl/default.nix b/pkgs/tools/networking/owl/default.nix new file mode 100644 index 000000000000..5a726c25a027 --- /dev/null +++ b/pkgs/tools/networking/owl/default.nix @@ -0,0 +1,25 @@ +{ stdenv, lib, fetchFromGitHub, cmake, libev, libnl, libpcap }: + +stdenv.mkDerivation rec { + pname = "owl"; + version = "unstable-2022-01-30"; + + src = fetchFromGitHub { + owner = "seemoo-lab"; + repo = "owl"; + rev = "8e4e840b212ae5a09a8a99484be3ab18bad22fa7"; + sha256 = "sha256-kFk+JFLGWGBu5FPH3qp/Bxa6t04f1kpeHz3H8GNF3fg="; + fetchSubmodules = true; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ libev libnl libpcap ]; + + meta = with lib; { + description = "An open Apple Wireless Direct Link (AWDL) implementation written in C"; + homepage = "https://owlink.org/"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ wolfangaukang ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9cae4a790a47..0b4a208c1c92 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -549,6 +549,10 @@ with pkgs; graph-easy = callPackage ../tools/graphics/graph-easy { }; + opendrop = python3Packages.callPackage ../tools/networking/opendrop { }; + + owl = callPackage ../tools/networking/owl { }; + packer = callPackage ../development/tools/packer { }; packr = callPackage ../development/libraries/packr { }; @@ -18581,6 +18585,8 @@ with pkgs; libptytty = callPackage ../development/libraries/libptytty { }; + libpulsar = callPackage ../development/libraries/libpulsar { }; + libpwquality = callPackage ../development/libraries/libpwquality { }; libqalculate = callPackage ../development/libraries/libqalculate { @@ -21492,6 +21498,7 @@ with pkgs; openresty = callPackage ../servers/http/openresty { withPerl = false; + modules = []; }; opensmtpd = callPackage ../servers/mail/opensmtpd { }; @@ -34201,6 +34208,8 @@ with pkgs; xosview2 = callPackage ../tools/X11/xosview2 { }; + xow_dongle-firmware = callPackage ../os-specific/linux/firmware/xow_dongle-firmware { }; + xpad = callPackage ../applications/misc/xpad { }; xsane = callPackage ../applications/graphics/sane/xsane.nix { diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 8490870e5894..5f043faecfd7 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -462,6 +462,8 @@ in { xmm7360-pci = callPackage ../os-specific/linux/xmm7360-pci { }; + xone = if lib.versionAtLeast kernel.version "5.4" then callPackage ../os-specific/linux/xone { } else null; + xpadneo = callPackage ../os-specific/linux/xpadneo { }; zenpower = callPackage ../os-specific/linux/zenpower { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8be1c2205dfe..2f3ba8705a70 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3017,6 +3017,8 @@ in { flax = callPackage ../development/python-modules/flax { }; + fleep = callPackage ../development/python-modules/fleep { }; + flexmock = callPackage ../development/python-modules/flexmock { }; flickrapi = callPackage ../development/python-modules/flickrapi { }; @@ -5460,6 +5462,8 @@ in { nextcloudmonitor = callPackage ../development/python-modules/nextcloudmonitor { }; + nextcord = callPackage ../development/python-modules/nextcord { }; + nghttp2 = (toPythonModule (pkgs.nghttp2.override { inherit (self) python cython setuptools; inherit (pkgs) ncurses;