nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, stdenv
3, llvm_meta
4, fetch
5, fetchpatch
6, cmake
7, llvm
8, targetLlvm
9, perl
10, version
11}:
12
13stdenv.mkDerivation rec {
14 pname = "openmp";
15 inherit version;
16
17 src = fetch pname "0bh5cswgpc79awlq8j5i7hp355adaac7s6zaz0zwp6mkflxli1yi";
18
19 patches = [
20 # Fix compilation on aarch64-darwin, remove after the next release.
21 (fetchpatch {
22 url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
23 sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
24 stripLen = 1;
25 })
26 ];
27
28 nativeBuildInputs = [ cmake perl ];
29 buildInputs = [
30 (if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm)
31 ];
32
33 meta = llvm_meta // {
34 homepage = "https://openmp.llvm.org/";
35 description = "Support for the OpenMP language";
36 longDescription = ''
37 The OpenMP subproject of LLVM contains the components required to build an
38 executable OpenMP program that are outside the compiler itself.
39 Contains the code for the runtime library against which code compiled by
40 "clang -fopenmp" must be linked before it can run and the library that
41 supports offload to target devices.
42 '';
43 # "All of the code is dual licensed under the MIT license and the UIUC
44 # License (a BSD-like license)":
45 license = with lib.licenses; [ mit ncsa ];
46 };
47}