2018-07-21 00:44:44 +00:00
|
|
|
{ stdenv, fetchurl, ucl, zlib, perl }:
|
2009-03-22 13:03:37 +00:00
|
|
|
|
2017-04-18 19:49:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "upx";
|
2020-01-29 07:28:18 +00:00
|
|
|
version = "3.96";
|
2017-06-21 23:54:10 +00:00
|
|
|
src = fetchurl {
|
2019-08-15 12:41:18 +00:00
|
|
|
url = "https://github.com/upx/upx/releases/download/v${version}/${pname}-${version}-src.tar.xz";
|
2020-01-29 07:28:18 +00:00
|
|
|
sha256 = "051pk5jk8fcfg5mpgzj43z5p4cn7jy5jbyshyn78dwjqr7slsxs7";
|
2009-03-22 13:03:37 +00:00
|
|
|
};
|
2011-03-31 09:49:54 +00:00
|
|
|
|
2017-07-26 21:24:49 +00:00
|
|
|
CXXFLAGS = "-Wno-unused-command-line-argument";
|
|
|
|
|
2017-04-18 19:49:54 +00:00
|
|
|
buildInputs = [ ucl zlib perl ];
|
2009-03-22 13:03:37 +00:00
|
|
|
|
2017-07-26 21:24:49 +00:00
|
|
|
preConfigure = ''
|
2011-03-31 09:49:54 +00:00
|
|
|
export UPX_UCLDIR=${ucl}
|
2017-07-26 21:24:49 +00:00
|
|
|
'';
|
2009-03-22 13:03:37 +00:00
|
|
|
|
2017-07-26 21:24:49 +00:00
|
|
|
makeFlags = [ "-C" "src" "CHECK_WHITESPACE=true" ];
|
2017-06-21 23:54:10 +00:00
|
|
|
|
2017-07-26 21:24:49 +00:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp src/upx.out $out/bin/upx
|
|
|
|
'';
|
2009-03-22 13:03:37 +00:00
|
|
|
|
2017-07-26 21:24:49 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-04-18 19:49:54 +00:00
|
|
|
homepage = https://upx.github.io/;
|
2009-03-22 13:03:37 +00:00
|
|
|
description = "The Ultimate Packer for eXecutables";
|
2017-07-26 21:24:49 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2009-03-22 13:03:37 +00:00
|
|
|
};
|
|
|
|
}
|