Files
nixpkgs/pkgs/by-name/st/stm8flash/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

47 lines
1023 B
Nix

{
lib,
stdenv,
fetchFromGitHub,
libusb1,
pkg-config,
}:
stdenv.mkDerivation {
pname = "stm8flash";
version = "2022-03-27";
src = fetchFromGitHub {
owner = "vdudouyt";
repo = "stm8flash";
rev = "23305ce5adbb509c5cb668df31b0fd6c8759639c";
sha256 = "sha256-fFoC2EKSmYyW2lqrdAh5A2WEtUMCenKse2ySJdNHu6w=";
};
strictDeps = true;
enableParallelBuilding = true;
# NOTE: _FORTIFY_SOURCE requires compiling with optimization (-O)
env.NIX_CFLAGS_COMPILE = "-O";
makeFlags = [
"DESTDIR=${placeholder "out"}"
];
postPatch = ''
substituteInPlace Makefile \
--replace 'pkg-config' '$(PKG_CONFIG)'
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb1 ];
meta = with lib; {
homepage = "https://github.com/vdudouyt/stm8flash";
description = "Tool for flashing STM8 MCUs via ST-LINK (V1 and V2)";
mainProgram = "stm8flash";
maintainers = with maintainers; [ pkharvey ];
license = licenses.gpl2;
platforms = platforms.all;
};
}