Unverified Commit 3bfcfd7e authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents cc5ae613 cfe55e04
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -9,8 +9,14 @@ let
    options = {
      devices = mkOption {
        type = types.listOf types.str;
        default = [ ];
        example = [ "/dev/input/by-id/usb-0000_0000-event-kbd" ];
        description = mdDoc "Paths to keyboard devices.";
        description = mdDoc ''
          Paths to keyboard devices.

          An empty list, the default value, lets kanata detect which
          input devices are keyboards and intercept them all.
        '';
      };
      config = mkOption {
        type = types.lines;
@@ -162,6 +168,14 @@ in
  };

  config = mkIf cfg.enable {
    warnings =
      let
        keyboardsWithEmptyDevices = filterAttrs (name: keyboard: keyboard.devices == [ ]) cfg.keyboards;
        existEmptyDevices = length (attrNames keyboardsWithEmptyDevices) > 0;
        moreThanOneKeyboard = length (attrNames cfg.keyboards) > 1;
      in
      optional (existEmptyDevices && moreThanOneKeyboard) "One device can only be intercepted by one kanata instance.  Setting services.kanata.keyboards.${head (attrNames keyboardsWithEmptyDevices)}.devices = [ ] and using more than one services.kanata.keyboards may cause a race condition.";

    hardware.uinput.enable = true;

    systemd.services = mapAttrs' mkService cfg.keyboards;
+10 −1
Original line number Diff line number Diff line
@@ -164,6 +164,15 @@ let
          of the wireguard network has to be adjusted as well.
        '';
      };

      metric = mkOption {
        default = null;
        type = with types; nullOr int;
        example = 700;
        description = lib.mdDoc ''
          Set the metric of routes related to this Wireguard interface.
        '';
      };
    };

  };
@@ -395,7 +404,7 @@ let
            optionalString interfaceCfg.allowedIPsAsRoutes
              (concatMapStringsSep "\n"
                (allowedIP:
                  ''${ip} route replace "${allowedIP}" dev "${interfaceName}" table "${interfaceCfg.table}"''
                  ''${ip} route replace "${allowedIP}" dev "${interfaceName}" table "${interfaceCfg.table}" ${optionalString (interfaceCfg.metric != null) "metric ${toString interfaceCfg.metric}"}''
                ) peer.allowedIPs);
        in ''
          ${wg_setup}
+2 −2
Original line number Diff line number Diff line
@@ -3,11 +3,11 @@

stdenv.mkDerivation (finalAttrs: {
  pname = "ldtk";
  version = "1.3.4";
  version = "1.4.0";

  src = fetchurl {
    url = "https://github.com/deepnight/ldtk/releases/download/v${finalAttrs.version}/ubuntu-distribution.zip";
    hash = "sha256-/EFmuzj8hYhQJegZpZhZb4fuSeMF9wdG1Be4duEvW54=";
    hash = "sha256-WuKzhE9r/yMqlV2bf/0AuNVKfxq/SlecmN3rHt6RjXo=";
  };

  nativeBuildInputs = [ unzip makeWrapper copyDesktopItems appimage-run ];
+18 −0
Original line number Diff line number Diff line
diff --git a/hydrus/core/HydrusConstants.py b/hydrus/core/HydrusConstants.py
index 809338ef..9125928f 100644
--- a/hydrus/core/HydrusConstants.py
+++ b/hydrus/core/HydrusConstants.py
@@ -59,12 +59,7 @@ elif PLATFORM_HAIKU:
 RUNNING_FROM_SOURCE = sys.argv[0].endswith( '.py' ) or sys.argv[0].endswith( '.pyw' )
 RUNNING_FROM_MACOS_APP = os.path.exists( os.path.join( BASE_DIR, 'running_from_app' ) )
 
-if RUNNING_FROM_SOURCE:
-    NICE_RUNNING_AS_STRING = 'from source'
-elif RUNNING_FROM_FROZEN_BUILD:
-    NICE_RUNNING_AS_STRING = 'from frozen build'
-elif RUNNING_FROM_MACOS_APP:
-    NICE_RUNNING_AS_STRING = 'from App'
+NICE_RUNNING_AS_STRING = "from nixpkgs (source)"
 
 BIN_DIR = os.path.join( BASE_DIR, 'bin' )
 HELP_DIR = os.path.join( BASE_DIR, 'help' )
+16 −5
Original line number Diff line number Diff line
@@ -12,16 +12,21 @@

python3Packages.buildPythonPackage rec {
  pname = "hydrus";
  version = "520";
  version = "544";
  format = "other";

  src = fetchFromGitHub {
    owner = "hydrusnetwork";
    repo = "hydrus";
    rev = "refs/tags/v${version}";
    hash = "sha256-y8KfPe3cBBq/iPCG7hNXrZDkOSNi+qSir6rO/65SHkI=";
    hash = "sha256-e3VvkdJAQx5heKDJ1Ms6XpXrXWdzv48f8yu0DHfPy1A=";
  };

  patches = [
    # Nixpkgs specific, can be removed if upstream makes a more reasonable check
    ./0001-inform-nixpkgs.patch
  ];

  nativeBuildInputs = [
    wrapQtAppsHook
    python3Packages.mkdocs-material
@@ -37,13 +42,16 @@ python3Packages.buildPythonPackage rec {
    cbor2
    chardet
    cloudscraper
    dateparser
    html5lib
    lxml
    lz4
    numpy
    opencv4
    pillow
    pillow-heif
    psutil
    psd-tools
    pympler
    pyopenssl
    pyqt6
@@ -56,7 +64,6 @@ python3Packages.buildPythonPackage rec {
    requests
    send2trash
    service-identity
    six
    twisted
  ];

@@ -92,6 +99,7 @@ python3Packages.buildPythonPackage rec {
    -e TestHydrusSessions \
    -e TestServer \
    -e TestClientMetadataMigration \
    -e TestClientFileStorage \
  '';

  outputs = [ "out" "doc" ];
@@ -100,13 +108,16 @@ python3Packages.buildPythonPackage rec {
    # Move the hydrus module and related directories
    mkdir -p $out/${python3Packages.python.sitePackages}
    mv {hydrus,static} $out/${python3Packages.python.sitePackages}
    # Fix random files being marked with execute permissions
    chmod -x $out/${python3Packages.python.sitePackages}/static/*.{png,svg,ico}
    # Build docs
    mkdocs build -d help
    mv help $out/doc/

    # install the hydrus binaries
    mkdir -p $out/bin
    install -m0755 server.py $out/bin/hydrus-server
    install -m0755 client.py $out/bin/hydrus-client
    install -m0755 hydrus_server.py $out/bin/hydrus-server
    install -m0755 hydrus_client.py $out/bin/hydrus-client
  '' + lib.optionalString enableSwftools ''
    mkdir -p $out/${python3Packages.python.sitePackages}/bin
    # swfrender seems to have to be called sfwrender_linux
Loading