mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
stm8flash: fix cross compilation
This commit is contained in:
parent
3a74beb15c
commit
ebdcc360f5
@ -1,6 +1,6 @@
|
||||
{ lib, stdenv, fetchFromGitHub, libusb1, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation {
|
||||
pname = "stm8flash";
|
||||
version = "2022-03-27";
|
||||
|
||||
@ -17,8 +17,13 @@ stdenv.mkDerivation rec {
|
||||
# NOTE: _FORTIFY_SOURCE requires compiling with optimization (-O)
|
||||
env.NIX_CFLAGS_COMPILE = "-O";
|
||||
|
||||
preBuild = ''
|
||||
export DESTDIR=$out;
|
||||
makeFlags = [
|
||||
"DESTDIR=${placeholder "out"}"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Makefile \
|
||||
--replace 'pkg-config' '$(PKG_CONFIG)'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
Loading…
Reference in New Issue
Block a user