nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 pkg-config,
4 rustPlatform,
5 stdenv,
6 systemdLibs,
7 fetchFromGitHub,
8 nix-update-script,
9}:
10
11rustPlatform.buildRustPackage (finalAttrs: {
12 pname = "sftool";
13 version = "0.1.19";
14 src = fetchFromGitHub {
15 owner = "OpenSiFli";
16 repo = "sftool";
17 tag = finalAttrs.version;
18 hash = "sha256-64U7meXI8BTpve7nKmizR857QgFH9sjHVvCIfSK2dFQ=";
19 };
20
21 cargoHash = "sha256-FdGr0n+PvE6mFx+F4Fdhq7bbCQ2AwGEnroWjpzFH6vI=";
22
23 nativeBuildInputs = [
24 pkg-config
25 ];
26
27 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
28 systemdLibs # libudev-sys
29 ];
30
31 passthru.updateScript = nix-update-script { };
32
33 meta = {
34 description = "Download tool for the SiFli family of chips";
35 homepage = "https://github.com/OpenSiFli/sftool";
36 license = lib.licenses.asl20;
37 maintainers = [ ];
38 mainProgram = "sftool";
39 };
40})