3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #221151 from wegank/bossa-wxgtk

bossa: migrate to wxGTK32
This commit is contained in:
Weijia Wang 2023-03-18 17:29:50 +02:00 committed by GitHub
commit d0781217d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 33 additions and 11 deletions

View file

@ -1,4 +1,11 @@
{ lib, stdenv, fetchFromGitHub, wxGTK, libX11, readline }:
{ lib
, stdenv
, fetchFromGitHub
, wxGTK32
, libX11
, readline
, darwin
}:
let
# BOSSA needs a "bin2c" program to embed images.
@ -24,11 +31,27 @@ stdenv.mkDerivation rec {
sha256 = "sha256-8M3MU/+Y1L6SaQ1yoC9Z27A/gGruZdopLnL1z7h7YJw=";
};
nativeBuildInputs = [ bin2c ];
buildInputs = [ wxGTK libX11 readline ];
postPatch = ''
substituteInPlace Makefile \
--replace "-arch x86_64" ""
'';
# Explicitly specify targets so they don't get stripped.
makeFlags = [ "bin/bossac" "bin/bossash" "bin/bossa" ];
nativeBuildInputs = [ bin2c ];
buildInputs = [
wxGTK32
libX11
readline
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Cocoa
];
makeFlags = [
"WXVERSION=3.2"
# Explicitly specify targets so they don't get stripped.
"bin/bossac"
"bin/bossash"
"bin/bossa"
];
env.NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
installPhase = ''
@ -47,6 +70,6 @@ stdenv.mkDerivation rec {
'';
homepage = "http://www.shumatech.com/web/products/bossa";
license = licenses.bsd3;
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View file

@ -5,7 +5,7 @@
, bintools-unwrapped
, libffi
, libusb1
, wxGTK30
, wxGTK32
, python3
, gcc-arm-embedded
, klipper
@ -28,7 +28,7 @@
avrdude
stm32flash
pkg-config
wxGTK30 # Required for bossac
wxGTK32 # Required for bossac
];
preBuild = "cp ${firmwareConfig} ./.config";
@ -40,6 +40,7 @@
makeFlags = [
"V=1"
"KCONFIG_CONFIG=${firmwareConfig}"
"WXVERSION=3.2"
];
installPhase = ''

View file

@ -17558,9 +17558,7 @@ with pkgs;
bloop = callPackage ../development/tools/build-managers/bloop { };
bossa = callPackage ../development/embedded/bossa {
wxGTK = wxGTK30;
};
bossa = callPackage ../development/embedded/bossa { };
bossa-arduino = callPackage ../development/embedded/bossa/arduino.nix { };