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

33 lines
773 B
Nix
Raw Normal View History

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