I would like to package AzureBlobStorage for which no source is available. The recipe is below. Building works but executing the result crashes:
$ ./result/share/azure-storage-explorer/StorageExplorer
[2023-08-10T15:30:39.785Z] (main:1977360) <NONE> Log file: /home/cassou/.config/StorageExplorer/logs/2023-08-10_173039/2023-08-10_173039_main_1977360.log
[2023-08-10T15:30:39.787Z] (main:1977360) <NONE> Log level: info
[2023-08-10T15:30:39.788Z] (main:1977360) <INFO> Startup app state: {
lastWindowState: { rect: { x: 8, y: 8, width: 1904, height: 1037 }, maximized: false },
disableGpu: false,
dialogAutoResponse: {}
}
Trace/breakpoint trap (core dumped)
[1977364:0100/000000.728726:ERROR:zygote_linux.cc(622)] Zygote could not fork: process_type gpu-process numfds 3 child_pid -1
[1977364:0100/000000.728793:ERROR:zygote_linux.cc(654)] write: Broken pipe (32)
Here is the recipe I wrote:
{
stdenv
, lib
, autoPatchelfHook
, fetchurl
, installShellFiles
, makeWrapper
, alsa-lib
, atk
, cairo
, cups
, libdrm
, mesa # for gbm
, gtk3
, nspr
, nss
, libsecret
}:
stdenv.mkDerivation rec {
pname = "azure-storage-explorer";
version = "1.30.2";
src = fetchurl {
url = "https://github.com/microsoft/AzureStorageExplorer/releases/download/v${version}/StorageExplorer-linux-x64.tar.gz";
hash = "sha256-ZQZr1rSAxOOlMVsgp6YjsRJ3huFlBv73u3UrNIRMncQ=";
};
unpackCmd = ''
mkdir AzureStorageExplorer && cd AzureStorageExplorer
_defaultUnpack "$curSrc"
cd ..
'';
installPhase = ''
mkdir -p $out/share/${pname}
mv * $out/share/${pname}
wrapProgram \
$out/share/${pname}/StorageExplorerExe \
--set LD_LIBRARY_PATH "${stdenv.cc.cc.lib}/lib"
'';
nativeBuildInputs = [ installShellFiles ] ++ lib.optionals stdenv.isLinux [ autoPatchelfHook makeWrapper ];
buildInputs = [
stdenv.cc.cc.lib
stdenv.cc.cc.libgcc
alsa-lib
atk
cairo
cups
libdrm
mesa
gtk3
nspr
nss
libsecret
];
meta = with lib; {
homepage = "https://github.com/microsoft/AzureStorageExplorer";
description = "Easily manage the contents of your azure storage account";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [DamienCassou];
};
}