Skip to content

legendsviewer-next: init at 1.2.0 #405918

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

donottellmetonottellyou
Copy link

@donottellmetonottellyou donottellmetonottellyou commented May 10, 2025

Add legendsviewer-next

Commits

  • maintainers: add donottellmetnottellyou
  • legendsviewer-next: init at 1.2.0

Description

World Overview Screenshot
LegendsViewer-Next is a cross-platform revamp (by the same author) of the original Windows-only LegendsViewer, a legends-mode explorer for the indie game Dwarf Fortress. LegendsViewer-Next supports world information overviews, maps, populations, war/battle death tolls, and has a very user-friendly interface.

LegendsViewer-Next hosts a web app on port 8081 with the api on port 5054. Its configuration on Linux is stored at ~/.config/LegendsViewer, currently only bookmarks.json.

Tests

Currently, there is one unit test, which makes sure the frontend serves an html document and the backend reports the correct version, and both are working.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label May 10, 2025
@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label May 10, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 10, 2025
@donottellmetonottellyou donottellmetonottellyou force-pushed the donottellmetonottellyou/legendsviewer-next branch 8 times, most recently from 390bd38 to a1f5d94 Compare May 12, 2025 11:24
@donottellmetonottellyou
Copy link
Author

@ofborg eval

@donottellmetonottellyou donottellmetonottellyou force-pushed the donottellmetonottellyou/legendsviewer-next branch 2 times, most recently from 219c7a9 to 2f45df8 Compare May 12, 2025 21:56
@donottellmetonottellyou donottellmetonottellyou changed the title Add LegendsViewer-Next legendsviewer-next: init at 1.2.0 May 14, 2025
@donottellmetonottellyou
Copy link
Author

@NixOS/dotnet

First time contributor here. If someone is willing, could someone take a look at this?

It also has a node subpackage, not sure who to tag about that.

@donottellmetonottellyou donottellmetonottellyou force-pushed the donottellmetonottellyou/legendsviewer-next branch from 604cd7d to 0bd483c Compare May 29, 2025 16:57
@donottellmetonottellyou
Copy link
Author

donottellmetonottellyou commented May 29, 2025

Updated base to latest nixpkgs-unstable

@donottellmetonottellyou
Copy link
Author

Hey, @GGG-KILLER , if you have time/ are able, could you look at this package pull request? I just updated the base, but it was passing ofberg checks before. Thanks in advance!

@GGG-KILLER
Copy link
Contributor

Oh hello, I'm sorry, didn't see this, my bad.

I'm a bit busy right now but I'll make sure to have this reviewed by tomorrow!

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-channel-forcing-an-update/64940/1

Copy link
Contributor

@GGG-KILLER GGG-KILLER left a comment

Choose a reason for hiding this comment

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

.NET code looks okay to me, haven't attempted to build it myself though.

@GGG-KILLER
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 405918
Commit: 0bd483cd25d7905433980b7e014a6a2e2443cc14


x86_64-linux

✅ 1 package built:
  • legendsviewer-next

Copy link
Contributor

@GGG-KILLER GGG-KILLER left a comment

Choose a reason for hiding this comment

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

Code looks fine, app builds and runs (haven't tested functionality, but web UI opens) and tests also pass.

@GGG-KILLER GGG-KILLER added the 12.approvals: 1 This PR was reviewed and approved by one person. label May 30, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5587

@donottellmetonottellyou
Copy link
Author

@emaryn

I tested these changes on my system, it should be working on the latest nixpkgs-unstable

Done:

  • Merge tests into installCheckPhase
  • Merge backend into package.nix
    • Remove unnecessary let in in backend
  • Remove whitespace

The only question I have is about the tests.

By nature of it being a server/web app, it opens two ports. The build could fail due to system state in a non reproducible way. Exacerbating this are the ports chosen, web app on port 8081 with the API on port 5054 (I may suggest changes upstream).

I think the web app should fail to run at runtime due to this, not fail to build. So is there a reason we aren't using passthru to avoid the tests being run on the user system (it also would shave off 5-10 seconds off the build)?

@donottellmetonottellyou
Copy link
Author

@GGG-KILLER

@emaryn seems to have been deleted off of GitHub and their suggestions removed. Are there any other reviewers you would suggest? Thanks.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5758

Copy link
Member

@SuperSandro2000 SuperSandro2000 left a comment

Choose a reason for hiding this comment

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

Also please squash the package commits into one init commit. The maintainer commit should stay extra.

@donottellmetonottellyou donottellmetonottellyou force-pushed the donottellmetonottellyou/legendsviewer-next branch 2 times, most recently from f332234 to f8212c4 Compare August 13, 2025 23:11
This adds legendsviewer-next, a Dwarf Fortress exported legends viewer
@donottellmetonottellyou donottellmetonottellyou force-pushed the donottellmetonottellyou/legendsviewer-next branch from f8212c4 to a5bb05f Compare August 21, 2025 20:09
@donottellmetonottellyou
Copy link
Author

#405918 (comment) did not work on darwin due to how it handles dangling processes.

The server needs to be spawned and waited until it's ready (by watching stdout), then killed after when we are done testing.

It turns out coproc is perfect for this, so I used that instead. Hopefully no other darwin-related incompatibilities result.

@ofborg eval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 1 This PR was reviewed and approved by one person. 12.first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants