aboutsummaryrefslogtreecommitdiff
path: root/pkgs/development/tools/nsis
diff options
context:
space:
mode:
authorPedro Pombeiro <pombeirp@users.noreply.github.com>2019-03-06 22:21:08 +0100
committerPedro Pombeiro <pombeirp@users.noreply.github.com>2019-03-14 10:34:31 +0100
commitf875b1c6f2a98d205a2d38b15f639da1e49725ba (patch)
tree5f7f892a27448ac946e6185d2293628b884ae01b /pkgs/development/tools/nsis
parent88cd06d0f22cf7008e9480d804593978d5e0a45f (diff)
nsis: init at 3.04
Diffstat (limited to 'pkgs/development/tools/nsis')
-rw-r--r--pkgs/development/tools/nsis/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/tools/nsis/default.nix b/pkgs/development/tools/nsis/default.nix
new file mode 100644
index 000000000000..83448cb4b510
--- /dev/null
+++ b/pkgs/development/tools/nsis/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, symlinkJoin, fetchurl, fetchzip, scons, zlib }:
+
+let
+ ZLIB_HOME = symlinkJoin { name="zlib-wrap"; paths = [ zlib zlib.dev ]; };
+
+in stdenv.mkDerivation rec {
+ name = "nsis-${version}";
+ version = "3.04";
+
+ src =
+ fetchurl {
+ url = "https://vorboss.dl.sourceforge.net/project/nsis/NSIS%203/${version}/nsis-${version}-src.tar.bz2";
+ sha256 = "1xgllk2mk36ll2509hd31mfq6blgncmdzmwxj3ymrwshdh23d5b0";
+ };
+ srcWinDistributable =
+ fetchzip {
+ url = "https://vorboss.dl.sourceforge.net/project/nsis/NSIS%203/${version}/nsis-${version}.zip";
+ sha256 = "1g31vz73x4d3cmsw2wfk43qa06bpqp5815fb5qq9vmwms6hym6y2";
+ };
+
+ nativeBuildInputs = [ scons ];
+ buildInputs = [ zlib ];
+
+ phases = [ "unpackPhase" "installPhase" ];
+
+ dontStrip = true;
+ installPhase = ''
+ runHook preInstall
+
+ mkdir -p $out/share/nsis/Contrib $out/share/nsis/Include $out/share/nsis/Plugins $out/share/nsis/Stubs
+ cp -avr ${srcWinDistributable}/Contrib ${srcWinDistributable}/Include ${srcWinDistributable}/Plugins ${srcWinDistributable}/Stubs \
+ $out/share/nsis
+
+ scons \
+ SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all \
+ PATH="$PATH" \
+ APPEND_CPPPATH="${ZLIB_HOME}/include" \
+ APPEND_LIBPATH="${ZLIB_HOME}/lib" \
+ NSIS_CONFIG_CONST_DATA=no \
+ STRIP=no \
+ PREFIX=$out install-compiler
+
+ runHook postInstall
+ '';
+
+ 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 ];
+ };
+}