mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-11 08:13:04 +00:00
eb49b17a0f
On gcc-11 build fails as: ``` $ nix-build -E 'with import ./.{}; upx.override { stdenv = gcc11Stdenv; }' ... ./../src/lzma-sdk/C/7zip/Compress/LZMA/../../../Common/MyCom.h:159:32: error: this 'if' clause does not guard... [-Werror=misleading-indentation] 159 | STDMETHOD_(ULONG, Release)() { if (--__m_RefCount != 0) \ | ^~ ```
37 lines
830 B
Nix
37 lines
830 B
Nix
{ 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";
|
|
};
|
|
|
|
buildInputs = [ ucl zlib perl ];
|
|
|
|
preConfigure = ''
|
|
export UPX_UCLDIR=${ucl}
|
|
'';
|
|
|
|
makeFlags = [
|
|
"-C" "src"
|
|
"CHECK_WHITESPACE=true"
|
|
|
|
# Disable blanket -Werror. Triggers failues on minor gcc-11 warnings.
|
|
"CXXFLAGS_WERROR="
|
|
];
|
|
|
|
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";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|