nixpkgs/pkgs/tools/misc/xburst-tools/default.nix

44 lines
1.2 KiB
Nix
Raw Normal View History

2021-01-17 03:51:22 +00:00
{ lib, stdenv, fetchgit, libusb-compat-0_1, libusb1, autoconf, automake, libconfuse, pkg-config
2018-05-10 02:40:27 +00:00
, gccCross ? null
}:
let
version = "2011-12-26";
in
stdenv.mkDerivation {
2019-08-13 21:52:01 +00:00
pname = "xburst-tools";
inherit version;
src = fetchgit {
url = "git://projects.qi-hardware.com/xburst-tools.git";
rev = "c71ce8e15db25fe49ce8702917cb17720882e341";
sha256 = "1hzdngs1l5ivvwnxjwzc246am6w1mj1aidcf0awh9yw0crzcjnjr";
};
preConfigure = ''
sh autogen.sh
'';
2021-01-15 09:19:50 +00:00
configureFlags = lib.optionals (gccCross != null) [
"--enable-firmware"
"CROSS_COMPILE=${gccCross.targetPrefix}"
];
2018-04-03 21:32:46 +00:00
hardeningDisable = [ "pic" "stackprotector" ];
# Not to strip cross build binaries (this is for the gcc-cross-wrapper)
dontCrossStrip = true;
2021-01-17 03:51:22 +00:00
nativeBuildInputs = [ autoconf automake pkg-config ];
2020-04-28 03:29:39 +00:00
buildInputs = [ libusb-compat-0_1 libusb1 libconfuse ] ++
2021-01-15 09:19:50 +00:00
lib.optional (gccCross != null) gccCross;
meta = {
description = "Qi tools to access the Ben Nanonote USB_BOOT mode";
2021-01-15 09:19:50 +00:00
license = lib.licenses.gpl3;
homepage = "http://www.linux-mtd.infradead.org/";
2021-01-15 09:19:50 +00:00
maintainers = with lib.maintainers; [viric];
platforms = lib.platforms.x86_64;
};
}