2017-04-18 19:49:54 +00:00
|
|
|
{stdenv, fetchurl, fetchFromGitHub, ucl, zlib, perl}:
|
2009-03-22 13:03:37 +00:00
|
|
|
|
2017-04-18 19:49:54 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "upx-${version}";
|
2017-06-21 23:54:10 +00:00
|
|
|
version = "3.94";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/upx/upx/releases/download/v3.94/upx-3.94-src.tar.xz";
|
|
|
|
sha256 = "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1";
|
2009-03-22 13:03:37 +00:00
|
|
|
};
|
2011-03-31 09:49:54 +00:00
|
|
|
|
2017-04-18 19:49:54 +00:00
|
|
|
buildInputs = [ ucl zlib perl ];
|
2009-03-22 13:03:37 +00:00
|
|
|
|
2011-03-31 09:49:54 +00:00
|
|
|
preConfigure = "
|
|
|
|
export UPX_UCLDIR=${ucl}
|
|
|
|
cd src
|
|
|
|
";
|
2009-03-22 13:03:37 +00:00
|
|
|
|
2017-06-21 23:54:10 +00:00
|
|
|
makeFlags = [ "CHECK_WHITESPACE=true" ];
|
|
|
|
|
2012-01-18 20:16:00 +00:00
|
|
|
installPhase = "mkdir -p $out/bin ; cp upx.out $out/bin/upx";
|
2009-03-22 13:03:37 +00:00
|
|
|
|
|
|
|
meta = {
|
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";
|
2014-06-19 04:19:00 +00:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2016-08-02 17:50:55 +00:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2009-03-22 13:03:37 +00:00
|
|
|
};
|
|
|
|
}
|