auto-patchelf 无法满足依赖项 libQt5SerialPort.so.5

auto-patchelf 无法满足依赖项 libQt5SerialPort.so.5

我正在尝试在 NixOS 上运行 Qt Design Studio 2.3.1 Community。

我的nix推导代码:

薄片.nix:

{
  description = "Qt Design Studio";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, flake-utils }:
    flake-utils.lib.eachDefaultSystem (system: 
    let
      pname = "qtdesignstudio";
      version = "v2.3.1";

      pkgs = import nixpkgs { inherit system; config.pulseaudio=true;};

    in { 
        packages.default = pkgs.qt6Packages.callPackage ./. {inherit pname version; };
    }
  );
}

默认.nix:

{ pname, version, stdenv, pkgs, qtbase, wrapQtAppsHook, qt5compat, qtpositioning, qtserialport }: 

let
   zip_name = "qtdesignstudio-2.3.1.zip";
in
stdenv.mkDerivation {
  
  inherit pname version; 

  src = ./.;

  buildInputs = with pkgs; [

    gcc-unwrapped
    cairo
    pango
    gtk3
    atk
    gdk-pixbuf
    pulseaudio
    alsa-lib

    gst_all_1.gstreamer
    gst_all_1.gst-plugins-base
    gst_all_1.gst-plugins-bad

    xorg.libxkbfile
    xorg.libxshmfence

    nss_latest
    mysql80

  ] ++ [ 

    qt5compat
    qtbase
    qtpositioning
    qtserialport 

  ];

  unpackPhase = "true";

  nativeBuildInputs = with pkgs; [ 
    autoPatchelfHook 
    unzip
  ] ++ 
  [ wrapQtAppsHook ]; 

  installPhase = ''
    mkdir -p $out
    unzip $src/${zip_name} -d $out
  '';

}

然而,在构建它时,我收到以下错误:

...
 > auto-patchelf: 1 dependencies could not be satisfied
       > error: auto-patchelf could not satisfy dependency libQt5SerialPort.so.5 wanted by /nix/store/bih1ngcz4h0w01i875iys83lcfjksp2m-qtdesignstudio-v2.3.1/qt5_design_studio_reduced_version/plugins/position/libqtposition_serialnmea.so
       > auto-patchelf failed to find all the required dependencies.
...

有办法解决吗?

我试过这个答案来自 NixOS 的讨论,但它是针对 Qt5 的,而不是针对 Qt6 的。

如果你能帮助我,那就太好了,因为我完全陷入困境。

相关内容