nixpkgs/pkgs/tools/misc/fwup/default.nix
2021-01-16 23:49:59 -08:00

34 lines
1.1 KiB
Nix

{ stdenv, lib, fetchFromGitHub, autoreconfHook, makeWrapper, pkg-config
, zlib, lzma, bzip2, mtools, dosfstools, zip, unzip, libconfuse, libsodium
, libarchive, darwin, coreutils }:
stdenv.mkDerivation rec {
pname = "fwup";
version = "1.5.2";
src = fetchFromGitHub {
owner = "fhunleth";
repo = "fwup";
rev = "v${version}";
sha256 = "05sjdlh450hk474a44yr6kz9dzx72jfxpi1krxbd0pdizlmfypsg";
};
doCheck = true;
patches = lib.optional stdenv.isDarwin [ ./fix-testrunner-darwin.patch ];
nativeBuildInputs = [ pkg-config 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 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;
};
}