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

33 lines
773 B
Nix
Raw Normal View History

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