Skip to content

mphidflash: init at version 1.8 #426213

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

jaschutte
Copy link

Creates a package for mphidflash. Despite mphidflash being an older tool not really being updated anymore, it remains very useful for flashing older PIC devices.

More information can be found here:
https://github.com/AdamLaurie/mphidflash

I also add myself as a maintainer to the maintainers list and set myself as package maintainer.

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 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 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, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

@jaschutte jaschutte changed the title mphidflash: new package at version 1.8 mphidflash: init at version 1.8 Jul 17, 2025
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle! 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jul 17, 2025

installPhase = ''
mkdir -p $out/bin
cp binaries/mphidflash-1.8-linux-64 $out/bin/mphidflash
Copy link
Member

Choose a reason for hiding this comment

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

could probably just use installBin in postInstall instead

Copy link
Author

Choose a reason for hiding this comment

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

That would require bringing in installShellFiles as a dependency, it also doesn't make the derivation any clearer as the the project's makefile doesn't work for Nix (it tries copying files to /usr/bin/...). So it'd need to be overwritten anyways and the installed command should be renamed mphidflash.

I did make it run runHook {pre,post}Install though

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 18, 2025
Adds myself as maintainer for mphidflash package
@jaschutte
Copy link
Author

I addressed your feedback, if you could take look at it again I'd be grateful!

@jaschutte jaschutte force-pushed the new-mphidflash branch 2 times, most recently from 2d05b49 to c668570 Compare July 18, 2025 13:11
@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jul 18, 2025
'';

meta = {
description = "'mphidflash' is a simple command-line tool for communicating with Microchips USB HID-Bootloader and downloading new firmware.";
Copy link

Choose a reason for hiding this comment

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

Suggested change
description = "'mphidflash' is a simple command-line tool for communicating with Microchips USB HID-Bootloader and downloading new firmware.";
description = "Command-line tool for communicating with Microchips USB HID-Bootloader and downloading new firmware";

Not start with the package name.
Not end with a period (or any punctuation for that matter).

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the feedback! I implemented the change.

owner = "AdamLaurie";
repo = "mphidflash";
rev = "d65bedd3f564a5d91b29e06b4a5885c32780acc5";
sha256 = "sha256-akQjkkbGxkurBifTZuI+iVs8O2i8MM0LgMUYztg5hzE=";
Copy link

Choose a reason for hiding this comment

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

Suggested change
sha256 = "sha256-akQjkkbGxkurBifTZuI+iVs8O2i8MM0LgMUYztg5hzE=";
hash = "sha256-akQjkkbGxkurBifTZuI+iVs8O2i8MM0LgMUYztg5hzE=";

use hash for sri hash

Copy link
Author

Choose a reason for hiding this comment

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

Done!

Creates a package for mphidflash. Despite mphidflash being an older tool
not really being updated anymore, it remains very useful for flashing
older PIC devices.
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: 0 This PR does not cause any packages 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.

2 participants