mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
nsis: enable builds on darwin. (#120903)
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com> Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
f3418315d4
commit
0dde9ab531
@ -1,8 +1,11 @@
|
||||
{ lib, stdenv
|
||||
{ lib
|
||||
, stdenv
|
||||
, symlinkJoin
|
||||
, fetchurl
|
||||
, fetchzip
|
||||
, sconsPackages
|
||||
, zlib
|
||||
, libiconv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -28,20 +31,34 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ sconsPackages.scons_3_1_2 ];
|
||||
buildInputs = [ zlib ];
|
||||
buildInputs = [ zlib ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
|
||||
CPPPATH = symlinkJoin {
|
||||
name = "nsis-includes";
|
||||
paths = [ zlib.dev ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
|
||||
LIBPATH = symlinkJoin {
|
||||
name = "nsis-libs";
|
||||
paths = [ zlib ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
|
||||
};
|
||||
|
||||
sconsFlags = [
|
||||
"SKIPSTUBS=all"
|
||||
"SKIPPLUGINS=all"
|
||||
"SKIPUTILS=all"
|
||||
"SKIPMISC=all"
|
||||
"APPEND_CPPPATH=${zlib.dev}/include"
|
||||
"APPEND_LIBPATH=${zlib}/lib"
|
||||
"NSIS_CONFIG_CONST_DATA=no"
|
||||
];
|
||||
] ++ lib.optional stdenv.isDarwin "APPEND_LINKFLAGS=-liconv";
|
||||
|
||||
preBuild = ''
|
||||
sconsFlagsArray+=("PATH=$PATH")
|
||||
sconsFlagsArray+=(
|
||||
"PATH=$PATH"
|
||||
"CC=$CC"
|
||||
"CXX=$CXX"
|
||||
"APPEND_CPPPATH=$CPPPATH/include"
|
||||
"APPEND_LIBPATH=$LIBPATH/lib"
|
||||
)
|
||||
'';
|
||||
|
||||
prefixKey = "PREFIX=";
|
||||
@ -51,7 +68,7 @@ stdenv.mkDerivation rec {
|
||||
description = "A free scriptable win32 installer/uninstaller system that doesn't suck and isn't huge";
|
||||
homepage = "https://nsis.sourceforge.io/";
|
||||
license = licenses.zlib;
|
||||
platforms = platforms.linux;
|
||||
platforms = platforms.unix;
|
||||
maintainers = with maintainers; [ pombeirp ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user