Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scilab-bin: adding application launchers #51363

Merged
merged 1 commit into from Dec 2, 2018

Conversation

Projects
None yet
3 participants
@fusion809
Copy link
Contributor

fusion809 commented Dec 2, 2018

Moving the desktop configuration files from opt/scilab-$ver/share/applications to share/applications, making the required changes, and moving the icons in opt/scilab-$ver/share/icons to share/icons.

Motivation for this change

Presently the scilab-bin package provides no application launchers for the Scilab, Scinotes and Xcos apps. In this PR I am adding these launchers.

On lines 76, 79 and 82 I am replacing Terminal=false with Terminal=true in the Scilab, Scinotes and Xcos desktop config files, as I've tried launching these apps using these launchers, without the Terminal=true change, and they always crash on start up. Changing to Terminal=true fixes this problem for all three apps.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Show resolved Hide resolved pkgs/applications/science/math/scilab-bin/default.nix Outdated
@worldofpeace
Copy link
Member

worldofpeace left a comment

Can you separate your commands, with comments, into groups like:

  • moving desktop files
  • moving icons
  • correcting content of desktop files

Without that visual hierarchy (or something similar) it's kind of thick to read.

Also why not using substituteInPlace instead of sed directly?

@fusion809

This comment has been minimized.

Copy link
Contributor Author

fusion809 commented Dec 2, 2018

Largely used sed as I know how to use it, I don't know how to use substituteInPlace. I'll add the comments.

@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Dec 2, 2018

Largely used sed as I know how to use it, I don't know how to use substituteInPlace.

substituteInPlace usually looks like:

substituteInPlace file \
  --replace pattern replacement

Though it isn't a problem if you don't use it.

@fusion809 fusion809 force-pushed the fusion809:patch-5 branch 2 times, most recently Dec 2, 2018

@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Dec 2, 2018

Are those changes satisfactory?

I think so. I'm verifying locally now.

@fusion809 fusion809 force-pushed the fusion809:patch-5 branch Dec 2, 2018

@fusion809

This comment has been minimized.

Copy link
Contributor Author

fusion809 commented Dec 2, 2018

My last commit is essentially me just making things more concise.

@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Dec 2, 2018

$out/opt/scilab-6.0.1/bin/scilab-cli doesn't execute and by extension the desktop file doesn't launch the application.

@fusion809

This comment has been minimized.

Copy link
Contributor Author

fusion809 commented Dec 2, 2018

Aha, lol, forgot to create the needed symlink.

@fusion809

This comment has been minimized.

Copy link
Contributor Author

fusion809 commented Dec 2, 2018

While I'm at it, do you know why there's scilab-${ver} and scilab-${majorVer} symlinks created in $out/bin? What purpose do these two symlinks serve?

@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Dec 2, 2018

While I'm at it, do you know why there's scilab-${ver} and scilab-${majorVer} symlinks created in $out/bin? What purpose do these two symlinks serve?

I don't really know. You could try removing them and see if it works. Git blame reveals that its always been here.

@fusion809 fusion809 force-pushed the fusion809:patch-5 branch 2 times, most recently Dec 2, 2018

@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Dec 2, 2018

Btw, executing scilab-cli gets this in the output

result/opt/scilab-6.0.1/bin/scilab-cli-bin: No such file or directory

So I guess the bash script scilab wants to run this binary, which is unpatched.

Possibly something to fix later.

@fusion809

This comment has been minimized.

Copy link
Contributor Author

fusion809 commented Dec 2, 2018

Ah, that is unexpected.

@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Dec 2, 2018

Would you mind moving $out/opt/scilab-6.0.1/share/{appdata,locale,mime} to $out/share? Though I'm not certain about locale. Possibly a separate commit too.

@fusion809 fusion809 force-pushed the fusion809:patch-5 branch Dec 2, 2018

Show resolved Hide resolved pkgs/applications/science/math/scilab-bin/default.nix Outdated
scilab-bin: adding application launchers
Moving the desktop configuration files from
opt/scilab-$ver/share/applications to share/applications, making the
required changes, and moving the icons in opt/scilab-$ver/share/icons to
share/icons. Moving locales, appdata and mime out of there
opt/scilab-${ver} too. Also removing unneeded scilab-${ver} and
scilab-${majorVer} symlinks from bin/.

@fusion809 fusion809 force-pushed the fusion809:patch-5 branch to 10f40f3 Dec 2, 2018

@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Dec 2, 2018

Now I'm going to check if it builds FTR

@GrahamcOfBorg build scilab-bin

@worldofpeace worldofpeace merged commit 007dafc into NixOS:master Dec 2, 2018

9 checks passed

grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@worldofpeace

This comment has been minimized.

Copy link
Member

worldofpeace commented Dec 2, 2018

@fusion809 Thanks for contributing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.