Change:
When I run Scilab it shows this error and does not run: This fixed when I installed from APT. Steps to reproduce the behavior: Run. is not in nix repository. <!-- Please @ people who are in the list of the offending package or module. If in doubt, check for whoever last touched something. -- Please run and paste the result.
Oh, I actually only maintain the macOS part, and I don't have an x86_64 machine, sadly. Is the Linux part of the package unmaintained?
I don't know. No one is in maintaners list in I mention other contributors from .
The linux version is very out of date.

Discussion:
<del> { lib, stdenv, fetchurl, undmg, makeWrapper, xorg }: </del> <ins> { lib , stdenv , fetchurl , makeWrapper , undmg , autoPatchelfHook , alsa-lib , ncurses5 , xorg }: </ins> let pname = "scilab-bin";

platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ]; sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; license = lib.licenses.gpl2Only; <ins> mainProgram = "scilab"; </ins> }; darwin = stdenv.mkDerivation rec { inherit pname version src meta; <del> nativeBuildInputs = [ undmg makeWrapper ]; </del> <ins> nativeBuildInputs = [ makeWrapper undmg ]; </ins> sourceRoot = "scilab-${version}.app"; installPhase = '' <ins> runHook preInstall </ins> mkdir -p $out/{Applications/scilab.app,bin} cp -R . $out/Applications/scilab.app makeWrapper $out/{Applications/scilab.app/Contents/MacOS,bin}/scilab <ins> runHook postInstall </ins> ''; }; linux = stdenv.mkDerivation rec { inherit pname version src meta; <del> libPath = lib.makeLibraryPath [ stdenv.cc.cc xorg.libX11 xorg.libXext xorg.libXi xorg.libXrender xorg.libXtst xorg.libXxf86vm ]; fixupPhase = '' sed -i 's|$(/bin/|$(|g' bin/scilab sed -i 's|/usr/bin/||g' bin/scilab sci="$out/opt/scilab-${version}" fullLibPath="$sci/lib/scilab:$sci/lib/thirdparty:$libPath" fullLibPath="$fullLibPath:$sci/lib/thirdparty/redist" patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker)  --set-rpath "$fullLibPath" bin/scilab-bin find . -name '*.so' -type f | while read file; do patchelf --set-rpath "$fullLibPath" "$file" 2>/dev/null done ''; installPhase = '' mkdir -p "$out/opt/scilab-${version}" cp -r . "$out/opt/scilab-${version}/" # Create bin/ dir mkdir "$out/bin" # Creating executable symlinks ln -s "$out/opt/scilab-${version}/bin/scilab" "$out/bin/scilab" ln -s "$out/opt/scilab-${version}/bin/scilab-cli" "$out/bin/scilab-cli" ln -s "$out/opt/scilab-${version}/bin/scilab-adv-cli" "$out/bin/scilab-adv-cli" </del> <ins> nativeBuildInputs = [ autoPatchelfHook ]; buildInputs = [ alsa-lib ncurses5 stdenv.cc.cc ] ++ (with xorg; [ libX11 libXcursor libXext libXft libXi libXrandr libXrender libXtst libXxf86vm ]); </ins> <del> # Creating desktop config dir mkdir -p "$out/share/applications" # Moving desktop config files mv $out/opt/scilab-${version}/share/applications/*.desktop $out/share/applications # Fixing Exec paths and launching each app with a terminal sed -i -e "s|Exec=|Exec=$out/opt/scilab-${version}/bin/|g"  -e "s|Terminal=.*$|Terminal=true|g" $out/share/applications/*.desktop # Moving icons to the appropriate locations for path in $out/opt/scilab-${version}/share/icons/hicolor/*/*/* do newpath=$(echo $path | sed 's|/opt/scilab-${version}||g') filename=$(echo $path | sed 's|.*/||g') dir=$(echo $newpath | sed "s|$filename||g") mkdir -p $dir mv $path $newpath done # Removing emptied folders rm -rf $out/opt/scilab-${version}/share/{applications,icons} # Moving other share/ folders mv $out/opt/scilab-${version}/share/{appdata,locale,mime} $out/share ''; </del> <ins> installPhase = '' runHook preInstall mkdir -p $out mv -t $out bin include lib share thirdparty sed -i  -e 's|$(/bin/|$(|g'  -e 's|/usr/bin/||g'  $out/bin/{scilab,xcos} sed -i  -e "s|Exec=|Exec=$out/bin/|g"  -e "s|Terminal=.*$|Terminal=true|g"  $out/share/applications/*.desktop runHook postInstall ''; </ins> }; in if stdenv.isDarwin then darwin else linux