2017-04-18 21:49:54 +02:00
|
|
|
{stdenv, fetchurl, fetchFromGitHub, ucl, zlib, perl}:
|
2009-03-22 14:03:37 +01:00
|
|
|
|
2017-04-18 21:49:54 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "upx-${version}";
|
|
|
|
version = "3.93";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "upx";
|
|
|
|
repo = "upx";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "03ah23q85hx3liqyyj4vm8vip2d47bijsimagqd39q762a2rin3i";
|
2009-03-22 14:03:37 +01:00
|
|
|
};
|
2011-03-31 11:49:54 +02:00
|
|
|
|
2017-04-18 21:49:54 +02:00
|
|
|
buildInputs = [ ucl zlib perl ];
|
2009-03-22 14:03:37 +01:00
|
|
|
|
2017-04-18 21:49:54 +02:00
|
|
|
lzmaSrc = fetchFromGitHub {
|
|
|
|
owner = "upx";
|
|
|
|
repo = "upx-lzma-sdk";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "16vj1c5bl04pzma0sr4saqk80y2iklyslzmrb4rm66aifa365zqj";
|
2011-03-31 11:49:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
preConfigure = "
|
|
|
|
export UPX_UCLDIR=${ucl}
|
2017-04-18 21:49:54 +02:00
|
|
|
cp -a $lzmaSrc/* src/lzma-sdk
|
|
|
|
export UPX_LZMADIR=`pwd`/src/lzma-sdk
|
2011-03-31 11:49:54 +02:00
|
|
|
cd src
|
|
|
|
";
|
2009-03-22 14:03:37 +01:00
|
|
|
|
2017-04-18 21:49:54 +02:00
|
|
|
buildPhase = "make CHECK_WHITESPACE=true";
|
2012-01-18 21:16:00 +01:00
|
|
|
installPhase = "mkdir -p $out/bin ; cp upx.out $out/bin/upx";
|
2009-03-22 14:03:37 +01:00
|
|
|
|
|
|
|
meta = {
|
2017-04-18 21:49:54 +02:00
|
|
|
homepage = https://upx.github.io/;
|
2009-03-22 14:03:37 +01:00
|
|
|
description = "The Ultimate Packer for eXecutables";
|
2014-06-19 06:19:00 +02:00
|
|
|
license = stdenv.lib.licenses.gpl2Plus;
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = stdenv.lib.platforms.unix;
|
2009-03-22 14:03:37 +01:00
|
|
|
};
|
|
|
|
}
|