mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
977 B
Nix
44 lines
977 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"
|
|
] ++ lib.optionals stdenv.cc.isClang [
|
|
# Needed with Clang 16
|
|
"-Wno-error=deprecated-builtins"
|
|
]);
|
|
|
|
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;
|
|
};
|
|
}
|