Unverified Commit 276846c3 authored by Olli Helenius's avatar Olli Helenius
Browse files

ravedude: ensure avrdude is in the PATH

ravedude attempts to execute `avrdude` from the current `PATH` and
unless the user has separately installed `avrdude`, that will fail.
parent c943e752
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -3,6 +3,8 @@
, fetchCrate
, pkg-config
, udev
, avrdude
, makeBinaryWrapper
, nix-update-script
, testers
, ravedude
@@ -19,10 +21,14 @@ rustPlatform.buildRustPackage rec {

  cargoHash = "sha256-HeFmQsgr6uHrWi6s5sMQ6n63a44Msarb5p0+wUzKFkE=";

  nativeBuildInputs = [ pkg-config ];
  nativeBuildInputs = [ pkg-config makeBinaryWrapper ];

  buildInputs = [ udev ];

  postInstall = ''
    wrapProgram $out/bin/ravedude --suffix PATH : ${lib.makeBinPath [ avrdude ]}
  '';

  passthru = {
    updateScript = nix-update-script { };
    tests.version = testers.testVersion {