nixpkgs/pkgs/development/tools/nsis/default.nix

53 lines
1.4 KiB
Nix
Raw Normal View History

2019-03-14 16:59:21 +00:00
{ stdenv, fetchurl, fetchzip, scons, zlib }:
2019-03-06 21:21:08 +00:00
2019-03-14 16:59:21 +00:00
stdenv.mkDerivation rec {
pname = "nsis";
2020-02-02 09:19:25 +00:00
version = "3.05";
2019-03-06 21:21:08 +00:00
src =
fetchurl {
2019-03-14 19:32:53 +00:00
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}-src.tar.bz2";
2020-02-02 09:19:25 +00:00
sha256 = "1sbwx5vzpddharkb7nj4q5z3i5fbg4lan63ng738cw4hmc4v7qdn";
2019-03-06 21:21:08 +00:00
};
srcWinDistributable =
fetchzip {
2019-03-14 19:32:53 +00:00
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}.zip";
2020-02-02 09:19:25 +00:00
sha256 = "0i3pzdilyy5g0r2c92pd2jl92ji9f75vv98mndzq8vw03a34yh3q";
2019-03-06 21:21:08 +00:00
};
2019-03-14 16:53:36 +00:00
postUnpack = ''
mkdir -p $out/share/nsis
cp -avr ${srcWinDistributable}/{Contrib,Include,Plugins,Stubs} \
$out/share/nsis
2020-02-02 09:19:25 +00:00
chmod -R u+w $out/share/nsis
2019-03-14 16:53:36 +00:00
'';
2019-03-06 21:21:08 +00:00
nativeBuildInputs = [ scons ];
buildInputs = [ zlib ];
2019-03-14 16:53:36 +00:00
sconsFlags = [
"SKIPSTUBS=all"
"SKIPPLUGINS=all"
"SKIPUTILS=all"
"SKIPMISC=all"
2019-03-14 16:59:21 +00:00
"APPEND_CPPPATH=${zlib.dev}/include"
"APPEND_LIBPATH=${zlib}/lib"
2019-03-14 16:53:36 +00:00
"NSIS_CONFIG_CONST_DATA=no"
];
preBuild = ''
sconsFlagsArray+=("PATH=$PATH")
'';
2019-03-06 21:21:08 +00:00
2019-03-14 16:53:36 +00:00
prefixKey = "PREFIX=";
2019-11-04 12:33:53 +00:00
installTargets = [ "install-compiler" ];
2019-03-06 21:21:08 +00:00
meta = with stdenv.lib; {
description = "NSIS is 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;
maintainers = with maintainers; [ pombeirp ];
};
}