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

draupnir: init at 2.0.0-beta.6 #342893

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

Conversation

winterqt
Copy link
Member

@winterqt winterqt commented Sep 18, 2024

Description of changes

This supersedes the package portion of #274052, as discussed in Matrix, by packaging Draupnir in a way that is:

  • future-proof (won't break when they move to Yarn v4),
  • more correct (patches better-sqlite3 to link against our SQLite3, with thanks to @lf- for the inspiration),
  • and easier to maintain (doesn't use mkYarnPackage, thus requires slightly less work, like no manual wrapping being required).

However, this has the caveat that it requires a vendored package-lock.json. Sorry!

This needs testers! I'm not sure if I can just drop in the Mjölnir module and test it or not, though I guess someone can just test it with the module from #274052.

Thanks to @TheArcaneBrony for creating the original PRs and the module, which will continue to be worked on in that PR.

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.


# TODO: move to preNpmRebuild
preBuild = ''
rm -r node_modules/better-sqlite3/{build,deps/common.gypi,deps/sqlite3.gyp,deps/sqlite3}
Copy link
Member Author

Choose a reason for hiding this comment

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

# Remove things we know we don't need that just increase closure size.

Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't that still needed for sqlite?

nativeBuildInputs = [ pkg-config ];
buildInputs = [ sqlite ];

# TODO: move to preNpmRebuild
Copy link
Member Author

Choose a reason for hiding this comment

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

Unsure yet if I'd like to do this in this PR (would decrease build time by a bit), but we'll see after it gets tested.

uses across an entire homeserver.
'';
license = licenses.afl3;
maintainers = with maintainers; [ winter ];
Copy link
Member Author

Choose a reason for hiding this comment

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

@TheArcaneBrony Do let me know if you'd like to be added as a maintainer.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, sounds good

Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC vendored package-lock.json was why the Draupnir package was rewritten from scratch

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.

2 participants