Skip to content

run_uvloop not loaded | NIX  #361

@elliott-farrall

Description

@elliott-farrall

I (among others) would be very interested in seeing this included in nixpkgs. I had a go at writing a derivation myself but am having trouble with run_uvloop.

I managed to get the installer to start but it crashes when trying to load run_uvloop from ~/.config/wljs-notebook/wl_packages/KirillBelov_CSockets/LibraryResources/Linux-x86-64-v<version>/usockets.so. It tries version 7, 6 (failing to load on both) and then 5 (failing since it does not exist).

I have linked in libuv by wrapping the executable like so:

{
  lib,
  stdenv,
  fetchzip,
  makeWrapper,
  glib,
  ffmpeg,
  nss,
  nspr,
  dbus,
  atk,
  cups,
  libdrm,
  gtk3,
  pango,
  cairo,
  xorg,
  libgbm,
  expat,
  libxkbcommon,
  alsa-lib,
  libuv,
  libGL
}:

stdenv.mkDerivation rec {
  pname = "wolfram-js-frontend";
  version = "2.7.0";

  src = fetchzip {
    url = "https://github.com/JerryI/wolfram-js-frontend/releases/download/v${version}/wljs-notebook-${version}-x64-gnulinux.zip";
    hash = "sha256-dvJ9P4+Ym7seAS0gn+BINlsL4+OsWqOSWTyYSDoHAxs=";
    stripRoot = false;
  };

  nativeBuildInputs = [ makeWrapper ];

  installPhase = ''
    runHook preInstall

    makeWrapper $src/wljs-notebook $out/bin/wolfram-js-frontend \
      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ glib ffmpeg nss nspr dbus atk cups libdrm gtk3 pango cairo xorg.libX11 xorg.libXcomposite xorg.libXdamage xorg.libXext xorg.libXfixes xorg.libXrandr libgbm expat xorg.libxcb libxkbcommon alsa-lib libuv libGL ]}"

    runHook postInstall
  '';

  meta = {
    description = "Freeware notebook environment for Wolfram Language written in Javascript";
    homepage = "https://github.com/JerryI/wolfram-js-frontend";
    license = lib.licenses.gpl3Only;
    # maintainers = with lib.maintainers; [ ];
    mainProgram = "wolfram-js-frontend";
    platforms = lib.platforms.all;
  };
}

I understand that not many people use nixpkgs but any pointers on what might be causing this would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions