Unverified Commit 6ced9c67 authored by Rick van Schijndel's avatar Rick van Schijndel Committed by GitHub
Browse files

ravedude: ensure avrdude is in the PATH (#270209)

parents b1428c8f 467bb5ba
Loading
Loading
Loading
Loading
+8 −2
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 {
@@ -36,7 +42,7 @@ rustPlatform.buildRustPackage rec {
    homepage = "https://crates.io/crates/ravedude";
    license = with licenses; [ mit /* or */ asl20 ];
    platforms = platforms.linux;
    maintainers = with maintainers; [ rvarago ];
    maintainers = with maintainers; [ rvarago liff ];
    mainProgram = "ravedude";
  };
}