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

Added micronucleus #76621

Merged
merged 3 commits into from Jan 2, 2020
Merged

Added micronucleus #76621

merged 3 commits into from Jan 2, 2020

Conversation

cab404
Copy link
Member

@cab404 cab404 commented Dec 28, 2019

Motivation for this change

Micronucleus is a nice bootloader for ATTiny boards, and is used by Digispark. This is a command line tool to flash stuff into it.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@cab404
Copy link
Member Author

cab404 commented Jan 1, 2020

Up?

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, and stepping up as a maintainer! Some comments.

maintainers/maintainer-list.nix Show resolved Hide resolved
pkgs/development/tools/misc/micronucleus/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/misc/micronucleus/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/misc/micronucleus/default.nix Outdated Show resolved Hide resolved
mkdir -p $out/bin
mkdir -p $out/lib/udev
cp micronucleus $out/bin
cp 49-micronucleus.rules $out/lib/udev
Copy link
Contributor

Choose a reason for hiding this comment

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

Future work, not needed for this PR:

You might want to PR a makefile change upstream, which updates their install taget to use DESTDIR and installs the udev rule too.

We'd then only need to set makeFlags = [ "DESTDIR=$(out)" ];, and could drop the custom installPhase alltogether for the next release.

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

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

Also, format your commit messages according to CONTRIBUTING.md.

@cab404 cab404 force-pushed the micronucleus branch 2 times, most recently from 28f9643 to bce79e6 Compare January 1, 2020 18:56
@cab404
Copy link
Member Author

cab404 commented Jan 1, 2020

Also, format your commit messages according to CONTRIBUTING.md.

Done

@cab404 cab404 requested a review from flokli January 1, 2020 21:28
@flokli
Copy link
Contributor

flokli commented Jan 1, 2020 via email

@cab404
Copy link
Member Author

cab404 commented Jan 1, 2020 via email

@flokli
Copy link
Contributor

flokli commented Jan 1, 2020

@GrahamcOfBorg build micronucleus

@flokli
Copy link
Contributor

flokli commented Jan 1, 2020

Build fails on darwin, because upstreams makefile hardcodes CC to gcc, which doesn't exist there.

You could try setting CC = if stdenv.isDarwin then "clang" else "cc"; if that's all to get it working, or add remove darwin from meta.platforms.

@cab404
Copy link
Member Author

cab404 commented Jan 2, 2020

Build fails on darwin, because upstreams makefile hardcodes CC to gcc, which doesn't exist there.

You could try setting CC = if stdenv.isDarwin then "clang" else "cc"; if that's all to get it working, or add remove darwin from meta.platforms.

can i just use clang then?

@cab404
Copy link
Member Author

cab404 commented Jan 2, 2020

@GrahamcOfBorg build micronucleus

1 similar comment
@flokli
Copy link
Contributor

flokli commented Jan 2, 2020 via email

@flokli flokli merged commit 1c9af6e into NixOS:master Jan 2, 2020
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

2 participants