nixpkgs/pkgs/tools/compression/pbzip2/default.nix
Artturin f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00

31 lines
845 B
Nix

{ lib, stdenv, fetchurl, bzip2 }:
let major = "1.1";
version = "${major}.13";
in
stdenv.mkDerivation rec {
pname = "pbzip2";
inherit version;
src = fetchurl {
url = "https://launchpad.net/pbzip2/${major}/${version}/+download/${pname}-${version}.tar.gz";
sha256 = "1rnvgcdixjzbrmcr1nv9b6ccrjfrhryaj7jwz28yxxv6lam3xlcg";
};
buildInputs = [ bzip2 ];
preBuild = "substituteInPlace Makefile --replace g++ c++";
installFlags = [ "PREFIX=$(out)" ];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=reserved-user-defined-literal";
meta = with lib; {
homepage = "http://compression.ca/pbzip2/";
description = "A parallel implementation of bzip2 for multi-core machines";
license = licenses.bsd2;
maintainers = with maintainers; [viric];
platforms = platforms.unix;
};
}