4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{ lib, stdenv
|
|
, fetchurl
|
|
, fetchzip
|
|
, sconsPackages
|
|
, zlib
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "nsis";
|
|
version = "3.06.1";
|
|
|
|
src =
|
|
fetchurl {
|
|
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}-src.tar.bz2";
|
|
sha256 = "1w1z2m982l6j8lw8hy91c3979wbnqglcf4148f9v79vl32znhpcv";
|
|
};
|
|
srcWinDistributable =
|
|
fetchzip {
|
|
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}.zip";
|
|
sha256 = "04qm9jqbcybpwcrjlksggffdyafzwxxcaz9xhjw8w5rb95x7lw5q";
|
|
};
|
|
|
|
postUnpack = ''
|
|
mkdir -p $out/share/nsis
|
|
cp -avr ${srcWinDistributable}/{Contrib,Include,Plugins,Stubs} \
|
|
$out/share/nsis
|
|
chmod -R u+w $out/share/nsis
|
|
'';
|
|
|
|
nativeBuildInputs = [ sconsPackages.scons_3_1_2 ];
|
|
buildInputs = [ zlib ];
|
|
|
|
sconsFlags = [
|
|
"SKIPSTUBS=all"
|
|
"SKIPPLUGINS=all"
|
|
"SKIPUTILS=all"
|
|
"SKIPMISC=all"
|
|
"APPEND_CPPPATH=${zlib.dev}/include"
|
|
"APPEND_LIBPATH=${zlib}/lib"
|
|
"NSIS_CONFIG_CONST_DATA=no"
|
|
];
|
|
|
|
preBuild = ''
|
|
sconsFlagsArray+=("PATH=$PATH")
|
|
'';
|
|
|
|
prefixKey = "PREFIX=";
|
|
installTargets = [ "install-compiler" ];
|
|
|
|
meta = with lib; {
|
|
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;
|
|
maintainers = with maintainers; [ pombeirp ];
|
|
};
|
|
}
|