Packaging Agordejo: Qt: Session management error: Could not open network socket

Hello,

I’m trying to compile and run Agordejo. It compiles fine, but when I run it, I get an error:

$ ./result/bin/agordejo 
Qt: Session management error: Could not open network socket

I tried to run before export -n SESSION_MANAGER, the error diseapear, but then the program just stop working… Any idea how I could finish to package Agordejo?

Thanks!

default.nix contains:

{ pkgs ? import <nixpkgs> {} }:
pkgs.qt5.callPackage ./derivation.nix {}

derivation.nix contains (compilation with nix-build):

{ mkDerivation, lib, stdenv, fetchurl, non, bash, autoPatchelfHook, python3, wrapGAppsHook }:

mkDerivation rec {
  version = "0.2.1";
  pname = "Agordejo";

  src = fetchurl {
    url = "https://git.laborejo.org/lss/Agordejo/archive/v${version}.tar.gz";
    sha256 = "fbutWVn0AkBfYCugRAypeR8LLKRlDkxIpMkGLWmBHT8=";
  };

  nativeBuildInputs = [ autoPatchelfHook wrapGAppsHook ];
  propagatedBuildInputs = [ non (python3.withPackages (ps: with ps; [pyqt5])) ];


  preConfigure = ''
    patchShebangs ./configure
  '';

  meta = {
    # description = "";
    # homepage = https://;
    # license = stdenv.lib.licenses.;
    # maintainers = [ stdenv.lib.maintainers. ];
    # platforms = stdenv.lib.platforms.;
  };
}