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
Contributor

@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
Contributor Author

@cab404 cab404 commented Jan 1, 2020

Up?

Copy link
Contributor

@flokli flokli left a comment

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

This comment has been minimized.

@flokli

flokli Jan 1, 2020
Contributor

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

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

@cab404 cab404 force-pushed the cab404:micronucleus branch 2 times, most recently from 28f9643 to bce79e6 Jan 1, 2020
@cab404
Copy link
Contributor Author

@cab404 cab404 commented Jan 1, 2020

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

Done

@cab404 cab404 requested a review from flokli Jan 1, 2020
@flokli
Copy link
Contributor

@flokli flokli commented Jan 1, 2020

@cab404 cab404 force-pushed the cab404:micronucleus branch from bce79e6 to 8c7473e Jan 1, 2020
@cab404
Copy link
Contributor Author

@cab404 cab404 commented Jan 1, 2020

@flokli
Copy link
Contributor

@flokli flokli commented Jan 1, 2020

@GrahamcOfBorg build micronucleus

@flokli
Copy link
Contributor

@flokli 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
Contributor Author

@cab404 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
Contributor Author

@cab404 cab404 commented Jan 2, 2020

@GrahamcOfBorg build micronucleus

1 similar comment
@flokli
Copy link
Contributor

@flokli flokli commented Jan 2, 2020

@flokli
flokli approved these changes Jan 2, 2020
@flokli flokli merged commit 1c9af6e into NixOS:master Jan 2, 2020
16 checks passed
16 checks passed
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
micronucleus on aarch64-linux Success
Details
micronucleus on x86_64-darwin Success
Details
micronucleus on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.