1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 autoreconfHook,
6 pkg-config,
7 bzip2,
8 libarchive,
9 libconfuse,
10 libsodium,
11 xz,
12 zlib,
13 coreutils,
14 dosfstools,
15 mtools,
16 unzip,
17 zip,
18 which,
19 xdelta,
20}:
21
22stdenv.mkDerivation rec {
23 pname = "fwup";
24 version = "1.13.2";
25
26 src = fetchFromGitHub {
27 owner = "fhunleth";
28 repo = "fwup";
29 rev = "v${version}";
30 sha256 = "sha256-s9M734Ohf8kItoOdaxewk4Enbrm2wsT0M4Ak9+q3KA8=";
31 };
32
33 nativeBuildInputs = [
34 autoreconfHook
35 pkg-config
36 ];
37
38 buildInputs = [
39 bzip2
40 libarchive
41 libconfuse
42 libsodium
43 xz
44 zlib
45 ];
46
47 propagatedBuildInputs = [
48 coreutils
49 unzip
50 zip
51 ]
52 ++ lib.optionals doCheck [
53 mtools
54 dosfstools
55 ];
56
57 nativeCheckInputs = [
58 which
59 xdelta
60 ];
61
62 doCheck = !stdenv.hostPlatform.isDarwin;
63
64 meta = with lib; {
65 description = "Configurable embedded Linux firmware update creator and runner";
66 homepage = "https://github.com/fhunleth/fwup";
67 license = licenses.asl20;
68 maintainers = [ maintainers.georgewhewell ];
69 platforms = platforms.all;
70 };
71}