nixpkgs/pkgs/tools/compression/upx/default.nix

33 lines
783 B
Nix
Raw Normal View History

2017-07-26 23:24:49 +02:00
{ stdenv, fetchurl, fetchFromGitHub, ucl, zlib, perl }:
stdenv.mkDerivation rec {
name = "upx-${version}";
version = "3.94";
src = fetchurl {
url = "https://github.com/upx/upx/releases/download/v3.94/upx-3.94-src.tar.xz";
sha256 = "08anybdliqsbsl6x835iwzljahnm9i7v26icdjkcv33xmk6p5vw1";
};
2017-07-26 23:24:49 +02:00
CXXFLAGS = "-Wno-unused-command-line-argument";
buildInputs = [ ucl zlib perl ];
2017-07-26 23:24:49 +02:00
preConfigure = ''
export UPX_UCLDIR=${ucl}
2017-07-26 23:24:49 +02:00
'';
2017-07-26 23:24:49 +02:00
makeFlags = [ "-C" "src" "CHECK_WHITESPACE=true" ];
2017-07-26 23:24:49 +02:00
installPhase = ''
mkdir -p $out/bin
cp src/upx.out $out/bin/upx
'';
2017-07-26 23:24:49 +02:00
meta = with stdenv.lib; {
homepage = https://upx.github.io/;
description = "The Ultimate Packer for eXecutables";
2017-07-26 23:24:49 +02:00
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}