nixpkgs/pkgs/development/libraries/microsoft_gsl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.2 KiB
Nix
Raw Normal View History

2021-07-18 08:24:21 +00:00
{ lib
, stdenv
, fetchFromGitHub
, cmake
, gtest
, fetchpatch
2021-07-18 08:24:21 +00:00
, pkg-config
}:
2017-02-15 23:11:38 +00:00
stdenv.mkDerivation rec {
pname = "microsoft_gsl";
2021-07-18 08:24:21 +00:00
version = "3.1.0";
2017-02-15 23:11:38 +00:00
src = fetchFromGitHub {
owner = "Microsoft";
repo = "GSL";
rev = "v${version}";
2021-07-18 08:24:21 +00:00
sha256 = "sha256-gIpyuNlp3mvR8r1Azs2r76ElEodykRLGAwMN4BDJez0=";
2017-02-15 23:11:38 +00:00
};
2021-07-18 08:24:21 +00:00
patches = [
# Search for GoogleTest via pkg-config first, ref: https://github.com/NixOS/nixpkgs/pull/130525
(fetchpatch {
2021-07-18 08:24:21 +00:00
url = "https://github.com/microsoft/GSL/commit/f5cf01083baf7e8dc8318db3648bc6098dc32d67.patch";
sha256 = "sha256-HJxG87nVFo1CGNivCqt/JhjTj2xLzQe8bF5Km7/KG+Y=";
2021-07-18 08:24:21 +00:00
})
];
2017-02-15 23:11:38 +00:00
2021-07-18 08:24:21 +00:00
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ gtest ];
2019-09-13 09:35:50 +00:00
2021-07-18 08:24:21 +00:00
doCheck = true;
2017-02-15 23:11:38 +00:00
meta = with lib; {
description = "C++ Core Guideline support library";
longDescription = ''
2021-07-18 08:24:21 +00:00
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.
'';
2021-07-18 08:24:21 +00:00
homepage = "https://github.com/Microsoft/GSL";
license = licenses.mit;
platforms = platforms.all;
2021-08-08 17:11:45 +00:00
maintainers = with maintainers; [ thoughtpolice yuriaisaka ];
2017-02-15 23:11:38 +00:00
};
}