2021-05-03 20:48:10 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, symlinkJoin
|
2020-09-25 04:45:31 +00:00
|
|
|
, fetchurl
|
|
|
|
, fetchzip
|
|
|
|
, sconsPackages
|
|
|
|
, zlib
|
2021-05-03 20:48:10 +00:00
|
|
|
, libiconv
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "nsis";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "3.06.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}-src.tar.bz2";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "1w1z2m982l6j8lw8hy91c3979wbnqglcf4148f9v79vl32znhpcv";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
srcWinDistributable =
|
|
|
|
fetchzip {
|
|
|
|
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}.zip";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "04qm9jqbcybpwcrjlksggffdyafzwxxcaz9xhjw8w5rb95x7lw5q";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
mkdir -p $out/share/nsis
|
|
|
|
cp -avr ${srcWinDistributable}/{Contrib,Include,Plugins,Stubs} \
|
|
|
|
$out/share/nsis
|
|
|
|
chmod -R u+w $out/share/nsis
|
|
|
|
'';
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
nativeBuildInputs = [ sconsPackages.scons_3_1_2 ];
|
2021-05-03 20:48:10 +00:00
|
|
|
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 ];
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
sconsFlags = [
|
|
|
|
"SKIPSTUBS=all"
|
|
|
|
"SKIPPLUGINS=all"
|
|
|
|
"SKIPUTILS=all"
|
|
|
|
"SKIPMISC=all"
|
|
|
|
"NSIS_CONFIG_CONST_DATA=no"
|
2021-05-03 20:48:10 +00:00
|
|
|
] ++ lib.optional stdenv.isDarwin "APPEND_LINKFLAGS=-liconv";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
preBuild = ''
|
2021-05-03 20:48:10 +00:00
|
|
|
sconsFlagsArray+=(
|
|
|
|
"PATH=$PATH"
|
|
|
|
"CC=$CC"
|
|
|
|
"CXX=$CXX"
|
|
|
|
"APPEND_CPPPATH=$CPPPATH/include"
|
|
|
|
"APPEND_LIBPATH=$LIBPATH/lib"
|
|
|
|
)
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
prefixKey = "PREFIX=";
|
|
|
|
installTargets = [ "install-compiler" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-11-03 02:18:15 +00:00
|
|
|
description = "A free scriptable win32 installer/uninstaller system that doesn't suck and isn't huge";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://nsis.sourceforge.io/";
|
|
|
|
license = licenses.zlib;
|
2021-05-03 20:48:10 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ pombeirp ];
|
2022-04-27 09:35:20 +00:00
|
|
|
mainProgram = "makensis";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|