Skip to content

Commit 33cf307

Browse files
authored
gsl-lite: 0.41.0 -> 0.42.0 (NixOS#395566)
2 parents 2961e00 + 0c1a276 commit 33cf307

File tree

1 file changed

+16
-31
lines changed

1 file changed

+16
-31
lines changed

pkgs/by-name/gs/gsl-lite/package.nix

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,48 @@
22
lib,
33
stdenv,
44
fetchFromGitHub,
5-
fetchpatch,
65
cmake,
76
ninja,
87
installCompatHeader ? false,
98
installLegacyHeaders ? false,
109
}:
11-
12-
stdenv.mkDerivation rec {
10+
stdenv.mkDerivation (finalAttrs: {
1311
pname = "gsl-lite";
14-
version = "0.41.0";
12+
version = "0.42.0";
1513

1614
src = fetchFromGitHub {
1715
owner = "gsl-lite";
1816
repo = "gsl-lite";
19-
rev = "v${version}";
20-
hash = "sha256-cuuix302bVA7dWa7EJoxJ+otf1rSzjWQK8DHJsVkQio=";
17+
tag = "v${finalAttrs.version}";
18+
hash = "sha256-4CQG+sX/UTQ4zICmDR6YBfapuh0hSqkWk5skZAVAy2o=";
2119
};
2220

23-
patches = [
24-
(fetchpatch {
25-
name = "type-limits-cast-fix.patch";
26-
url = "https://github.com/gsl-lite/gsl-lite/commit/13475be0e5bf5f464c398f4a07ef5c7684bc57c5.patch";
27-
hash = "sha256-rSz7OBmgQ3KcQ971tS3Z3QNC+U4XmrPjgmuOyG7J6Bo=";
28-
})
29-
];
30-
3121
nativeBuildInputs = [
3222
cmake
3323
ninja
3424
];
3525

36-
cmakeFlags =
37-
lib.mapAttrsToList (name: value: ''-DGSL_LITE_OPT_${name}:BOOL=${if value then "ON" else "OFF"}'')
38-
{
39-
INSTALL_COMPAT_HEADER = installCompatHeader;
40-
INSTALL_LEGACY_HEADERS = installLegacyHeaders;
41-
BUILD_TESTS = doCheck;
42-
};
26+
cmakeFlags = [
27+
(lib.cmakeBool "GSL_LITE_OPT_BUILD_TESTS" finalAttrs.doCheck)
28+
(lib.cmakeBool "GSL_LITE_OPT_INSTALL_COMPAT_HEADER" installCompatHeader)
29+
(lib.cmakeBool "GSL_LITE_OPT_INSTALL_LEGACY_HEADERS" installLegacyHeaders)
30+
];
4331

4432
# Building tests is broken on Darwin.
4533
doCheck = !stdenv.hostPlatform.isDarwin;
4634

47-
meta = with lib; {
48-
description = ''
49-
A single-file header-only version of ISO C++ Guidelines Support Library
50-
(GSL) for C++98, C++11, and later
51-
'';
35+
meta = {
36+
description = "Single-file header-only version of ISO C++ GSL";
5237
longDescription = ''
5338
gsl-lite is a single-file header-only implementation of the C++ Core
5439
Guidelines Support Library originally based on Microsoft GSL and adapted
5540
for C++98, C++03. It also works when compiled as C++11, C++14, C++17,
5641
C++20.
5742
'';
5843
homepage = "https://github.com/gsl-lite/gsl-lite";
59-
changelog = "https://github.com/gsl-lite/gsl-lite/blob/${src.rev}/CHANGES.txt";
60-
license = licenses.mit;
61-
maintainers = with maintainers; [ azahi ];
62-
platforms = platforms.all;
44+
changelog = "https://github.com/gsl-lite/gsl-lite/blob/${finalAttrs.src.rev}/CHANGES.txt";
45+
license = lib.licenses.mit;
46+
maintainers = [ lib.maintainers.azahi ];
47+
platforms = lib.platforms.all;
6348
};
64-
}
49+
})

0 commit comments

Comments
 (0)