about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/fwup/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/fwup/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/fwup/default.nix33
1 files changed, 33 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/fwup/default.nix b/nixpkgs/pkgs/tools/misc/fwup/default.nix
new file mode 100644
index 000000000000..99dcc194d011
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/fwup/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook, makeWrapper, pkgconfig
+, zlib, lzma, bzip2, mtools, dosfstools, zip, unzip, libconfuse, libsodium
+, libarchive, darwin, coreutils }:
+
+stdenv.mkDerivation rec {
+  pname = "fwup";
+  version = "1.5.1";
+
+  src = fetchFromGitHub {
+    owner = "fhunleth";
+    repo = "fwup";
+    rev = "v${version}";
+    sha256 = "08gscwdq7fwfpk3mf7dfdf64n5ijm5kjb7f5wrzzvpnnqz24xnb0";
+  };
+
+  doCheck = true;
+  patches = lib.optional stdenv.isDarwin [ ./fix-testrunner-darwin.patch ];
+
+  nativeBuildInputs = [ pkgconfig autoreconfHook makeWrapper ];
+  buildInputs = [ zlib lzma bzip2 libconfuse libsodium libarchive ]
+    ++ lib.optionals stdenv.isDarwin [
+      darwin.apple_sdk.frameworks.DiskArbitration
+    ];
+  propagatedBuildInputs = [ zip unzip mtools dosfstools coreutils ];
+
+  meta = with stdenv.lib; {
+    description = "Configurable embedded Linux firmware update creator and runner";
+    homepage = https://github.com/fhunleth/fwup;
+    license = licenses.asl20;
+    maintainers = [ maintainers.georgewhewell ];
+    platforms = platforms.all;
+  };
+}