Merge pull request #280833 from asmir-abdulahovic/stm32cubemx-fhsenv

stm32cubemx: wrap with FHSEnv
This commit is contained in:
ajs124 2024-01-18 11:14:32 +01:00 committed by GitHub
commit e4a70f57ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,17 +1,17 @@
{ fdupes
, buildFHSEnv
, fetchzip
, icoutils
, imagemagick
, jdk17
, lib
, makeDesktopItem
, stdenv
, stdenvNoCC
}:
let
iconame = "STM32CubeMX";
in
stdenv.mkDerivation rec {
package = stdenvNoCC.mkDerivation rec {
pname = "stm32cubemx";
version = "6.10.0";
@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
chmod +rx $out/opt/STM32CubeMX/STM32CubeMX
cat << EOF > $out/bin/${pname}
#!${stdenv.shell}
#!${stdenvNoCC.shell}
${jdk17}/bin/java -jar $out/opt/STM32CubeMX/STM32CubeMX
EOF
chmod +x $out/bin/${pname}
@ -79,6 +79,37 @@ stdenv.mkDerivation rec {
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.unfree;
maintainers = with maintainers; [ angaz wucke13 ];
platforms = platforms.all;
platforms = [ "x86_64-linux" ];
};
};
in
buildFHSEnv {
inherit (package) pname meta;
runScript = "${package.outPath}/bin/stm32cubemx";
targetPkgs = pkgs:
with pkgs; [
alsa-lib
at-spi2-atk
cairo
cups
dbus
expat
glib
gtk3
libdrm
libGL
libudev0-shim
libxkbcommon
mesa
nspr
nss
pango
xorg.libX11
xorg.libxcb
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
];
}