Skip to content

Conversation

baileyluTCD
Copy link
Contributor

Initialized the rp2040js package, a javascript based emulator for the raspberry pi pico rp2040.

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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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.

It should be mentioned that by default the original repository is mainly geared towards usage as a library. Hence, the main module of index.ts is not usable in any fashion from the command line, and instead demo/emulator-run.ts is, which is intended by the authors. Hence the rp2040js binary provided to this package maps to npm run start. This is accomplished via the patch to the tsconfig.json file.

Also of note is that when no --image flag is provided it will look for a binary file called hello_uart.hex in the base of the project to run instead. This was not provided here as I believe it does not make sense to bake into this package considering --image makes the most sense for regular use


Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 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. labels Jun 3, 2025
Copy link
Contributor

@JuliusFreudenberger JuliusFreudenberger left a comment

Choose a reason for hiding this comment

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

I have some minor comments and minor style suggestions which you don't necessarily have to implement.

@baileyluTCD
Copy link
Contributor Author

Hi, thanks for the review, just hoping to get a proper --version flag merged upstream for the testVersion integration test - I suppose I should probably mark this as a draft until then.

@baileyluTCD baileyluTCD marked this pull request as draft June 8, 2025 20:24
@JuliusFreudenberger
Copy link
Contributor

just hoping to get a proper --version flag merged upstream

IMO, the version flag and corresponding check are not strictly necessary for derivations. Of course it makes automatic updates easier, but in the meantime also manual testing updates can be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants