{ lib, pkg-config, rustPlatform, stdenv, systemdLibs, fetchFromGitHub, nix-update-script, }: rustPlatform.buildRustPackage (finalAttrs: { pname = "sftool"; version = "0.2.5"; src = fetchFromGitHub { owner = "OpenSiFli"; repo = "sftool"; tag = finalAttrs.version; hash = "sha256-ty95ZIFztbYOzdNfWNiDbPNbY3Jqyz2e2PZphPWE1mA="; }; cargoHash = "sha256-0V+n6QhKfzQVy6emzNX6178PtYTaHVSWL5tW5BvqEpU="; nativeBuildInputs = [ pkg-config ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ systemdLibs # libudev-sys ]; passthru.updateScript = nix-update-script { }; meta = { description = "Download tool for the SiFli family of chips"; homepage = "https://github.com/OpenSiFli/sftool"; license = lib.licenses.asl20; maintainers = [ ]; mainProgram = "sftool"; }; })