nixpkgs/pkgs/development/libraries/uri/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

40 lines
870 B
Nix

{ lib, stdenv, fetchFromGitHub, cmake, doxygen }:
stdenv.mkDerivation rec {
pname = "uri";
version = "1.1.0";
src = fetchFromGitHub {
owner = "cpp-netlib";
repo = "uri";
rev = "v${version}";
sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd";
};
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error=parentheses"
# Needed with GCC 12
"-Wno-error=deprecated-declarations"
"-Wno-error=nonnull"
];
nativeBuildInputs = [ cmake doxygen ];
cmakeFlags = [
"-DUri_BUILD_TESTS=OFF" "-DUri_BUILD_DOCS=ON" "-DBUILD_SHARED_LIBS=ON"
];
postBuild = "make doc";
postInstall = ''
install -vd $out/share/doc
cp -vR html $out/share/doc
'';
meta = {
description = "C++ URI library";
homepage = "https://cpp-netlib.org";
license = lib.licenses.boost;
platforms = lib.platforms.all;
};
}