git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #119550 from primeos/llvm-meta

llvmPackages_12: Improve and extend the meta attributes

commit44dac5f5c69c2c72f3b2018ec681e477e0fc6a6c authorMichael Weiss <dev.primeos@gmail.com> dateThu 15 Apr 2021, 19:50 (6 years ago) parent9706bf128887e7
10 files changed+144−52
pkgs/development/compilers/llvm/12/clang/default.nix+18−7 pkgs/development/compilers/llvm/12/compiler-rt/default.nix+16−1 pkgs/development/compilers/llvm/12/default.nix+18−7 pkgs/development/compilers/llvm/12/libc++/default.nix+10−5 pkgs/development/compilers/llvm/12/libc++abi/default.nix+10−6 pkgs/development/compilers/llvm/12/libunwind/default.nix+13−1 pkgs/development/compilers/llvm/12/lld/default.nix+12−6 pkgs/development/compilers/llvm/12/lldb/default.nix+12−6 pkgs/development/compilers/llvm/12/llvm/default.nix+21−8 pkgs/development/compilers/llvm/12/openmp.nix+14−5
pkgs/development/compilers/llvm/12/clang/default.nix+18−7
@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
1+{ lib, stdenv, llvm_meta, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
22, fixDarwinDylibNames
33, enableManpages ? false
44}:
@@ -82,11 +82,20 @@ let
8282 inherit llvm;
8383 };
8484
85− meta = {
86− description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
87− homepage = "https://llvm.org/";
88− license = lib.licenses.ncsa;
89− platforms = lib.platforms.all;
85+ meta = llvm_meta // {
86+ homepage = "https://clang.llvm.org/";
87+ description = "A C language family frontend for LLVM";
88+ longDescription = ''
89+ The Clang project provides a language front-end and tooling
90+ infrastructure for languages in the C language family (C, C++, Objective
91+ C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
92+ It aims to deliver amazingly fast compiles, extremely useful error and
93+ warning messages and to provide a platform for building great source
94+ level tools. The Clang Static Analyzer and clang-tidy are tools that
95+ automatically find bugs in your code, and are great examples of the sort
96+ of tools that can be built using the Clang frontend as a library to
97+ parse C/C++ code.
98+ '';
9099 };
91100 } // lib.optionalAttrs enableManpages {
92101 pname = "clang-manpages";
@@ -105,6 +114,8 @@ let
105114
106115 doCheck = false;
107116
108− meta.description = "man page for Clang ${version}";
117+ meta = llvm_meta // {
118+ description = "man page for Clang ${version}";
119+ };
109120 });
110121in self
pkgs/development/compilers/llvm/12/compiler-rt/default.nix+16−1
@@ -1,4 +1,4 @@
1−{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
1+{ lib, stdenv, llvm_meta, version, fetch, cmake, python3, llvm, libcxxabi }:
22
33let
44
@@ -87,4 +87,19 @@ stdenv.mkDerivation rec {
8787 ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
8888 '';
8989
90+ meta = llvm_meta // {
91+ homepage = "https://compiler-rt.llvm.org/";
92+ description = "Compiler runtime libraries";
93+ longDescription = ''
94+ The compiler-rt project provides highly tuned implementations of the
95+ low-level code generator support routines like "__fixunsdfdi" and other
96+ calls generated when a target doesn't have a short sequence of native
97+ instructions to implement a core IR operation. It also provides
98+ implementations of run-time libraries for dynamic testing tools such as
99+ AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
100+ '';
101+ # "All of the code in the compiler-rt project is dual licensed under the MIT
102+ # license and the UIUC License (a BSD-like license)":
103+ license = with lib.licenses; [ mit ncsa ];
104+ };
90105}
pkgs/development/compilers/llvm/12/default.nix+18−7
@@ -20,6 +20,12 @@ let
2020
2121 clang-tools-extra_src = fetch "clang-tools-extra" "0p3dzr0qa7mar83y66xa5m5apynf6ia0lsdsq6axwnm64ysy0hdd";
2222
23+ llvm_meta = {
24+ license = lib.licenses.ncsa;
25+ maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
26+ platforms = lib.platforms.all;
27+ };
28+
2329 tools = lib.makeExtensible (tools: let
2430 callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
2531 mkExtraBuildCommands = cc: ''
@@ -30,13 +36,16 @@ let
3036 ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
3137 echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
3238 '';
39+
3340 in {
3441
35− llvm = callPackage ./llvm { };
42+ llvm = callPackage ./llvm {
43+ inherit llvm_meta;
44+ };
3645
3746 clang-unwrapped = callPackage ./clang {
3847 inherit (tools) lld;
39− inherit clang-tools-extra_src;
48+ inherit clang-tools-extra_src llvm_meta;
4049 };
4150
4251 # disabled until recommonmark supports sphinx 3
@@ -81,10 +90,12 @@ let
8190 };
8291
8392 lld = callPackage ./lld {
93+ inherit llvm_meta;
8494 libunwind = libraries.libunwind;
8595 };
8696
8797 lldb = callPackage ./lldb {
98+ inherit llvm_meta;
8899 inherit (darwin) libobjc bootstrap_cmds;
89100 inherit (darwin.apple_sdk.libs) xpc;
90101 inherit (darwin.apple_sdk.frameworks) Foundation Carbon Cocoa;
@@ -172,7 +183,7 @@ let
172183 callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
173184 in {
174185
175− compiler-rt = callPackage ./compiler-rt ({} //
186+ compiler-rt = callPackage ./compiler-rt ({ inherit llvm_meta; } //
176187 (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
177188 stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
178189 }));
@@ -181,20 +192,20 @@ let
181192
182193 libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
183194
184− libcxx = callPackage ./libc++ ({} //
195+ libcxx = callPackage ./libc++ ({ inherit llvm_meta; } //
185196 (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
186197 stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
187198 }));
188199
189− libcxxabi = callPackage ./libc++abi ({} //
200+ libcxxabi = callPackage ./libc++abi ({ inherit llvm_meta; } //
190201 (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
191202 stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
192203 libunwind = libraries.libunwind;
193204 }));
194205
195− openmp = callPackage ./openmp.nix {};
206+ openmp = callPackage ./openmp.nix { inherit llvm_meta; };
196207
197− libunwind = callPackage ./libunwind ({} //
208+ libunwind = callPackage ./libunwind ({ inherit llvm_meta; } //
198209 (lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
199210 stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
200211 }));
pkgs/development/compilers/llvm/12/libc++/default.nix+10−5
@@ -1,4 +1,4 @@
1−{ lib, stdenv, fetch, fetchpatch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
1+{ lib, stdenv, llvm_meta, fetch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
22, enableShared ? !stdenv.hostPlatform.isStatic
33}:
44
@@ -40,10 +40,15 @@ stdenv.mkDerivation {
4040 isLLVM = true;
4141 };
4242
43− meta = {
43+ meta = llvm_meta // {
4444 homepage = "https://libcxx.llvm.org/";
45− description = "A new implementation of the C++ standard library, targeting C++11";
46− license = with lib.licenses; [ ncsa mit ];
47− platforms = lib.platforms.all;
45+ description = "C++ standard library";
46+ longDescription = ''
47+ libc++ is an implementation of the C++ standard library, targeting C++11,
48+ C++14 and above.
49+ '';
50+ # "All of the code in libc++ is dual licensed under the MIT license and the
51+ # UIUC License (a BSD-like license)":
52+ license = with lib.licenses; [ mit ncsa ];
4853 };
4954}
pkgs/development/compilers/llvm/12/libc++abi/default.nix+10−6
@@ -1,4 +1,4 @@
1−{ lib, stdenv, cmake, python3, fetch, libcxx, libunwind, llvm, version
1+{ lib, stdenv, llvm_meta, cmake, python3, fetch, libcxx, libunwind, llvm, version
22, enableShared ? !stdenv.hostPlatform.isStatic
33}:
44
@@ -57,11 +57,15 @@ stdenv.mkDerivation {
5757 ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
5858 '';
5959
60− meta = {
60+ meta = llvm_meta // {
6161 homepage = "https://libcxxabi.llvm.org/";
62− description = "A new implementation of low level support for a standard C++ library";
63− license = with lib.licenses; [ ncsa mit ];
64− maintainers = with lib.maintainers; [ vlstill ];
65− platforms = lib.platforms.all;
62+ description = "Provides C++ standard library support";
63+ longDescription = ''
64+ libc++abi is a new implementation of low level support for a standard C++ library.
65+ '';
66+ # "All of the code in libc++abi is dual licensed under the MIT license and
67+ # the UIUC License (a BSD-like license)":
68+ license = with lib.licenses; [ mit ncsa ];
69+ maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
6670 };
6771}
pkgs/development/compilers/llvm/12/libunwind/default.nix+13−1
@@ -1,4 +1,4 @@
1−{ lib, stdenv, version, fetch, libcxx, llvm, cmake
1+{ lib, stdenv, llvm_meta, version, fetch, libcxx, llvm, cmake
22, enableShared ? !stdenv.hostPlatform.isStatic
33}:
44
@@ -18,4 +18,16 @@ stdenv.mkDerivation rec {
1818 nativeBuildInputs = [ cmake ];
1919
2020 cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
21+
22+ meta = llvm_meta // {
23+ # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
24+ homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
25+ description = "LLVM's unwinder library";
26+ longDescription = ''
27+ The unwind library provides a family of _Unwind_* functions implementing
28+ the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
29+ I). It is a dependency of the C++ ABI library, and sometimes is a
30+ dependency of other runtimes.
31+ '';
32+ };
2133}
pkgs/development/compilers/llvm/12/lld/default.nix+12−6
@@ -1,4 +1,4 @@
1−{ lib, stdenv
1+{ lib, stdenv, llvm_meta
22, fetch
33, libunwind
44, cmake
@@ -30,10 +30,16 @@ stdenv.mkDerivation rec {
3030 moveToOutput lib "$dev"
3131 '';
3232
33− meta = {
34− description = "The LLVM Linker";
35− homepage = "https://lld.llvm.org/";
36− license = lib.licenses.ncsa;
37− platforms = lib.platforms.all;
33+ meta = llvm_meta // {
34+ homepage = "https://lld.llvm.org/";
35+ description = "The LLVM linker";
36+ longDescription = ''
37+ LLD is a linker from the LLVM project that is a drop-in replacement for
38+ system linkers and runs much faster than them. It also provides features
39+ that are useful for toolchain developers.
40+ The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS) and
41+ WebAssembly in descending order of completeness. Internally, LLD consists
42+ of several different linkers.
43+ '';
3844 };
3945}
pkgs/development/compilers/llvm/12/lldb/default.nix+12−6
@@ -1,4 +1,4 @@
1−{ lib, stdenv
1+{ lib, stdenv, llvm_meta
22, fetch
33, cmake
44, zlib
@@ -72,11 +72,15 @@ stdenv.mkDerivation (rec {
7272 ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
7373 '';
7474
75− meta = with lib; {
75+ meta = llvm_meta // {
76+ homepage = "https://lldb.llvm.org/";
7677 description = "A next-generation high-performance debugger";
77− homepage = "https://lldb.llvm.org";
78− license = licenses.ncsa;
79− platforms = platforms.all;
78+ longDescription = ''
79+ LLDB is a next generation, high-performance debugger. It is built as a set
80+ of reusable components which highly leverage existing libraries in the
81+ larger LLVM Project, such as the Clang expression parser and LLVM
82+ disassembler.
83+ '';
8084 };
8185} // lib.optionalAttrs enableManpages {
8286 pname = "lldb-manpages";
@@ -99,5 +103,7 @@ stdenv.mkDerivation (rec {
99103
100104 doCheck = false;
101105
102− meta.description = "man pages for LLDB ${version}";
106+ meta = llvm_meta // {
107+ description = "man pages for LLDB ${version}";
108+ };
103109})
pkgs/development/compilers/llvm/12/llvm/default.nix+21−8
@@ -1,4 +1,4 @@
1−{ lib, stdenv
1+{ lib, stdenv, llvm_meta
22, fetch
33, cmake
44, python3
@@ -160,12 +160,23 @@ in stdenv.mkDerivation (rec {
160160 checkTarget = "check-all";
161161
162162 requiredSystemFeatures = [ "big-parallel" ];
163− meta = {
164− description = "Collection of modular and reusable compiler and toolchain technologies";
165− homepage = "https://llvm.org/";
166− license = lib.licenses.ncsa;
167− maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
168− platforms = lib.platforms.all;
163+ meta = llvm_meta // {
164+ homepage = "https://llvm.org/";
165+ description = "A collection of modular and reusable compiler and toolchain technologies";
166+ longDescription = ''
167+ The LLVM Project is a collection of modular and reusable compiler and
168+ toolchain technologies. Despite its name, LLVM has little to do with
169+ traditional virtual machines. The name "LLVM" itself is not an acronym; it
170+ is the full name of the project.
171+ LLVM began as a research project at the University of Illinois, with the
172+ goal of providing a modern, SSA-based compilation strategy capable of
173+ supporting both static and dynamic compilation of arbitrary programming
174+ languages. Since then, LLVM has grown to be an umbrella project consisting
175+ of a number of subprojects, many of which are being used in production by
176+ a wide variety of commercial and open source projects as well as being
177+ widely used in academic research. Code in the LLVM project is licensed
178+ under the "Apache 2.0 License with LLVM exceptions".
179+ '';
169180 };
170181} // lib.optionalAttrs enableManpages {
171182 pname = "llvm-manpages";
@@ -185,5 +196,7 @@ in stdenv.mkDerivation (rec {
185196
186197 doCheck = false;
187198
188− meta.description = "man pages for LLVM ${version}";
199+ meta = llvm_meta // {
200+ description = "man pages for LLVM ${version}";
201+ };
189202})
pkgs/development/compilers/llvm/12/openmp.nix+14−5
@@ -1,5 +1,6 @@
11{ lib
22, stdenv
3+, llvm_meta
34, fetch
45, cmake
56, llvm
@@ -16,10 +17,18 @@ stdenv.mkDerivation rec {
1617 nativeBuildInputs = [ cmake perl ];
1718 buildInputs = [ llvm ];
1819
19− meta = {
20− description = "Components required to build an executable OpenMP program";
21− homepage = "https://openmp.llvm.org/";
22− license = lib.licenses.mit;
23− platforms = lib.platforms.all;
20+ meta = llvm_meta // {
21+ homepage = "https://openmp.llvm.org/";
22+ description = "Support for the OpenMP language";
23+ longDescription = ''
24+ The OpenMP subproject of LLVM contains the components required to build an
25+ executable OpenMP program that are outside the compiler itself.
26+ Contains the code for the runtime library against which code compiled by
27+ "clang -fopenmp" must be linked before it can run and the library that
28+ supports offload to target devices.
29+ '';
30+ # "All of the code is dual licensed under the MIT license and the UIUC
31+ # License (a BSD-like license)":
32+ license = with lib.licenses; [ mit ncsa ];
2433 };
2534}