I try to build nix package by myself, the following is my file:
# This file was generated by nvfetcher, please do not modify it manually.
{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }:
{
qq-nt-x86_64-linux = {
pname = "qq-nt-x86_64-linux";
version = "3.1.2_12912";
src = fetchurl {
url = "https://dldir1.qq.com/qqfile/qq/QQNT/80d33f88/linuxqq_3.1.2-12912_amd64.deb";
sha256 = "sha256-F+zIHqYWKiCHYNJZ5hRw0rzltizjuqhVxbpzQGagoZ0=";
};
};
}
{ mySources
, pkgs
, lib
, stdenv
, autoPatchelfHook
, dpkg ? stdenv.isLinux
, rsync ? stdenv.isLinux
, nss
, alsa-lib
, gtk3
, gjs
, at-spi2-core
, vips
, libdrm
, libgcrypt
, libkrb5
, mesa
, xdg-desktop-portal
}:
stdenv.mkDerivation rec {
inherit (mySources."qq-nt-${pkgs.system}") pname version src;
nativeBuildInputs = [
autoPatchelfHook
rsync
]
++
(if lib.hasSuffix "deb" src then [ dpkg ] else [ ])
;
buildInputs = [
nss
alsa-lib
gtk3
gjs
at-spi2-core
vips
libdrm
libgcrypt
libkrb5
mesa
];
propagatedBuildInputs = [
xdg-desktop-portal
];
unpackPhase =
if lib.hasSuffix "deb" src then ''
dpkg -x "$src" .
'' else "";
buildPhase = "true";
installPhase =
if lib.hasSuffix "dmg" src then
''
install -Dm755 "$src" -t "$out/Applications"
''
else
''
mkdir -p "$out"
rsync -rv opt/ usr/ "$out/"
'';
meta = with lib; {
homepage = "https://im.qq.com";
description = "New QQ based on Electron";
license = licenses.unfree;
platforms = [ "x86_64-linux" "aarch64-linux" "loong64-linux" "x86_64-darwin" "aarch64-darwin" ];
};
}
After nix-build
, I try to run result/QQ/qq
, but get
[1368667:0522/120115.839359:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser”
[1368667:0522/120115.839380:ERROR:select_file_dialog_linux_portal.cc(242)] Failed to read portal version property
zsh: trace trap (core dumped) result/QQ/qq
What something wrong I did? Thanks for any suggestion.