packages/stm32cubemx: update to reflect upstream
This commit is contained in:
parent
0a1cf9b0ca
commit
d9caa08da5
@ -1,32 +1,32 @@
|
|||||||
{
|
{ fdupes
|
||||||
fdupes,
|
, buildFHSEnv
|
||||||
buildFHSEnv,
|
, fetchzip
|
||||||
fetchzip,
|
, icoutils
|
||||||
icoutils,
|
, imagemagick
|
||||||
imagemagick,
|
, jdk17
|
||||||
jdk21,
|
, lib
|
||||||
lib,
|
, makeDesktopItem
|
||||||
makeDesktopItem,
|
, stdenvNoCC
|
||||||
makeWrapper,
|
}:
|
||||||
stdenv,
|
|
||||||
}: let
|
let
|
||||||
iconame = "STM32CubeMX";
|
iconame = "STM32CubeMX";
|
||||||
pkg = stdenv.mkDerivation rec {
|
package = stdenvNoCC.mkDerivation rec {
|
||||||
pname = "stm32cubemx";
|
pname = "stm32cubemx";
|
||||||
version = "6.10.0";
|
version = "6.10.0";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://sw-center.st.com/packs/resource/library/stm32cube_mx_v${builtins.replaceStrings ["."] [""] version}-lin.zip";
|
url = "https://sw-center.st.com/packs/resource/library/stm32cube_mx_v${builtins.replaceStrings ["."] [""] version}-lin.zip";
|
||||||
sha256 = "1qydwbfj1286h3ys3js6fy5rkni5njsarn502rid11rv6gxrz507";
|
sha256 = "sha256-B5Sf+zM7h9BiFqDYrLS0JdqZi3dGy6H9gAaJIN3izeM=";
|
||||||
stripRoot = false;
|
stripRoot = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [fdupes icoutils imagemagick makeWrapper];
|
nativeBuildInputs = [ fdupes icoutils imagemagick ];
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
name = "STM32CubeMX";
|
name = "STM32CubeMX";
|
||||||
exec = "stm32cubemx";
|
exec = "stm32cubemx";
|
||||||
desktopName = "STM32CubeMX";
|
desktopName = "STM32CubeMX";
|
||||||
categories = ["Development"];
|
categories = [ "Development" ];
|
||||||
icon = "stm32cubemx";
|
icon = "stm32cubemx";
|
||||||
comment = meta.description;
|
comment = meta.description;
|
||||||
terminal = false;
|
terminal = false;
|
||||||
@ -37,15 +37,15 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
buildCommand = ''
|
||||||
mkdir -p $out/{bin,opt/STM32CubeMX,share/applications}
|
mkdir -p $out/{bin,opt/STM32CubeMX,share/applications}
|
||||||
|
|
||||||
cp -r $src/MX/. $out/opt/STM32CubeMX/
|
cp -r $src/MX/. $out/opt/STM32CubeMX/
|
||||||
chmod +rx $out/opt/STM32CubeMX/STM32CubeMX
|
chmod +rx $out/opt/STM32CubeMX/STM32CubeMX
|
||||||
|
|
||||||
cat << EOF > $out/bin/${pname}
|
cat << EOF > $out/bin/${pname}
|
||||||
#!${stdenv.shell}
|
#!${stdenvNoCC.shell}
|
||||||
${jdk21}/bin/java -jar $out/opt/STM32CubeMX/STM32CubeMX
|
${jdk17}/bin/java -jar $out/opt/STM32CubeMX/STM32CubeMX
|
||||||
EOF
|
EOF
|
||||||
chmod +x $out/bin/${pname}
|
chmod +x $out/bin/${pname}
|
||||||
|
|
||||||
@ -76,16 +76,16 @@
|
|||||||
step-by-step process.
|
step-by-step process.
|
||||||
'';
|
'';
|
||||||
homepage = "https://www.st.com/en/development-tools/stm32cubemx.html";
|
homepage = "https://www.st.com/en/development-tools/stm32cubemx.html";
|
||||||
sourceProvenance = with sourceTypes; [binaryBytecode];
|
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||||
license = licenses.unfree;
|
license = licenses.unfree;
|
||||||
maintainers = with maintainers; [angaz wucke13];
|
maintainers = with maintainers; [ angaz wucke13 ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
buildFHSEnv {
|
buildFHSEnv {
|
||||||
inherit (pkg) pname meta;
|
inherit (package) pname meta;
|
||||||
runScript = "${pkg.outPath}/bin/stm32cubemx";
|
runScript = "${package.outPath}/bin/stm32cubemx";
|
||||||
targetPkgs = pkgs:
|
targetPkgs = pkgs:
|
||||||
with pkgs; [
|
with pkgs; [
|
||||||
alsa-lib
|
alsa-lib
|
||||||
@ -112,4 +112,4 @@ in
|
|||||||
xorg.libXfixes
|
xorg.libXfixes
|
||||||
xorg.libXrandr
|
xorg.libXrandr
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user