I’m trying to create a derivation of tastyworks based on PKGBUILD - aur.git - AUR Package Repositories
# derivation.nix
{ stdenv, lib, makeWrapper, fetchurl
, dpkg, wrapGAppsHook, autoPatchelfHook
, gtk3, cairo, pango, atk, gdk-pixbuf, glib
, at-spi2-atk, dbus, libX11, libxcb, libXi
, libXcursor, libXdamage, libXrandr, libXcomposite
, libXext, libXfixes, libXrender, libXtst, libXScrnSaver
, nss, nspr, alsaLib, cups, fontconfig, expat
, libudev0-shim, glibc, curl, openssl, libnghttp2, gsettings-desktop-schemas, libGL
, jre
}:
stdenv.mkDerivation rec {
pname = "tastyworks";
version = "1.14.4";
src = fetchurl {
url = "https://download.tastyworks.com/desktop-1.x.x/${version}/tastyworks-${version}-1_amd64.deb";
hash = "sha256-/ciJ0vgOkKnArdPPChifmS4B0VT36F1vYbADLu9r9/I=";
};
buildInputs = [
gsettings-desktop-schemas
glib
gtk3
cairo
pango
atk
gdk-pixbuf
at-spi2-atk
dbus
libX11
libxcb
libXi
libXcursor
libXdamage
libXrandr
libXcomposite
libXext
libXfixes
libXrender
libXtst
libXScrnSaver
nss
nspr
alsaLib
cups
fontconfig
expat
libGL
];
nativeBuildInputs = [
autoPatchelfHook
wrapGAppsHook
# makeWrapper
dpkg
];
runtimeLibs = lib.makeLibraryPath [ libGL libX11 ];
unpackPhase = ''
dpkg-deb -x $src .
'';
installPhase = ''
mkdir -p $out/share $out/bin $out/lib
mv opt/tastyworks/bin/tastyworks $out/bin/
mv opt/tastyworks/lib $out
mv opt/tastyworks/share/doc $out
'';
preFixup = ''
gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "${runtimeLibs}" )
'';
meta = with lib; {
homepage = "https://tastyworks.com";
description = "software trading platform for tastyworks";
license = licenses.unfree;
platforms = platforms.linux;
maintainers = [ ];
};
}
When I build it and try to run it I get this error.
$ nix build
$ ./result/bin/tastyworks
.tastyworks-wrapped No main class specified
.tastyworks-wrapped Failed to launch JVM
What am I missing here? It seems that the arch PKGBUILD builds the software with the bundled java runtime. It also works if I unpack the .deb
and run the executable with steam-run
.