2021-07-24 12:14:16 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, gtest
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "microsoft_gsl";
|
2021-07-24 12:14:16 +00:00
|
|
|
version = "3.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Microsoft";
|
|
|
|
repo = "GSL";
|
|
|
|
rev = "v${version}";
|
2021-07-24 12:14:16 +00:00
|
|
|
sha256 = "sha256-gIpyuNlp3mvR8r1Azs2r76ElEodykRLGAwMN4BDJez0=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
patches = [
|
|
|
|
# Search for GoogleTest via pkg-config first, ref: https://github.com/NixOS/nixpkgs/pull/130525
|
|
|
|
(fetchurl {
|
|
|
|
url = "https://github.com/microsoft/GSL/commit/f5cf01083baf7e8dc8318db3648bc6098dc32d67.patch";
|
|
|
|
sha256 = "sha256-uouv35crtly8kYhKyvMyZkqwTKt1jXC6dZjw4sQ6uv0=";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
|
|
|
buildInputs = [ gtest ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
doCheck = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "C++ Core Guideline support library";
|
|
|
|
longDescription = ''
|
2021-07-24 12:14:16 +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.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
2021-07-24 12:14:16 +00:00
|
|
|
homepage = "https://github.com/Microsoft/GSL";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
2021-08-08 23:34:03 +00:00
|
|
|
maintainers = with maintainers; [ thoughtpolice yuriaisaka ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|