diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/fwup')
-rw-r--r-- | nixpkgs/pkgs/tools/misc/fwup/default.nix | 33 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/misc/fwup/fix-testrunner-darwin.patch | 25 |
2 files changed, 58 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; + }; +} diff --git a/nixpkgs/pkgs/tools/misc/fwup/fix-testrunner-darwin.patch b/nixpkgs/pkgs/tools/misc/fwup/fix-testrunner-darwin.patch new file mode 100644 index 000000000000..b04b436ff5b1 --- /dev/null +++ b/nixpkgs/pkgs/tools/misc/fwup/fix-testrunner-darwin.patch @@ -0,0 +1,25 @@ +diff --git a/tests/common-orig.sh b/tests/common.sh +index 1f2673f..79dcf74 100755 +--- a/tests/common-orig.sh ++++ b/tests/common.sh +@@ -21,20 +21,6 @@ else + fi + + case "$HOST_OS" in +- Darwin) +- # BSD stat +- STAT_FILESIZE_FLAGS="-f %z" +- +- # Not -d? +- BASE64_DECODE=-D +- +- READLINK=/usr/local/bin/greadlink +- [ -e $READLINK ] || ( echo "Please run 'brew install coreutils' to install greadlink"; exit 1 ) +- [ -e /usr/local/bin/mdir ] || ( echo "Please run 'brew install mtools' to install mdir"; exit 1 ) +- +- FSCK_FAT=fsck_msdos +- TIMEOUT=gtimeout +- ;; + FreeBSD|NetBSD|OpenBSD|DragonFly) + # BSD stat + STAT_FILESIZE_FLAGS="-f %z" |