nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 63 lines 1.3 kB view raw
1{ 2 cmake, 3 fetchFromGitHub, 4 lib, 5 libftdi1, 6 libusb1, 7 libyaml, 8 ncurses, 9 nix-update-script, 10 pkg-config, 11 stdenv, 12}: 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "bcu"; 16 version = "1.1.119"; 17 18 src = fetchFromGitHub { 19 owner = "nxp-imx"; 20 repo = "bcu"; 21 tag = "bcu_${finalAttrs.version}"; 22 hash = "sha256-GVnUkIoqHED/9c3Tr4M29DB+t6Q8OPDcxVWKNn/lU/8="; 23 }; 24 25 patches = [ ./darwin-install.patch ]; 26 27 postPatch = '' 28 substituteInPlace create_version_h.sh \ 29 --replace-fail "version=\`git describe --tags --long\`" "version=${finalAttrs.src.tag}" 30 ''; 31 32 enableParallelBuilding = true; 33 strictDeps = true; 34 35 nativeBuildInputs = [ 36 cmake 37 pkg-config 38 ]; 39 40 buildInputs = [ 41 libftdi1 42 libusb1 43 libyaml 44 ncurses 45 ]; 46 47 passthru.updateScript = nix-update-script { }; 48 49 env.NIX_CFLAGS_COMPILE = "-Wno-pointer-sign -Wno-deprecated-declarations -Wno-switch"; 50 51 preFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' 52 ln -sf $out/bin/bcu_mac $out/bin/bcu 53 ''; 54 55 meta = { 56 description = "NXP i.MX remote control and power measurement tools"; 57 homepage = "https://github.com/nxp-imx/bcu"; 58 license = lib.licenses.bsd3; 59 mainProgram = "bcu"; 60 maintainers = [ lib.maintainers.jmbaur ]; 61 platforms = lib.platforms.linux ++ lib.platforms.darwin; 62 }; 63})