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

fusion809
Copy link
Contributor

@fusion809 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.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor Author

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

@worldofpeace
Copy link
Contributor

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 patch-5 branch 2 times, most recently from 35a4da6 to 8481f81 Compare December 2, 2018 06:18
@worldofpeace
Copy link
Contributor

Are those changes satisfactory?

I think so. I'm verifying locally now.

@fusion809
Copy link
Contributor Author

fusion809 commented Dec 2, 2018

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

@worldofpeace
Copy link
Contributor

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

@fusion809
Copy link
Contributor Author

Aha, lol, forgot to create the needed symlink.

@fusion809
Copy link
Contributor Author

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
Copy link
Contributor

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 patch-5 branch 2 times, most recently from ae71151 to 725912e Compare December 2, 2018 06:56
@worldofpeace
Copy link
Contributor

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
Copy link
Contributor Author

Ah, that is unexpected.

@worldofpeace
Copy link
Contributor

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.

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/.
@worldofpeace
Copy link
Contributor

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
@worldofpeace
Copy link
Contributor

@fusion809 Thanks for contributing ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants