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

52 lines
1.3 KiB
Nix
Raw Normal View History

2019-03-14 17:59:21 +01:00
{ stdenv, fetchurl, fetchzip, scons, zlib }:
2019-03-06 22:21:08 +01:00
2019-03-14 17:59:21 +01:00
stdenv.mkDerivation rec {
2019-03-06 22:21:08 +01:00
name = "nsis-${version}";
version = "3.04";
src =
fetchurl {
2019-03-14 20:32:53 +01:00
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}-src.tar.bz2";
2019-03-06 22:21:08 +01:00
sha256 = "1xgllk2mk36ll2509hd31mfq6blgncmdzmwxj3ymrwshdh23d5b0";
};
srcWinDistributable =
fetchzip {
2019-03-14 20:32:53 +01:00
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}.zip";
2019-03-06 22:21:08 +01:00
sha256 = "1g31vz73x4d3cmsw2wfk43qa06bpqp5815fb5qq9vmwms6hym6y2";
};
2019-03-14 17:53:36 +01:00
postUnpack = ''
mkdir -p $out/share/nsis
cp -avr ${srcWinDistributable}/{Contrib,Include,Plugins,Stubs} \
$out/share/nsis
'';
2019-03-06 22:21:08 +01:00
nativeBuildInputs = [ scons ];
buildInputs = [ zlib ];
2019-03-14 17:53:36 +01:00
sconsFlags = [
"SKIPSTUBS=all"
"SKIPPLUGINS=all"
"SKIPUTILS=all"
"SKIPMISC=all"
2019-03-14 17:59:21 +01:00
"APPEND_CPPPATH=${zlib.dev}/include"
"APPEND_LIBPATH=${zlib}/lib"
2019-03-14 17:53:36 +01:00
"NSIS_CONFIG_CONST_DATA=no"
];
preBuild = ''
sconsFlagsArray+=("PATH=$PATH")
'';
2019-03-06 22:21:08 +01:00
2019-03-14 17:53:36 +01:00
prefixKey = "PREFIX=";
installTargets = "install-compiler";
2019-03-06 22:21:08 +01: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 ];
};
}