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

filius: init at 2.6.1 #326102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

filius: init at 2.6.1 #326102

wants to merge 1 commit into from

Conversation

rcmlz
Copy link

@rcmlz rcmlz commented Jul 10, 2024

Description of changes

Description of changes

Adding new package Filius https://www.lernsoftware-filius.de/

Filius is a Computer Network Simulator written in Java and distributed as .jar file.

With the software tool Filius, you can design computer networks yourself, simulate the exchange of messages in them and thus explore their structure and functionality experimentally. The target group are learners at secondary level in general education schools. Filius enables learning activities that are designed to support discovery-based learning in particular.

@auroraanna Unfortunately I got the other pull request messed up.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@auroraanna
Copy link
Contributor

what the fuck happened in #318005 ?

@auroraanna
Copy link
Contributor

anna is getting a hash mismatch:

trying https://web.archive.org/web/20240623122638/https://www.lernsoftware-filius.de/downloads/Setup/filius-2.5.1.zip

error: hash mismatch in fixed-output derivation '/nix/store/lay7zwpgqxkcxi20gw2a5a7sdx2zrps1-application-filius-project.xml.drv':
         specified: sha256-EyLoHhshTQYgVDOWPokpDH0AapX3aqtb+fAiWv2G51I=
            got:    sha256-5t7ydlj6r/WyYV4RA7Cwb8MlXINmrTqSMDn6ayeM3Jk=

@auroraanna
Copy link
Contributor

auroraanna commented Jul 10, 2024

i think we don't need

  • /java/Filius.exe
  • /java/Filius.command
  • /java/filius.sh
  • /java/Readme.md
  • /java/Einfuehrung_Filius.*
  • /java/Introduction_Filius.*
    …in the output unless these are used within the program. Not sure about the license files.

@rcmlz
Copy link
Author

rcmlz commented Jul 10, 2024

i think we don't need

* `/java/Filius.exe`

* `/java/Filius.command`

* `/java/filius.sh`

* `/java/Readme.md`

* `/java/Einfuehrung_Filius.*`

* `/java/Introduction_Filius.*`
  …in the output unless these are used within the program. Not sure about the license files.

Do you think that saving 5MB of disk space is worth the effort to cherry pick files from the .zip archive? In case folder names change, that has to be maintained. The current approach of "putting everything into $out/share/java/" is less sensitive to changes by upstream.

@rcmlz rcmlz force-pushed the filius branch 3 times, most recently from 179d410 to 8f10a5a Compare July 10, 2024 16:52
@ofborg ofborg bot requested a review from auroraanna July 10, 2024 17:43
@auroraanna
Copy link
Contributor

good point, it's way better for maintaining. it just kinda bugs me that there's some files that are unnescessary. let's see if other reviewers think it's fine?

@rcmlz rcmlz changed the title Adding Filius - Computer Network Simulator. filius: init at 2.5.1 Jul 12, 2024
@rcmlz
Copy link
Author

rcmlz commented Jul 12, 2024

good point, it's way better for maintaining. it just kinda bugs me that there's some files that are unnescessary. let's see if other reviewers think it's fine?

OK, let‘s see. If we finally do poke around with the readme and the tutorial files, perhaps instead of deleting it is better moving them to $HOME/.filius/ so that users can read them?

@auroraanna
Copy link
Contributor

that doesn't seem like an appropriate location. it won't be removed when uninstalling the software.

@rcmlz
Copy link
Author

rcmlz commented Aug 5, 2024

@auroraanna - so we leave it as it is? Is this PR ready to proceed? At the moment I use

nix run github:nixos/nixpkgs/pull/326102/head#filius --extra-experimental-features "nix-command flakes"

which is sort of ok, but of course would be better to have it in the standard packages.

@auroraanna
Copy link
Contributor

i checked that the .desktop entry and the icons work, but the gui colors are broken when you have a dark theme:
image

@auroraanna
Copy link
Contributor

auroraanna commented Aug 6, 2024

can we force light theme? it'd be better than terrible color contrast.

@auroraanna
Copy link
Contributor

@auroraanna - so we leave it as it is? Is this PR ready to proceed? At the moment I use

nix run github:nixos/nixpkgs/pull/326102/head#filius --extra-experimental-features "nix-command flakes"

which is sort of ok, but of course would be better to have it in the standard packages.

you can also nix profile install .#filius on your branch. but yeah, we should get this merged.

@auroraanna
Copy link
Contributor

can we force light theme? it'd be better than terrible color contrast.

GTK_THEME=Adwaita:light filius works but not sure if you can have a GTK installation without Adwaita.

@rcmlz
Copy link
Author

rcmlz commented Aug 6, 2024

Adwaita is for Gnome? I use mainly xfce. Is the dark/light theme issue something that should be solved by upstream?

@ofborg ofborg bot requested a review from auroraanna August 6, 2024 14:08
@auroraanna
Copy link
Contributor

i'd be good if upstream would solve it but i doubt it will happen. Adwaita is a GTK+ theme and filius only seems to be using GTK, not QT.

@auroraanna
Copy link
Contributor

GTK is not exclusively a GNOME thing. You can use GTK apps on KDE Plasma too, i am using Sway ftr.

@rcmlz rcmlz force-pushed the filius branch 2 times, most recently from c088195 to 70b9683 Compare August 11, 2024 16:26
@ofborg ofborg bot requested a review from auroraanna August 11, 2024 17:49
@auroraanna
Copy link
Contributor

i think the only problem i'm having now is that one of Filius's consoles, the line for entering commands has terrible contrast:
image
i don't think we can fix this though

@rcmlz
Copy link
Author

rcmlz commented Aug 25, 2024

I am also unaware of how to fix this. Is this error for you a show stopper? Shall we go on with this PR?

@auroraanna
Copy link
Contributor

I think we should merge it for now and try to contact the developer.

@rcmlz
Copy link
Author

rcmlz commented Aug 27, 2024

I found this on Gitlab: https://gitlab.com/filius1/filius/-/issues/94 - which addesses the black pattern issue.

Let's try the workaround given here: https://gitlab.com/filius1/filius/-/issues/94#note_1614047430

Someone provided me with a workaround : launching it with -Dswing.defaultlaf=javax.swing.plaf.metal.MetalLookAndFeel -Dswing.crossplatformlaf=javax.swing.plaf.metal.MetalLookAndFeel -Dswing.aatext=true -Dawt.useSystemAAFontSettings=on makes the terminal behave correctly.

@auroraanna
Copy link
Contributor

I can't detect any changes with those java options.

@auroraanna
Copy link
Contributor

it is unfortunate that we have to set Dawt.useSystemAAFontSettings. depending on what monitor you have, you might want to configure it differently.

@rcmlz
Copy link
Author

rcmlz commented Aug 28, 2024

In the comment on gitlab the maintainer of filius says that black as background is hardcoded. Then I would conclude that currently filius does not work 100% with dark theme. If a user likes to use the command line in filius the user should switch to a light theme. Nothing we can do about right now. Should we then go ahead and merge the PR?

@auroraanna
Copy link
Contributor

yes i am for merging now.

@donovanglover
Copy link
Member

Is it intentional that the email address you use for Git commits isn't associated with your GitHub account? See Setting your commit email address if you want to use GitHub's noreply email address.

@donovanglover
Copy link
Member

Since #316431 was merged, the maintainer commit should be removed from this PR.

Copy link
Member

@donovanglover donovanglover left a comment

Choose a reason for hiding this comment

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

I don't know enough about Java packaging to merge this but I left some comments.

pkgs/by-name/fi/filius/package.nix Show resolved Hide resolved
pkgs/by-name/fi/filius/package.nix Show resolved Hide resolved
Comment on lines 17 to 24
icon32 = fetchurl {
url = "https://gitlab.com/filius1/filius/-/raw/09fa7d5bdc60d5b4a2ab0e24311d54516a400913/src/deb/filius32.png";
sha256 = "sha256-sVsViRALhiVJFSxfVb9K6Q4M7Y2UEvZh6oOB9BQumh8=";
};
mimetype_xml = fetchurl {
url = "https://gitlab.com/filius1/filius/-/raw/09fa7d5bdc60d5b4a2ab0e24311d54516a400913/src/deb/application-filius-project.xml";
sha256 = "sha256-tChNuWlMuQtGeavQm12FDXCacfPTzFY8p/646WZnHDI=";
};
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
icon32 = fetchurl {
url = "https://gitlab.com/filius1/filius/-/raw/09fa7d5bdc60d5b4a2ab0e24311d54516a400913/src/deb/filius32.png";
sha256 = "sha256-sVsViRALhiVJFSxfVb9K6Q4M7Y2UEvZh6oOB9BQumh8=";
};
mimetype_xml = fetchurl {
url = "https://gitlab.com/filius1/filius/-/raw/09fa7d5bdc60d5b4a2ab0e24311d54516a400913/src/deb/application-filius-project.xml";
sha256 = "sha256-tChNuWlMuQtGeavQm12FDXCacfPTzFY8p/646WZnHDI=";
};

Let's make things easier by using the existing files in the source code.

pkgs/by-name/fi/filius/package.nix Outdated Show resolved Hide resolved
Comment on lines 50 to 70
desktopItems = [
(makeDesktopItem {
type = "Application";
name = "Filius";
desktopName = "Filius";
genericName = "Computer network simulator";
comment = "A computer network simulator for secondary schools";
icon = "filius";
exec = "filius";
terminal = false;
mimeTypes = [ "application/filius-project" ];
categories = [ "Education" ];
startupNotify = false;
extraConfig = {
"GenericName[en]" = "Computer network simulator";
"GenericName[de]" = "Computer-Netzwerksimulator";
"Comment[en]" = "A computer network simulator for secondary schools";
"Comment[de]" = "Ein Computer-Netzwerksimulator für Bildungszwecke";
};
})
];
Copy link
Member

Choose a reason for hiding this comment

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

We should use the upstream desktop file instead so everything stays in sync.

Copy link
Contributor

Choose a reason for hiding this comment

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

we would have to modify it

@rcmlz rcmlz changed the title filius: init at 2.5.1 filius: init at 2.6.1 Aug 29, 2024
@donovanglover donovanglover added the 6.topic: java Including JDK, tooling, other languages, other VMs label Aug 29, 2024
@auroraanna
Copy link
Contributor

currently failing to package this to build from source: https://gitlab.com/filius1/filius/-/issues/103

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.

3 participants