mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-25 14:24:40 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
58 lines
1.4 KiB
Nix
58 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
cmake,
|
|
gtest,
|
|
pkg-config,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "microsoft-gsl";
|
|
version = "4.0.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Microsoft";
|
|
repo = "GSL";
|
|
rev = "v${version}";
|
|
hash = "sha256-cXDFqt2KgMFGfdh6NGE+JmP4R0Wm9LNHM0eIblYe6zU=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
];
|
|
buildInputs = [ gtest ];
|
|
|
|
# error: unsafe buffer access
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-unsafe-buffer-usage";
|
|
|
|
patches = [
|
|
# nvcc doesn't recognize the "gsl" attribute namespace (microsoft/onnxruntime#13573)
|
|
# only affects nvcc
|
|
(fetchpatch {
|
|
url = "https://raw.githubusercontent.com/microsoft/onnxruntime/4bfa69def85476b33ccfaf68cf070f3fb65d39f7/cmake/patches/gsl/1064.patch";
|
|
hash = "sha256-0jESA+VENWQms9HGE0jRiZZuWLJehBlbArxSaQbYOrM=";
|
|
})
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "C++ Core Guideline support library";
|
|
longDescription = ''
|
|
The Guideline Support Library (GSL) contains functions and types that are suggested for
|
|
use by the C++ Core Guidelines maintained by the Standard C++ Foundation.
|
|
This package contains Microsoft's implementation of GSL.
|
|
'';
|
|
homepage = "https://github.com/Microsoft/GSL";
|
|
license = licenses.mit;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [
|
|
thoughtpolice
|
|
yuriaisaka
|
|
];
|
|
};
|
|
}
|