2017-07-26 23:24:49 +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}";
|
2017-06-22 01:54:10 +02: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 14:03:37 +01:00
|
|
|
};
|
2011-03-31 11:49:54 +02:00
|
|
|
|
2017-07-26 23:24:49 +02:00
|
|
|
CXXFLAGS = "-Wno-unused-command-line-argument";
|
|
|
|
|
2017-04-18 21:49:54 +02:00
|
|
|
buildInputs = [ ucl zlib perl ];
|
2009-03-22 14:03:37 +01:00
|
|
|
|
2017-07-26 23:24:49 +02:00
|
|
|
preConfigure = ''
|
2011-03-31 11:49:54 +02:00
|
|
|
export UPX_UCLDIR=${ucl}
|
2017-07-26 23:24:49 +02:00
|
|
|
'';
|
2009-03-22 14:03:37 +01:00
|
|
|
|
2017-07-26 23:24:49 +02:00
|
|
|
makeFlags = [ "-C" "src" "CHECK_WHITESPACE=true" ];
|
2017-06-22 01:54:10 +02:00
|
|
|
|
2017-07-26 23:24:49 +02:00
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp src/upx.out $out/bin/upx
|
|
|
|
'';
|
2009-03-22 14:03:37 +01:00
|
|
|
|
2017-07-26 23:24:49 +02:00
|
|
|
meta = with stdenv.lib; {
|
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";
|
2017-07-26 23:24:49 +02:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.unix;
|
2009-03-22 14:03:37 +01:00
|
|
|
};
|
|
|
|
}
|