mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchCrate
|
|
, pkg-config
|
|
, udev
|
|
, avrdude
|
|
, makeBinaryWrapper
|
|
, nix-update-script
|
|
, testers
|
|
, ravedude
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "ravedude";
|
|
version = "0.1.8";
|
|
|
|
src = fetchCrate {
|
|
inherit pname version;
|
|
hash = "sha256-AvnojcWQ4dQKk6B1Tjhkb4jfL6BJDsbeEo4tlgbOp84=";
|
|
};
|
|
|
|
cargoHash = "sha256-HeFmQsgr6uHrWi6s5sMQ6n63a44Msarb5p0+wUzKFkE=";
|
|
|
|
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 {
|
|
package = ravedude;
|
|
version = "v${version}";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Tool to easily flash code onto an AVR microcontroller with avrdude";
|
|
homepage = "https://crates.io/crates/ravedude";
|
|
license = with licenses; [ mit /* or */ asl20 ];
|
|
platforms = platforms.linux;
|
|
maintainers = with maintainers; [ rvarago liff ];
|
|
mainProgram = "ravedude";
|
|
};
|
|
}
|