Merge branch 'master' into staging-next
This commit is contained in:
commit
2d0506704b
|
@ -17678,7 +17678,7 @@
|
||||||
name = "Sanskar Gurdasani";
|
name = "Sanskar Gurdasani";
|
||||||
};
|
};
|
||||||
sarahec = {
|
sarahec = {
|
||||||
email = "sarahec@nextquestion.net";
|
email = "seclark@nextquestion.net";
|
||||||
github = "sarahec";
|
github = "sarahec";
|
||||||
githubId = 11277967;
|
githubId = 11277967;
|
||||||
name = "Sarah Clark";
|
name = "Sarah Clark";
|
||||||
|
|
|
@ -32,11 +32,11 @@
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "calibre";
|
pname = "calibre";
|
||||||
version = "7.7.0";
|
version = "7.8.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.calibre-ebook.com/${finalAttrs.version}/calibre-${finalAttrs.version}.tar.xz";
|
url = "https://download.calibre-ebook.com/${finalAttrs.version}/calibre-${finalAttrs.version}.tar.xz";
|
||||||
hash = "sha256-+kz3Fz1RDQ+ROgv7y0WNAWvIESKvHKID8UnSeCh8yA4=";
|
hash = "sha256-FxYuQzzuaWZihSsmeJc6ssG3VBr2YNEi3TkXyyymLUQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pname = "beeper";
|
pname = "beeper";
|
||||||
version = "3.102.14";
|
version = "3.103.36";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.todesktop.com/2003241lzgn20jd/beeper-3.102.14-build-24040616ytycz8q-x86_64.AppImage";
|
url = "https://download.todesktop.com/2003241lzgn20jd/beeper-3.103.36-build-240411hw9xbpc7s-x86_64.AppImage";
|
||||||
hash = "sha256-A+0dXAddZq7GWMyi9v1g0B9f7b6COMkFlm8bX4XXvzU=";
|
hash = "sha256-qxu/a8eeWeOKCsno51J2IHUXTXH82KXBNajfoEkkid8=";
|
||||||
};
|
};
|
||||||
appimage = appimageTools.wrapType2 {
|
appimage = appimageTools.wrapType2 {
|
||||||
inherit version pname src;
|
inherit version pname src;
|
||||||
|
|
|
@ -45,14 +45,14 @@ let
|
||||||
|
|
||||||
pname = "slack";
|
pname = "slack";
|
||||||
|
|
||||||
x86_64-darwin-version = "4.37.94";
|
x86_64-darwin-version = "4.37.101";
|
||||||
x86_64-darwin-sha256 = "01v7v977fq8mfsl0lipdc7ig55p2sknxzr1jmh8qxiq4f4y0rj5g";
|
x86_64-darwin-sha256 = "03k4iv6y7y1z9ac7if35r3lk7kp7ic4aa4rdyzbrzihvpfb3nvdh";
|
||||||
|
|
||||||
x86_64-linux-version = "4.37.94";
|
x86_64-linux-version = "4.37.101";
|
||||||
x86_64-linux-sha256 = "1f1spl767ldrarvpxrayry2d0nyr22b8xacxl4g1r8raryvnyz0x";
|
x86_64-linux-sha256 = "0vmaam0aiqcqmm8n3zrjmf012d6pdi0g1d08v1zhgx2rhl614ff9";
|
||||||
|
|
||||||
aarch64-darwin-version = "4.37.94";
|
aarch64-darwin-version = "4.37.101";
|
||||||
aarch64-darwin-sha256 = "0gh45gvlbjzxh0fn24z15glxqih5lggam8w6kpawsxgivkw6rjcc";
|
aarch64-darwin-sha256 = "07qfqrq32sh5cw7vmq2x0s5zvkvcl7j1kkvdncg36fay9276f2pp";
|
||||||
|
|
||||||
version = {
|
version = {
|
||||||
x86_64-darwin = x86_64-darwin-version;
|
x86_64-darwin = x86_64-darwin-version;
|
||||||
|
|
|
@ -27,11 +27,11 @@ let
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "unciv";
|
pname = "unciv";
|
||||||
version = "4.11.2";
|
version = "4.11.4";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar";
|
url = "https://github.com/yairm210/Unciv/releases/download/${version}/Unciv.jar";
|
||||||
hash = "sha256-ZUDfJf+FgIX8gRoZYlYAJhpLwNWp3MCKEQOSQGQ88T8=";
|
hash = "sha256-QqnM1kTXHHpf8l99J8ydIjTkl/LetijzIJgLYt6OaRA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|
|
@ -1,132 +0,0 @@
|
||||||
{ lib, stdenv, llvm_meta, fetch, substituteAll, cmake, libxml2, libllvm, version, clang-tools-extra_src, python3
|
|
||||||
, buildLlvmTools
|
|
||||||
, fixDarwinDylibNames
|
|
||||||
, enableManpages ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
self = stdenv.mkDerivation ({
|
|
||||||
pname = "clang";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = fetch "clang" "0px4gl27az6cdz6adds89qzdwb1cqpjsfvrldbz9qvpmphrj34bf";
|
|
||||||
inherit clang-tools-extra_src;
|
|
||||||
|
|
||||||
unpackPhase = ''
|
|
||||||
unpackFile $src
|
|
||||||
mv clang-* clang
|
|
||||||
sourceRoot=$PWD/clang
|
|
||||||
unpackFile ${clang-tools-extra_src}
|
|
||||||
mv clang-tools-extra-* $sourceRoot/tools/extra
|
|
||||||
substituteInPlace $sourceRoot/tools/extra/clangd/quality/CompletionModel.cmake \
|
|
||||||
--replace ' ''${CMAKE_SOURCE_DIR}/../clang-tools-extra' ' ''${CMAKE_SOURCE_DIR}/tools/extra'
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ]
|
|
||||||
++ lib.optional enableManpages python3.pkgs.sphinx
|
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
||||||
|
|
||||||
buildInputs = [ libxml2 libllvm ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DCLANGD_BUILD_XPC=OFF"
|
|
||||||
"-DLLVM_ENABLE_RTTI=ON"
|
|
||||||
] ++ lib.optionals enableManpages [
|
|
||||||
"-DCLANG_INCLUDE_DOCS=ON"
|
|
||||||
"-DLLVM_ENABLE_SPHINX=ON"
|
|
||||||
"-DSPHINX_OUTPUT_MAN=ON"
|
|
||||||
"-DSPHINX_OUTPUT_HTML=OFF"
|
|
||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
|
||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
|
||||||
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
|
|
||||||
];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./purity.patch
|
|
||||||
# https://reviews.llvm.org/D51899
|
|
||||||
./gnu-install-dirs.patch
|
|
||||||
(substituteAll {
|
|
||||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
|
||||||
libllvmLibdir = "${libllvm.lib}/lib";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
|
|
||||||
-e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
|
|
||||||
lib/Driver/ToolChains/*.cpp
|
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
||||||
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
ln -sv $out/bin/clang $out/bin/cpp
|
|
||||||
|
|
||||||
# Move libclang to 'lib' output
|
|
||||||
moveToOutput "lib/libclang.*" "$lib"
|
|
||||||
moveToOutput "lib/libclang-cpp.*" "$lib"
|
|
||||||
substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
|
||||||
|
|
||||||
mkdir -p $python/bin $python/share/{clang,scan-view}
|
|
||||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
|
||||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
|
||||||
mv $out/bin/set-xcode-analyzer $python/bin
|
|
||||||
fi
|
|
||||||
mv $out/share/clang/*.py $python/share/clang
|
|
||||||
mv $out/share/scan-view/*.py $python/share/scan-view
|
|
||||||
rm $out/bin/c-index-test
|
|
||||||
patchShebangs $python/bin
|
|
||||||
|
|
||||||
mkdir -p $dev/bin
|
|
||||||
cp bin/clang-tblgen $dev/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit libllvm;
|
|
||||||
isClang = true;
|
|
||||||
hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
homepage = "https://clang.llvm.org/";
|
|
||||||
description = "A C language family frontend for LLVM";
|
|
||||||
longDescription = ''
|
|
||||||
The Clang project provides a language front-end and tooling
|
|
||||||
infrastructure for languages in the C language family (C, C++, Objective
|
|
||||||
C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
|
|
||||||
It aims to deliver amazingly fast compiles, extremely useful error and
|
|
||||||
warning messages and to provide a platform for building great source
|
|
||||||
level tools. The Clang Static Analyzer and clang-tidy are tools that
|
|
||||||
automatically find bugs in your code, and are great examples of the sort
|
|
||||||
of tools that can be built using the Clang frontend as a library to
|
|
||||||
parse C/C++ code.
|
|
||||||
'';
|
|
||||||
mainProgram = "clang";
|
|
||||||
};
|
|
||||||
} // lib.optionalAttrs enableManpages {
|
|
||||||
pname = "clang-manpages";
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
make docs-clang-man
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/man/man1
|
|
||||||
# Manually install clang manpage
|
|
||||||
cp docs/man/*.1 $out/share/man/man1/
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" ];
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
description = "man page for Clang ${version}";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in self
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||||
, preLibcCrossHeaders
|
, preLibcCrossHeaders
|
||||||
, substitute, fetchFromGitHub, fetchpatch
|
, substitute, substituteAll, fetchFromGitHub, fetchpatch
|
||||||
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
|
@ -56,7 +56,7 @@ let
|
||||||
then tools.bintools
|
then tools.bintools
|
||||||
else bootBintools;
|
else bootBintools;
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
libllvm = callPackage ./llvm {
|
libllvm = callPackage ./llvm {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
|
@ -66,7 +66,17 @@ let
|
||||||
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
||||||
llvm = tools.libllvm;
|
llvm = tools.libllvm;
|
||||||
|
|
||||||
libclang = callPackage ./clang {
|
libclang = callPackage ../common/clang {
|
||||||
|
src = fetch "clang" "0px4gl27az6cdz6adds89qzdwb1cqpjsfvrldbz9qvpmphrj34bf";
|
||||||
|
patches = [
|
||||||
|
./clang/purity.patch
|
||||||
|
# https://reviews.llvm.org/D51899
|
||||||
|
./clang/gnu-install-dirs.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
|
];
|
||||||
inherit clang-tools-extra_src llvm_meta;
|
inherit clang-tools-extra_src llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,126 +0,0 @@
|
||||||
{ lib, stdenv, llvm_meta, src, substituteAll, cmake, libxml2, libllvm, version, python3
|
|
||||||
, buildLlvmTools
|
|
||||||
, fixDarwinDylibNames
|
|
||||||
, enableManpages ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
self = stdenv.mkDerivation ({
|
|
||||||
pname = "clang";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
inherit src;
|
|
||||||
sourceRoot = "${src.name}/clang";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ]
|
|
||||||
++ lib.optional enableManpages python3.pkgs.sphinx
|
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
||||||
|
|
||||||
buildInputs = [ libxml2 libllvm ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DCLANGD_BUILD_XPC=OFF"
|
|
||||||
"-DLLVM_ENABLE_RTTI=ON"
|
|
||||||
] ++ lib.optionals enableManpages [
|
|
||||||
"-DCLANG_INCLUDE_DOCS=ON"
|
|
||||||
"-DLLVM_ENABLE_SPHINX=ON"
|
|
||||||
"-DSPHINX_OUTPUT_MAN=ON"
|
|
||||||
"-DSPHINX_OUTPUT_HTML=OFF"
|
|
||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
|
||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
|
||||||
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
|
|
||||||
];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./purity.patch
|
|
||||||
# https://reviews.llvm.org/D51899
|
|
||||||
./gnu-install-dirs.patch
|
|
||||||
# Revert of https://reviews.llvm.org/D100879
|
|
||||||
# The malloc alignment assumption is incorrect for jemalloc and causes
|
|
||||||
# mis-compilation in firefox.
|
|
||||||
# See: https://bugzilla.mozilla.org/show_bug.cgi?id=1741454
|
|
||||||
./revert-malloc-alignment-assumption.patch
|
|
||||||
../../common/clang/add-nostdlibinc-flag.patch
|
|
||||||
(substituteAll {
|
|
||||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
|
||||||
libllvmLibdir = "${libllvm.lib}/lib";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
(cd tools && ln -s ../../clang-tools-extra extra)
|
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
||||||
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
ln -sv $out/bin/clang $out/bin/cpp
|
|
||||||
|
|
||||||
# Move libclang to 'lib' output
|
|
||||||
moveToOutput "lib/libclang.*" "$lib"
|
|
||||||
moveToOutput "lib/libclang-cpp.*" "$lib"
|
|
||||||
substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
|
||||||
|
|
||||||
mkdir -p $python/bin $python/share/{clang,scan-view}
|
|
||||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
|
||||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
|
||||||
mv $out/bin/set-xcode-analyzer $python/bin
|
|
||||||
fi
|
|
||||||
mv $out/share/clang/*.py $python/share/clang
|
|
||||||
mv $out/share/scan-view/*.py $python/share/scan-view
|
|
||||||
rm $out/bin/c-index-test
|
|
||||||
patchShebangs $python/bin
|
|
||||||
|
|
||||||
mkdir -p $dev/bin
|
|
||||||
cp bin/clang-tblgen $dev/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit libllvm;
|
|
||||||
isClang = true;
|
|
||||||
hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
homepage = "https://clang.llvm.org/";
|
|
||||||
description = "A C language family frontend for LLVM";
|
|
||||||
longDescription = ''
|
|
||||||
The Clang project provides a language front-end and tooling
|
|
||||||
infrastructure for languages in the C language family (C, C++, Objective
|
|
||||||
C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
|
|
||||||
It aims to deliver amazingly fast compiles, extremely useful error and
|
|
||||||
warning messages and to provide a platform for building great source
|
|
||||||
level tools. The Clang Static Analyzer and clang-tidy are tools that
|
|
||||||
automatically find bugs in your code, and are great examples of the sort
|
|
||||||
of tools that can be built using the Clang frontend as a library to
|
|
||||||
parse C/C++ code.
|
|
||||||
'';
|
|
||||||
mainProgram = "clang";
|
|
||||||
};
|
|
||||||
} // lib.optionalAttrs enableManpages {
|
|
||||||
pname = "clang-manpages";
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
make docs-clang-man
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/man/man1
|
|
||||||
# Manually install clang manpage
|
|
||||||
cp docs/man/*.1 $out/share/man/man1/
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" ];
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
description = "man page for Clang ${version}";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in self
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||||
, preLibcCrossHeaders
|
, preLibcCrossHeaders
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, libxml2, python3, isl, fetchFromGitHub, substitute, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, isl, fetchFromGitHub, substitute, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
, targetLlvm
|
, targetLlvm
|
||||||
|
@ -82,7 +82,7 @@ in let
|
||||||
then tools.bintools
|
then tools.bintools
|
||||||
else bootBintools;
|
else bootBintools;
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
libllvm = callPackage ./llvm {
|
libllvm = callPackage ./llvm {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
|
@ -92,7 +92,22 @@ in let
|
||||||
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
||||||
llvm = tools.libllvm;
|
llvm = tools.libllvm;
|
||||||
|
|
||||||
libclang = callPackage ./clang {
|
libclang = callPackage ../common/clang {
|
||||||
|
patches = [
|
||||||
|
./clang/purity.patch
|
||||||
|
# https://reviews.llvm.org/D51899
|
||||||
|
./clang/gnu-install-dirs.patch
|
||||||
|
# Revert of https://reviews.llvm.org/D100879
|
||||||
|
# The malloc alignment assumption is incorrect for jemalloc and causes
|
||||||
|
# mis-compilation in firefox.
|
||||||
|
# See: https://bugzilla.mozilla.org/show_bug.cgi?id=1741454
|
||||||
|
./clang/revert-malloc-alignment-assumption.patch
|
||||||
|
../common/clang/add-nostdlibinc-flag.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
|
];
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,129 +0,0 @@
|
||||||
{ lib, stdenv, llvm_meta
|
|
||||||
, monorepoSrc, runCommand
|
|
||||||
, substituteAll, cmake, libxml2, libllvm, version, python3
|
|
||||||
, buildLlvmTools
|
|
||||||
, fixDarwinDylibNames
|
|
||||||
, enableManpages ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
self = stdenv.mkDerivation (rec {
|
|
||||||
pname = "clang";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = runCommand "${pname}-src-${version}" {} ''
|
|
||||||
mkdir -p "$out"
|
|
||||||
cp -r ${monorepoSrc}/cmake "$out"
|
|
||||||
cp -r ${monorepoSrc}/${pname} "$out"
|
|
||||||
cp -r ${monorepoSrc}/clang-tools-extra "$out"
|
|
||||||
'';
|
|
||||||
|
|
||||||
sourceRoot = "${src.name}/${pname}";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python3 ]
|
|
||||||
++ lib.optional enableManpages python3.pkgs.sphinx
|
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
||||||
|
|
||||||
buildInputs = [ libxml2 libllvm ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DCLANGD_BUILD_XPC=OFF"
|
|
||||||
"-DLLVM_ENABLE_RTTI=ON"
|
|
||||||
] ++ lib.optionals enableManpages [
|
|
||||||
"-DCLANG_INCLUDE_DOCS=ON"
|
|
||||||
"-DLLVM_ENABLE_SPHINX=ON"
|
|
||||||
"-DSPHINX_OUTPUT_MAN=ON"
|
|
||||||
"-DSPHINX_OUTPUT_HTML=OFF"
|
|
||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
|
||||||
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
|
||||||
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
|
|
||||||
];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./purity.patch
|
|
||||||
# https://reviews.llvm.org/D51899
|
|
||||||
./gnu-install-dirs.patch
|
|
||||||
../../common/clang/add-nostdlibinc-flag.patch
|
|
||||||
(substituteAll {
|
|
||||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
|
||||||
libllvmLibdir = "${libllvm.lib}/lib";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
(cd tools && ln -s ../../clang-tools-extra extra)
|
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
||||||
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
ln -sv $out/bin/clang $out/bin/cpp
|
|
||||||
|
|
||||||
# Move libclang to 'lib' output
|
|
||||||
moveToOutput "lib/libclang.*" "$lib"
|
|
||||||
moveToOutput "lib/libclang-cpp.*" "$lib"
|
|
||||||
substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
|
||||||
|
|
||||||
mkdir -p $python/bin $python/share/{clang,scan-view}
|
|
||||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
|
||||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
|
||||||
mv $out/bin/set-xcode-analyzer $python/bin
|
|
||||||
fi
|
|
||||||
mv $out/share/clang/*.py $python/share/clang
|
|
||||||
mv $out/share/scan-view/*.py $python/share/scan-view
|
|
||||||
rm $out/bin/c-index-test
|
|
||||||
patchShebangs $python/bin
|
|
||||||
|
|
||||||
mkdir -p $dev/bin
|
|
||||||
cp bin/clang-tblgen $dev/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit libllvm;
|
|
||||||
isClang = true;
|
|
||||||
hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
homepage = "https://clang.llvm.org/";
|
|
||||||
description = "A C language family frontend for LLVM";
|
|
||||||
longDescription = ''
|
|
||||||
The Clang project provides a language front-end and tooling
|
|
||||||
infrastructure for languages in the C language family (C, C++, Objective
|
|
||||||
C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
|
|
||||||
It aims to deliver amazingly fast compiles, extremely useful error and
|
|
||||||
warning messages and to provide a platform for building great source
|
|
||||||
level tools. The Clang Static Analyzer and clang-tidy are tools that
|
|
||||||
automatically find bugs in your code, and are great examples of the sort
|
|
||||||
of tools that can be built using the Clang frontend as a library to
|
|
||||||
parse C/C++ code.
|
|
||||||
'';
|
|
||||||
mainProgram = "clang";
|
|
||||||
};
|
|
||||||
} // lib.optionalAttrs enableManpages {
|
|
||||||
pname = "clang-manpages";
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
make docs-clang-man
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/man/man1
|
|
||||||
# Manually install clang manpage
|
|
||||||
cp docs/man/*.1 $out/share/man/man1/
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" ];
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
description = "man page for Clang ${version}";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in self
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
|
||||||
, preLibcCrossHeaders
|
, preLibcCrossHeaders
|
||||||
, libxml2, python3, fetchFromGitHub, substitute, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, fetchFromGitHub, substitute, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
, targetLlvm
|
, targetLlvm
|
||||||
|
@ -78,7 +78,7 @@ in let
|
||||||
then tools.bintools
|
then tools.bintools
|
||||||
else bootBintools;
|
else bootBintools;
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
libllvm = callPackage ./llvm {
|
libllvm = callPackage ./llvm {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
|
@ -88,7 +88,17 @@ in let
|
||||||
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
||||||
llvm = tools.libllvm;
|
llvm = tools.libllvm;
|
||||||
|
|
||||||
libclang = callPackage ./clang {
|
libclang = callPackage ../common/clang {
|
||||||
|
patches = [
|
||||||
|
./clang/purity.patch
|
||||||
|
# https://reviews.llvm.org/D51899
|
||||||
|
./clang/gnu-install-dirs.patch
|
||||||
|
../common/clang/add-nostdlibinc-flag.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
|
];
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
||||||
, preLibcCrossHeaders
|
, preLibcCrossHeaders
|
||||||
, libxml2, python3, fetchFromGitHub, fetchpatch, substitute, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, fetchFromGitHub, fetchpatch, substitute, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
, targetLlvm
|
, targetLlvm
|
||||||
|
@ -84,7 +84,7 @@ in let
|
||||||
then tools.bintools
|
then tools.bintools
|
||||||
else bootBintools;
|
else bootBintools;
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
libllvm = callPackage ./llvm {
|
libllvm = callPackage ./llvm {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
|
@ -94,7 +94,17 @@ in let
|
||||||
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
||||||
llvm = tools.libllvm;
|
llvm = tools.libllvm;
|
||||||
|
|
||||||
libclang = callPackage ./clang {
|
libclang = callPackage ../common/clang {
|
||||||
|
patches = [
|
||||||
|
./clang/purity.patch
|
||||||
|
# https://reviews.llvm.org/D51899
|
||||||
|
./clang/gnu-install-dirs.patch
|
||||||
|
../common/clang/add-nostdlibinc-flag.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../common/clang/clang-11-15-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
|
];
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,137 +0,0 @@
|
||||||
{ lib, stdenv, llvm_meta
|
|
||||||
, monorepoSrc, runCommand
|
|
||||||
, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
|
|
||||||
, buildLlvmTools
|
|
||||||
, fixDarwinDylibNames
|
|
||||||
, enableManpages ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
self = stdenv.mkDerivation (finalAttrs: rec {
|
|
||||||
pname = "clang";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = runCommand "${pname}-src-${version}" {} ''
|
|
||||||
mkdir -p "$out"
|
|
||||||
cp -r ${monorepoSrc}/cmake "$out"
|
|
||||||
cp -r ${monorepoSrc}/${pname} "$out"
|
|
||||||
cp -r ${monorepoSrc}/clang-tools-extra "$out"
|
|
||||||
'';
|
|
||||||
|
|
||||||
sourceRoot = "${src.name}/${pname}";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ninja python3 ]
|
|
||||||
++ lib.optional enableManpages python3.pkgs.sphinx
|
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
||||||
|
|
||||||
buildInputs = [ libxml2 libllvm ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
|
|
||||||
"-DCLANGD_BUILD_XPC=OFF"
|
|
||||||
"-DLLVM_ENABLE_RTTI=ON"
|
|
||||||
] ++ lib.optionals enableManpages [
|
|
||||||
"-DCLANG_INCLUDE_DOCS=ON"
|
|
||||||
"-DLLVM_ENABLE_SPHINX=ON"
|
|
||||||
"-DSPHINX_OUTPUT_MAN=ON"
|
|
||||||
"-DSPHINX_OUTPUT_HTML=OFF"
|
|
||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
|
||||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
|
||||||
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
|
|
||||||
# Added in LLVM15:
|
|
||||||
# `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
|
|
||||||
# `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
|
|
||||||
"-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
|
|
||||||
"-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
|
|
||||||
];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./purity.patch
|
|
||||||
# https://reviews.llvm.org/D51899
|
|
||||||
./gnu-install-dirs.patch
|
|
||||||
../../common/clang/add-nostdlibinc-flag.patch
|
|
||||||
(substituteAll {
|
|
||||||
src = ../../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
|
||||||
libllvmLibdir = "${libllvm.lib}/lib";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
(cd tools && ln -s ../../clang-tools-extra extra)
|
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
||||||
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
ln -sv $out/bin/clang $out/bin/cpp
|
|
||||||
|
|
||||||
# Move libclang to 'lib' output
|
|
||||||
moveToOutput "lib/libclang.*" "$lib"
|
|
||||||
moveToOutput "lib/libclang-cpp.*" "$lib"
|
|
||||||
substituteInPlace $dev/lib/cmake/clang/ClangTargets-release.cmake \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
|
||||||
|
|
||||||
mkdir -p $python/bin $python/share/clang/
|
|
||||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
|
||||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
|
||||||
mv $out/bin/set-xcode-analyzer $python/bin
|
|
||||||
fi
|
|
||||||
mv $out/share/clang/*.py $python/share/clang
|
|
||||||
rm $out/bin/c-index-test
|
|
||||||
patchShebangs $python/bin
|
|
||||||
|
|
||||||
mkdir -p $dev/bin
|
|
||||||
cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit libllvm;
|
|
||||||
isClang = true;
|
|
||||||
hardeningUnsupportedFlags = [
|
|
||||||
"fortify3"
|
|
||||||
];
|
|
||||||
hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
|
|
||||||
lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
|
|
||||||
++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
homepage = "https://clang.llvm.org/";
|
|
||||||
description = "A C language family frontend for LLVM";
|
|
||||||
longDescription = ''
|
|
||||||
The Clang project provides a language front-end and tooling
|
|
||||||
infrastructure for languages in the C language family (C, C++, Objective
|
|
||||||
C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
|
|
||||||
It aims to deliver amazingly fast compiles, extremely useful error and
|
|
||||||
warning messages and to provide a platform for building great source
|
|
||||||
level tools. The Clang Static Analyzer and clang-tidy are tools that
|
|
||||||
automatically find bugs in your code, and are great examples of the sort
|
|
||||||
of tools that can be built using the Clang frontend as a library to
|
|
||||||
parse C/C++ code.
|
|
||||||
'';
|
|
||||||
mainProgram = "clang";
|
|
||||||
};
|
|
||||||
} // lib.optionalAttrs enableManpages {
|
|
||||||
pname = "clang-manpages";
|
|
||||||
|
|
||||||
ninjaFlags = [ "docs-clang-man" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/man/man1
|
|
||||||
# Manually install clang manpage
|
|
||||||
cp docs/man/*.1 $out/share/man/man1/
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" ];
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
description = "man page for Clang ${version}";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in self
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
||||||
, preLibcCrossHeaders
|
, preLibcCrossHeaders
|
||||||
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, fetchFromGitHub, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
, targetLlvm
|
, targetLlvm
|
||||||
|
@ -85,7 +85,7 @@ in let
|
||||||
then tools.bintools
|
then tools.bintools
|
||||||
else bootBintools;
|
else bootBintools;
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
libllvm = callPackage ./llvm {
|
libllvm = callPackage ./llvm {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
|
@ -95,7 +95,17 @@ in let
|
||||||
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
||||||
llvm = tools.libllvm;
|
llvm = tools.libllvm;
|
||||||
|
|
||||||
libclang = callPackage ./clang {
|
libclang = callPackage ../common/clang {
|
||||||
|
patches = [
|
||||||
|
./clang/purity.patch
|
||||||
|
# https://reviews.llvm.org/D51899
|
||||||
|
./clang/gnu-install-dirs.patch
|
||||||
|
../common/clang/add-nostdlibinc-flag.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
|
];
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,141 +0,0 @@
|
||||||
{ lib, stdenv, llvm_meta
|
|
||||||
, monorepoSrc, runCommand
|
|
||||||
, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
|
|
||||||
, buildLlvmTools
|
|
||||||
, fixDarwinDylibNames
|
|
||||||
, enableManpages ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
self = stdenv.mkDerivation (finalAttrs: rec {
|
|
||||||
pname = "clang";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = runCommand "${pname}-src-${version}" {} ''
|
|
||||||
mkdir -p "$out"
|
|
||||||
cp -r ${monorepoSrc}/cmake "$out"
|
|
||||||
cp -r ${monorepoSrc}/${pname} "$out"
|
|
||||||
cp -r ${monorepoSrc}/clang-tools-extra "$out"
|
|
||||||
'';
|
|
||||||
|
|
||||||
sourceRoot = "${src.name}/${pname}";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ninja python3 ]
|
|
||||||
++ lib.optional enableManpages python3.pkgs.sphinx
|
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
||||||
|
|
||||||
buildInputs = [ libxml2 libllvm ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
|
|
||||||
"-DCLANGD_BUILD_XPC=OFF"
|
|
||||||
"-DLLVM_ENABLE_RTTI=ON"
|
|
||||||
"-DLLVM_INCLUDE_TESTS=OFF"
|
|
||||||
] ++ lib.optionals enableManpages [
|
|
||||||
"-DCLANG_INCLUDE_DOCS=ON"
|
|
||||||
"-DLLVM_ENABLE_SPHINX=ON"
|
|
||||||
"-DSPHINX_OUTPUT_MAN=ON"
|
|
||||||
"-DSPHINX_OUTPUT_HTML=OFF"
|
|
||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
|
||||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
|
||||||
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
|
|
||||||
# Added in LLVM15:
|
|
||||||
# `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
|
|
||||||
# `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
|
|
||||||
"-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
|
|
||||||
"-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
|
|
||||||
];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./purity.patch
|
|
||||||
# https://reviews.llvm.org/D51899
|
|
||||||
./gnu-install-dirs.patch
|
|
||||||
../../common/clang/add-nostdlibinc-flag.patch
|
|
||||||
(substituteAll {
|
|
||||||
src = ../../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
|
||||||
libllvmLibdir = "${libllvm.lib}/lib";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
(cd tools && ln -s ../../clang-tools-extra extra)
|
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
||||||
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
ln -sv $out/bin/clang $out/bin/cpp
|
|
||||||
|
|
||||||
mkdir -p $lib/lib/clang
|
|
||||||
mv $lib/lib/17 $lib/lib/clang/17
|
|
||||||
|
|
||||||
# Move libclang to 'lib' output
|
|
||||||
moveToOutput "lib/libclang.*" "$lib"
|
|
||||||
moveToOutput "lib/libclang-cpp.*" "$lib"
|
|
||||||
substituteInPlace $dev/lib/cmake/clang/ClangTargets-release.cmake \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
|
||||||
|
|
||||||
mkdir -p $python/bin $python/share/clang/
|
|
||||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
|
||||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
|
||||||
mv $out/bin/set-xcode-analyzer $python/bin
|
|
||||||
fi
|
|
||||||
mv $out/share/clang/*.py $python/share/clang
|
|
||||||
rm $out/bin/c-index-test
|
|
||||||
patchShebangs $python/bin
|
|
||||||
|
|
||||||
mkdir -p $dev/bin
|
|
||||||
cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit libllvm;
|
|
||||||
isClang = true;
|
|
||||||
hardeningUnsupportedFlags = [
|
|
||||||
"fortify3"
|
|
||||||
];
|
|
||||||
hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
|
|
||||||
lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
|
|
||||||
++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
homepage = "https://clang.llvm.org/";
|
|
||||||
description = "A C language family frontend for LLVM";
|
|
||||||
longDescription = ''
|
|
||||||
The Clang project provides a language front-end and tooling
|
|
||||||
infrastructure for languages in the C language family (C, C++, Objective
|
|
||||||
C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
|
|
||||||
It aims to deliver amazingly fast compiles, extremely useful error and
|
|
||||||
warning messages and to provide a platform for building great source
|
|
||||||
level tools. The Clang Static Analyzer and clang-tidy are tools that
|
|
||||||
automatically find bugs in your code, and are great examples of the sort
|
|
||||||
of tools that can be built using the Clang frontend as a library to
|
|
||||||
parse C/C++ code.
|
|
||||||
'';
|
|
||||||
mainProgram = "clang";
|
|
||||||
};
|
|
||||||
} // lib.optionalAttrs enableManpages {
|
|
||||||
pname = "clang-manpages";
|
|
||||||
|
|
||||||
ninjaFlags = [ "docs-clang-man" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/man/man1
|
|
||||||
# Manually install clang manpage
|
|
||||||
cp docs/man/*.1 $out/share/man/man1/
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" ];
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
description = "man page for Clang ${version}";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in self
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
||||||
, preLibcCrossHeaders
|
, preLibcCrossHeaders
|
||||||
, libxml2, python3, fetchFromGitHub, fetchpatch, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, fetchFromGitHub, fetchpatch, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
, targetLlvm
|
, targetLlvm
|
||||||
|
@ -80,7 +80,7 @@ in let
|
||||||
then tools.bintools
|
then tools.bintools
|
||||||
else bootBintools;
|
else bootBintools;
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
libllvm = callPackage ./llvm {
|
libllvm = callPackage ./llvm {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
|
@ -90,7 +90,17 @@ in let
|
||||||
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
||||||
llvm = tools.libllvm;
|
llvm = tools.libllvm;
|
||||||
|
|
||||||
libclang = callPackage ./clang {
|
libclang = callPackage ../common/clang {
|
||||||
|
patches = [
|
||||||
|
./clang/purity.patch
|
||||||
|
# https://reviews.llvm.org/D51899
|
||||||
|
./clang/gnu-install-dirs.patch
|
||||||
|
../common/clang/add-nostdlibinc-flag.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
|
];
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
||||||
, preLibcCrossHeaders
|
, preLibcCrossHeaders
|
||||||
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, fetchFromGitHub, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
, targetLlvm
|
, targetLlvm
|
||||||
|
@ -80,7 +80,7 @@ in let
|
||||||
then tools.bintools
|
then tools.bintools
|
||||||
else bootBintools;
|
else bootBintools;
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
libllvm = callPackage ./llvm {
|
libllvm = callPackage ./llvm {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
|
@ -90,7 +90,17 @@ in let
|
||||||
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
||||||
llvm = tools.libllvm;
|
llvm = tools.libllvm;
|
||||||
|
|
||||||
libclang = callPackage ./clang {
|
libclang = callPackage ../common/clang {
|
||||||
|
patches = [
|
||||||
|
./clang/purity.patch
|
||||||
|
# https://reviews.llvm.org/D51899
|
||||||
|
./clang/gnu-install-dirs.patch
|
||||||
|
../common/clang/add-nostdlibinc-flag.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
|
];
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,109 +1,145 @@
|
||||||
{ lib, stdenv, llvm_meta
|
{ lib
|
||||||
, monorepoSrc, runCommand
|
, stdenv
|
||||||
, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
|
, llvm_meta
|
||||||
|
, patches ? []
|
||||||
|
, src ? null
|
||||||
|
, monorepoSrc ? null
|
||||||
|
, runCommand
|
||||||
|
, substituteAll
|
||||||
|
, cmake
|
||||||
|
, ninja
|
||||||
|
, libxml2
|
||||||
|
, libllvm
|
||||||
|
, release_version
|
||||||
|
, version
|
||||||
|
, python3
|
||||||
, buildLlvmTools
|
, buildLlvmTools
|
||||||
, fixDarwinDylibNames
|
, fixDarwinDylibNames
|
||||||
, enableManpages ? false
|
, enableManpages ? false
|
||||||
|
, clang-tools-extra_src ? null
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
self = stdenv.mkDerivation (finalAttrs: rec {
|
pname = "clang";
|
||||||
pname = "clang";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = runCommand "${pname}-src-${version}" {} ''
|
src' = if monorepoSrc != null then
|
||||||
|
runCommand "${pname}-src-${version}" {} ''
|
||||||
mkdir -p "$out"
|
mkdir -p "$out"
|
||||||
cp -r ${monorepoSrc}/cmake "$out"
|
cp -r ${monorepoSrc}/cmake "$out"
|
||||||
cp -r ${monorepoSrc}/${pname} "$out"
|
cp -r ${monorepoSrc}/${pname} "$out"
|
||||||
cp -r ${monorepoSrc}/clang-tools-extra "$out"
|
cp -r ${monorepoSrc}/clang-tools-extra "$out"
|
||||||
'';
|
'' else src;
|
||||||
|
|
||||||
sourceRoot = "${src.name}/${pname}";
|
self = stdenv.mkDerivation (finalAttrs: rec {
|
||||||
|
inherit pname version patches;
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ninja python3 ]
|
src = src';
|
||||||
|
|
||||||
|
sourceRoot = if lib.versionOlder release_version "13" then null
|
||||||
|
else "${src.name}/${pname}";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake ]
|
||||||
|
++ (lib.optional (lib.versionAtLeast release_version "15") ninja)
|
||||||
|
++ [ python3 ]
|
||||||
|
++ lib.optional (lib.versionAtLeast version "18" && enableManpages) python3.pkgs.myst-parser
|
||||||
++ lib.optional enableManpages python3.pkgs.sphinx
|
++ lib.optional enableManpages python3.pkgs.sphinx
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
buildInputs = [ libxml2 libllvm ];
|
buildInputs = [ libxml2 libllvm ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = (lib.optionals (lib.versionAtLeast release_version "15") [
|
||||||
"-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
|
"-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
|
||||||
|
]) ++ [
|
||||||
"-DCLANGD_BUILD_XPC=OFF"
|
"-DCLANGD_BUILD_XPC=OFF"
|
||||||
"-DLLVM_ENABLE_RTTI=ON"
|
"-DLLVM_ENABLE_RTTI=ON"
|
||||||
|
] ++ lib.optionals (lib.versionAtLeast release_version "17") [
|
||||||
|
"-DLLVM_INCLUDE_TESTS=OFF"
|
||||||
] ++ lib.optionals enableManpages [
|
] ++ lib.optionals enableManpages [
|
||||||
"-DCLANG_INCLUDE_DOCS=ON"
|
"-DCLANG_INCLUDE_DOCS=ON"
|
||||||
"-DLLVM_ENABLE_SPHINX=ON"
|
"-DLLVM_ENABLE_SPHINX=ON"
|
||||||
"-DSPHINX_OUTPUT_MAN=ON"
|
"-DSPHINX_OUTPUT_MAN=ON"
|
||||||
"-DSPHINX_OUTPUT_HTML=OFF"
|
"-DSPHINX_OUTPUT_HTML=OFF"
|
||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
||||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) ([
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
||||||
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
|
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
|
||||||
|
] ++ lib.optionals (lib.versionAtLeast release_version "15") [
|
||||||
# Added in LLVM15:
|
# Added in LLVM15:
|
||||||
# `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
|
# `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
|
||||||
# `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
|
# `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
|
||||||
"-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
|
"-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
|
||||||
"-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
|
"-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
|
||||||
];
|
]);
|
||||||
|
|
||||||
patches = [
|
postPatch = (if lib.versionOlder release_version "13" then ''
|
||||||
./purity.patch
|
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
|
||||||
# https://reviews.llvm.org/D51899
|
-e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
|
||||||
./gnu-install-dirs.patch
|
lib/Driver/ToolChains/*.cpp
|
||||||
../../common/clang/add-nostdlibinc-flag.patch
|
'' else ''
|
||||||
(substituteAll {
|
|
||||||
src = ../../common/clang/clang-11-15-LLVMgold-path.patch;
|
|
||||||
libllvmLibdir = "${libllvm.lib}/lib";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
(cd tools && ln -s ../../clang-tools-extra extra)
|
(cd tools && ln -s ../../clang-tools-extra extra)
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
'') + lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||||
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
outputs = [ "out" "lib" "dev" "python" ];
|
||||||
|
|
||||||
env = lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
|
|
||||||
# The following warning is triggered with (at least) gcc >=
|
|
||||||
# 12, but appears to occur only for cross compiles.
|
|
||||||
NIX_CFLAGS_COMPILE = "-Wno-maybe-uninitialized";
|
|
||||||
};
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
ln -sv $out/bin/clang $out/bin/cpp
|
ln -sv $out/bin/clang $out/bin/cpp
|
||||||
|
'' + (lib.optionalString (lib.versions.major release_version == "17") ''
|
||||||
|
|
||||||
|
mkdir -p $lib/lib/clang
|
||||||
|
mv $lib/lib/17 $lib/lib/clang/17
|
||||||
|
'') + ''
|
||||||
|
|
||||||
# Move libclang to 'lib' output
|
# Move libclang to 'lib' output
|
||||||
moveToOutput "lib/libclang.*" "$lib"
|
moveToOutput "lib/libclang.*" "$lib"
|
||||||
moveToOutput "lib/libclang-cpp.*" "$lib"
|
moveToOutput "lib/libclang-cpp.*" "$lib"
|
||||||
|
'' + (if lib.versionOlder release_version "15" then ''
|
||||||
|
substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
|
||||||
|
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
||||||
|
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
||||||
|
'' else ''
|
||||||
substituteInPlace $dev/lib/cmake/clang/ClangTargets-release.cmake \
|
substituteInPlace $dev/lib/cmake/clang/ClangTargets-release.cmake \
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
||||||
|
'') + ''
|
||||||
|
|
||||||
|
'' + (if lib.versionOlder release_version "15" then ''
|
||||||
|
mkdir -p $python/bin $python/share/{clang,scan-view}
|
||||||
|
'' else ''
|
||||||
mkdir -p $python/bin $python/share/clang/
|
mkdir -p $python/bin $python/share/clang/
|
||||||
|
'') + ''
|
||||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
||||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
if [ -e $out/bin/set-xcode-analyzer ]; then
|
||||||
mv $out/bin/set-xcode-analyzer $python/bin
|
mv $out/bin/set-xcode-analyzer $python/bin
|
||||||
fi
|
fi
|
||||||
mv $out/share/clang/*.py $python/share/clang
|
mv $out/share/clang/*.py $python/share/clang
|
||||||
|
'' + (lib.optionalString (lib.versionOlder release_version "15") ''
|
||||||
|
mv $out/share/scan-view/*.py $python/share/scan-view
|
||||||
|
'') + ''
|
||||||
rm $out/bin/c-index-test
|
rm $out/bin/c-index-test
|
||||||
patchShebangs $python/bin
|
patchShebangs $python/bin
|
||||||
|
|
||||||
mkdir -p $dev/bin
|
mkdir -p $dev/bin
|
||||||
|
'' + (if lib.versionOlder release_version "15" then ''
|
||||||
|
cp bin/clang-tblgen $dev/bin
|
||||||
|
'' else ''
|
||||||
cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
|
cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
|
||||||
'';
|
'');
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
inherit libllvm;
|
inherit libllvm;
|
||||||
isClang = true;
|
isClang = true;
|
||||||
|
} // (lib.optionalAttrs (lib.versionAtLeast release_version "15") {
|
||||||
hardeningUnsupportedFlags = [
|
hardeningUnsupportedFlags = [
|
||||||
"fortify3"
|
"fortify3"
|
||||||
];
|
];
|
||||||
hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
|
hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
|
||||||
lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
|
lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
|
||||||
++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
|
++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
|
||||||
};
|
}) // (lib.optionalAttrs (lib.versionOlder release_version "15") {
|
||||||
|
hardeningUnsupportedFlags = [ "fortify3" "zerocallusedregs" ];
|
||||||
|
});
|
||||||
|
|
||||||
meta = llvm_meta // {
|
meta = llvm_meta // {
|
||||||
homepage = "https://clang.llvm.org/";
|
homepage = "https://clang.llvm.org/";
|
||||||
|
@ -121,11 +157,9 @@ let
|
||||||
'';
|
'';
|
||||||
mainProgram = "clang";
|
mainProgram = "clang";
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs enableManpages {
|
} // lib.optionalAttrs enableManpages ({
|
||||||
pname = "clang-manpages";
|
pname = "clang-manpages";
|
||||||
|
|
||||||
ninjaFlags = [ "docs-clang-man" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/share/man/man1
|
mkdir -p $out/share/man/man1
|
||||||
# Manually install clang manpage
|
# Manually install clang manpage
|
||||||
|
@ -139,5 +173,29 @@ let
|
||||||
meta = llvm_meta // {
|
meta = llvm_meta // {
|
||||||
description = "man page for Clang ${version}";
|
description = "man page for Clang ${version}";
|
||||||
};
|
};
|
||||||
});
|
} // (if lib.versionOlder release_version "15" then {
|
||||||
|
buildPhase = ''
|
||||||
|
make docs-clang-man
|
||||||
|
'';
|
||||||
|
} else {
|
||||||
|
ninjaFlags = [ "docs-clang-man" ];
|
||||||
|
})) // (lib.optionalAttrs (clang-tools-extra_src != null) { inherit clang-tools-extra_src; })
|
||||||
|
// (lib.optionalAttrs (lib.versionOlder release_version "13") {
|
||||||
|
unpackPhase = ''
|
||||||
|
unpackFile $src
|
||||||
|
mv clang-* clang
|
||||||
|
sourceRoot=$PWD/clang
|
||||||
|
unpackFile ${clang-tools-extra_src}
|
||||||
|
mv clang-tools-extra-* $sourceRoot/tools/extra
|
||||||
|
substituteInPlace $sourceRoot/tools/extra/clangd/quality/CompletionModel.cmake \
|
||||||
|
--replace ' ''${CMAKE_SOURCE_DIR}/../clang-tools-extra' ' ''${CMAKE_SOURCE_DIR}/tools/extra'
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
// (lib.optionalAttrs (lib.versionAtLeast release_version "15") {
|
||||||
|
env = lib.optionalAttrs (stdenv.buildPlatform != stdenv.hostPlatform) {
|
||||||
|
# The following warning is triggered with (at least) gcc >=
|
||||||
|
# 12, but appears to occur only for cross compiles.
|
||||||
|
NIX_CFLAGS_COMPILE = "-Wno-maybe-uninitialized";
|
||||||
|
};
|
||||||
|
}));
|
||||||
in self
|
in self
|
|
@ -1,139 +0,0 @@
|
||||||
{ lib, stdenv, llvm_meta
|
|
||||||
, monorepoSrc, runCommand
|
|
||||||
, substituteAll, cmake, ninja, libxml2, libllvm, version, python3
|
|
||||||
, buildLlvmTools
|
|
||||||
, fixDarwinDylibNames
|
|
||||||
, enableManpages ? false
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
self = stdenv.mkDerivation (finalAttrs: rec {
|
|
||||||
pname = "clang";
|
|
||||||
inherit version;
|
|
||||||
|
|
||||||
src = runCommand "${pname}-src-${version}" {} ''
|
|
||||||
mkdir -p "$out"
|
|
||||||
cp -r ${monorepoSrc}/cmake "$out"
|
|
||||||
cp -r ${monorepoSrc}/${pname} "$out"
|
|
||||||
cp -r ${monorepoSrc}/clang-tools-extra "$out"
|
|
||||||
'';
|
|
||||||
|
|
||||||
sourceRoot = "${src.name}/${pname}";
|
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ninja python3 ]
|
|
||||||
++ lib.optional (lib.versionAtLeast version "18" && enableManpages) python3.pkgs.myst-parser
|
|
||||||
++ lib.optional enableManpages python3.pkgs.sphinx
|
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
|
||||||
|
|
||||||
buildInputs = [ libxml2 libllvm ];
|
|
||||||
|
|
||||||
cmakeFlags = [
|
|
||||||
"-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
|
|
||||||
"-DCLANGD_BUILD_XPC=OFF"
|
|
||||||
"-DLLVM_ENABLE_RTTI=ON"
|
|
||||||
"-DLLVM_INCLUDE_TESTS=OFF"
|
|
||||||
] ++ lib.optionals enableManpages [
|
|
||||||
"-DCLANG_INCLUDE_DOCS=ON"
|
|
||||||
"-DLLVM_ENABLE_SPHINX=ON"
|
|
||||||
"-DSPHINX_OUTPUT_MAN=ON"
|
|
||||||
"-DSPHINX_OUTPUT_HTML=OFF"
|
|
||||||
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
|
|
||||||
] ++ lib.optionals (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
|
|
||||||
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
|
|
||||||
"-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
|
|
||||||
# Added in LLVM15:
|
|
||||||
# `clang-tidy-confusable-chars-gen`: https://github.com/llvm/llvm-project/commit/c3574ef739fbfcc59d405985a3a4fa6f4619ecdb
|
|
||||||
# `clang-pseudo-gen`: https://github.com/llvm/llvm-project/commit/cd2292ef824591cc34cc299910a3098545c840c7
|
|
||||||
"-DCLANG_TIDY_CONFUSABLE_CHARS_GEN=${buildLlvmTools.libclang.dev}/bin/clang-tidy-confusable-chars-gen"
|
|
||||||
"-DCLANG_PSEUDO_GEN=${buildLlvmTools.libclang.dev}/bin/clang-pseudo-gen"
|
|
||||||
];
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./purity.patch
|
|
||||||
# https://reviews.llvm.org/D51899
|
|
||||||
./gnu-install-dirs.patch
|
|
||||||
../../common/clang/add-nostdlibinc-flag.patch
|
|
||||||
(substituteAll {
|
|
||||||
src = ../../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
|
||||||
libllvmLibdir = "${libllvm.lib}/lib";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
(cd tools && ln -s ../../clang-tools-extra extra)
|
|
||||||
'' + lib.optionalString stdenv.hostPlatform.isMusl ''
|
|
||||||
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" "lib" "dev" "python" ];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
ln -sv $out/bin/clang $out/bin/cpp
|
|
||||||
|
|
||||||
# Move libclang to 'lib' output
|
|
||||||
moveToOutput "lib/libclang.*" "$lib"
|
|
||||||
moveToOutput "lib/libclang-cpp.*" "$lib"
|
|
||||||
substituteInPlace $dev/lib/cmake/clang/ClangTargets-release.cmake \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
|
||||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
|
||||||
|
|
||||||
mkdir -p $python/bin $python/share/clang/
|
|
||||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
|
||||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
|
||||||
mv $out/bin/set-xcode-analyzer $python/bin
|
|
||||||
fi
|
|
||||||
mv $out/share/clang/*.py $python/share/clang
|
|
||||||
rm $out/bin/c-index-test
|
|
||||||
patchShebangs $python/bin
|
|
||||||
|
|
||||||
mkdir -p $dev/bin
|
|
||||||
cp bin/{clang-tblgen,clang-tidy-confusable-chars-gen,clang-pseudo-gen} $dev/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
|
||||||
inherit libllvm;
|
|
||||||
isClang = true;
|
|
||||||
hardeningUnsupportedFlags = [
|
|
||||||
"fortify3"
|
|
||||||
];
|
|
||||||
hardeningUnsupportedFlagsByTargetPlatform = targetPlatform:
|
|
||||||
lib.optional (!(targetPlatform.isx86_64 || targetPlatform.isAarch64)) "zerocallusedregs"
|
|
||||||
++ (finalAttrs.passthru.hardeningUnsupportedFlags or []);
|
|
||||||
};
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
homepage = "https://clang.llvm.org/";
|
|
||||||
description = "A C language family frontend for LLVM";
|
|
||||||
longDescription = ''
|
|
||||||
The Clang project provides a language front-end and tooling
|
|
||||||
infrastructure for languages in the C language family (C, C++, Objective
|
|
||||||
C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
|
|
||||||
It aims to deliver amazingly fast compiles, extremely useful error and
|
|
||||||
warning messages and to provide a platform for building great source
|
|
||||||
level tools. The Clang Static Analyzer and clang-tidy are tools that
|
|
||||||
automatically find bugs in your code, and are great examples of the sort
|
|
||||||
of tools that can be built using the Clang frontend as a library to
|
|
||||||
parse C/C++ code.
|
|
||||||
'';
|
|
||||||
mainProgram = "clang";
|
|
||||||
};
|
|
||||||
} // lib.optionalAttrs enableManpages {
|
|
||||||
pname = "clang-manpages";
|
|
||||||
|
|
||||||
ninjaFlags = [ "docs-clang-man" ];
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/man/man1
|
|
||||||
# Manually install clang manpage
|
|
||||||
cp docs/man/*.1 $out/share/man/man1/
|
|
||||||
'';
|
|
||||||
|
|
||||||
outputs = [ "out" ];
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = llvm_meta // {
|
|
||||||
description = "man page for Clang ${version}";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
in self
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja
|
||||||
, preLibcCrossHeaders
|
, preLibcCrossHeaders
|
||||||
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
|
, libxml2, python3, fetchFromGitHub, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith
|
||||||
, buildLlvmTools # tools, but from the previous stage, for cross
|
, buildLlvmTools # tools, but from the previous stage, for cross
|
||||||
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
, targetLlvmLibraries # libraries, but from the next stage, for cross
|
||||||
, targetLlvm
|
, targetLlvm
|
||||||
|
@ -85,7 +85,7 @@ in let
|
||||||
then tools.bintools
|
then tools.bintools
|
||||||
else bootBintools;
|
else bootBintools;
|
||||||
|
|
||||||
in {
|
in rec {
|
||||||
|
|
||||||
libllvm = callPackage ./llvm {
|
libllvm = callPackage ./llvm {
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
|
@ -95,7 +95,17 @@ in let
|
||||||
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
# we need to reintroduce `outputSpecified` to get the expected behavior e.g. of lib.get*
|
||||||
llvm = tools.libllvm;
|
llvm = tools.libllvm;
|
||||||
|
|
||||||
libclang = callPackage ./clang {
|
libclang = callPackage ../common/clang {
|
||||||
|
patches = [
|
||||||
|
./clang/purity.patch
|
||||||
|
# https://reviews.llvm.org/D51899
|
||||||
|
./clang/gnu-install-dirs.patch
|
||||||
|
../common/clang/add-nostdlibinc-flag.patch
|
||||||
|
(substituteAll {
|
||||||
|
src = ../common/clang/clang-at-least-16-LLVMgold-path.patch;
|
||||||
|
libllvmLibdir = "${libllvm.lib}/lib";
|
||||||
|
})
|
||||||
|
];
|
||||||
inherit llvm_meta;
|
inherit llvm_meta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ with self;
|
||||||
hash = "0gl89zpgsf3n30nb6v5cns27g2bfg4rf3s2427gqvwbkr5gcf7ri";
|
hash = "0gl89zpgsf3n30nb6v5cns27g2bfg4rf3s2427gqvwbkr5gcf7ri";
|
||||||
meta.description = "Full standard library replacement for OCaml";
|
meta.description = "Full standard library replacement for OCaml";
|
||||||
propagatedBuildInputs = [ sexplib0 ];
|
propagatedBuildInputs = [ sexplib0 ];
|
||||||
buildInputs = [ dune_1 ];
|
buildInputs = [ dune-configurator ];
|
||||||
};
|
};
|
||||||
|
|
||||||
stdio = janePackage {
|
stdio = janePackage {
|
||||||
|
@ -106,7 +106,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
ppx_expect = janePackage {
|
ppx_expect = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "ppx_expect";
|
pname = "ppx_expect";
|
||||||
hash = "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q";
|
hash = "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q";
|
||||||
meta.description = "Cram like framework for OCaml";
|
meta.description = "Cram like framework for OCaml";
|
||||||
|
@ -170,8 +169,9 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
base_quickcheck = janePackage {
|
base_quickcheck = janePackage {
|
||||||
|
version = "0.12.1";
|
||||||
pname = "base_quickcheck";
|
pname = "base_quickcheck";
|
||||||
hash = "1la6qgq1zwmfyq1hqy6i337w435ym5yqgx2ygk86qip6nws0s6r3";
|
hash = "sha256-ABfUtOzdtGrYR6EgtVYkmxRvsH48jJwSVVOwf4Od12Y=";
|
||||||
meta.description = "Randomized testing framework, designed for compatibility with Base";
|
meta.description = "Randomized testing framework, designed for compatibility with Base";
|
||||||
propagatedBuildInputs = [ ppx_base ppx_fields_conv ppx_let splittable_random ];
|
propagatedBuildInputs = [ ppx_base ppx_fields_conv ppx_let splittable_random ];
|
||||||
};
|
};
|
||||||
|
@ -209,7 +209,7 @@ with self;
|
||||||
pname = "jst-config";
|
pname = "jst-config";
|
||||||
hash = "0yxcz13vda1mdh9ah7qqxwfxpcqang5sgdssd8721rszbwqqaw93";
|
hash = "0yxcz13vda1mdh9ah7qqxwfxpcqang5sgdssd8721rszbwqqaw93";
|
||||||
meta.description = "Compile-time configuration for Jane Street libraries";
|
meta.description = "Compile-time configuration for Jane Street libraries";
|
||||||
buildInputs = [ dune_1 ppx_assert ];
|
buildInputs = [ dune-configurator ppx_assert ];
|
||||||
};
|
};
|
||||||
|
|
||||||
ppx_optcomp = janePackage {
|
ppx_optcomp = janePackage {
|
||||||
|
@ -276,7 +276,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
ppx_jane = janePackage {
|
ppx_jane = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "ppx_jane";
|
pname = "ppx_jane";
|
||||||
hash = "1a2602isqzsh640q20qbmarx0sc316mlsqc3i25ysv2kdyhh0kyw";
|
hash = "1a2602isqzsh640q20qbmarx0sc316mlsqc3i25ysv2kdyhh0kyw";
|
||||||
meta.description = "Standard Jane Street ppx rewriters";
|
meta.description = "Standard Jane Street ppx rewriters";
|
||||||
|
@ -284,7 +283,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
base_bigstring = janePackage {
|
base_bigstring = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "base_bigstring";
|
pname = "base_bigstring";
|
||||||
hash = "0rbgyg511847fbnxad40prz2dyp4da6sffzyzl88j18cxqxbh1by";
|
hash = "0rbgyg511847fbnxad40prz2dyp4da6sffzyzl88j18cxqxbh1by";
|
||||||
meta.description = "String type based on [Bigarray], for use in I/O and C-bindings";
|
meta.description = "String type based on [Bigarray], for use in I/O and C-bindings";
|
||||||
|
@ -306,7 +304,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
core_kernel = janePackage {
|
core_kernel = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "core_kernel";
|
pname = "core_kernel";
|
||||||
version = "0.12.3";
|
version = "0.12.3";
|
||||||
hash = "sha256-bDgxuOILAs4FYB8o92ysPHDdEzflZMsU/jk5hB9xfuc=";
|
hash = "sha256-bDgxuOILAs4FYB8o92ysPHDdEzflZMsU/jk5hB9xfuc=";
|
||||||
|
@ -316,7 +313,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
spawn = janePackage {
|
spawn = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "spawn";
|
pname = "spawn";
|
||||||
version = "0.13.0";
|
version = "0.13.0";
|
||||||
hash = "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf";
|
hash = "1w003k1kw1lmyiqlk58gkxx8rac7dchiqlz6ah7aj7bh49b36ppf";
|
||||||
|
@ -325,7 +321,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
core = janePackage {
|
core = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "core";
|
pname = "core";
|
||||||
version = "0.12.3";
|
version = "0.12.3";
|
||||||
hash = "1vmjqiafkg45hqfvahx6jnlaww1q4a4215k8znbgprf0qn3zymnj";
|
hash = "1vmjqiafkg45hqfvahx6jnlaww1q4a4215k8znbgprf0qn3zymnj";
|
||||||
|
@ -335,7 +330,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
async_kernel = janePackage {
|
async_kernel = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "async_kernel";
|
pname = "async_kernel";
|
||||||
hash = "1d9illx7vvpblj1i2r9y0f2yff2fbhy3rp4hhvamq1n9n3lvxmh2";
|
hash = "1d9illx7vvpblj1i2r9y0f2yff2fbhy3rp4hhvamq1n9n3lvxmh2";
|
||||||
meta.description = "Monadic concurrency library";
|
meta.description = "Monadic concurrency library";
|
||||||
|
@ -343,7 +337,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
protocol_version_header = janePackage {
|
protocol_version_header = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "protocol_version_header";
|
pname = "protocol_version_header";
|
||||||
hash = "14vqhx3r84rlfhcjq52gxdqksckiaswlck9s47g7y2z1lsc17v7r";
|
hash = "14vqhx3r84rlfhcjq52gxdqksckiaswlck9s47g7y2z1lsc17v7r";
|
||||||
meta.description = "Protocol versioning";
|
meta.description = "Protocol versioning";
|
||||||
|
@ -351,7 +344,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
async_rpc_kernel = janePackage {
|
async_rpc_kernel = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "async_rpc_kernel";
|
pname = "async_rpc_kernel";
|
||||||
hash = "1znhqbzx4fp58i7dbcgyv5rx7difbhb5d8cbqzv96yqvbn67lsjk";
|
hash = "1znhqbzx4fp58i7dbcgyv5rx7difbhb5d8cbqzv96yqvbn67lsjk";
|
||||||
meta.description = "Platform-independent core of Async RPC library";
|
meta.description = "Platform-independent core of Async RPC library";
|
||||||
|
@ -359,7 +351,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
async_unix = janePackage {
|
async_unix = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "async_unix";
|
pname = "async_unix";
|
||||||
hash = "09h10rdyykbm88n6r9nb5a22mlb6vcxa04q6hvrcr0kys6qhhqmb";
|
hash = "09h10rdyykbm88n6r9nb5a22mlb6vcxa04q6hvrcr0kys6qhhqmb";
|
||||||
meta.description = "Monadic concurrency library";
|
meta.description = "Monadic concurrency library";
|
||||||
|
@ -367,7 +358,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
async_extra = janePackage {
|
async_extra = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "async_extra";
|
pname = "async_extra";
|
||||||
hash = "10j4mwlyqvf67yrp5dwd857llqjinpnnykmlzw2gpmks9azxk6mh";
|
hash = "10j4mwlyqvf67yrp5dwd857llqjinpnnykmlzw2gpmks9azxk6mh";
|
||||||
meta.description = "Monadic concurrency library";
|
meta.description = "Monadic concurrency library";
|
||||||
|
@ -375,7 +365,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
textutils = janePackage {
|
textutils = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "textutils";
|
pname = "textutils";
|
||||||
hash = "0302awqihf3abib9mvzvn4g8m364hm6jxry1r3kc01hzybhy9acq";
|
hash = "0302awqihf3abib9mvzvn4g8m364hm6jxry1r3kc01hzybhy9acq";
|
||||||
meta.description = "Text output utilities";
|
meta.description = "Text output utilities";
|
||||||
|
@ -383,7 +372,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
async = janePackage {
|
async = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "async";
|
pname = "async";
|
||||||
hash = "0pk7z3h2gi21nfchvmjz2wx516bynf9vgwf84zf5qhvlvqqsmyrx";
|
hash = "0pk7z3h2gi21nfchvmjz2wx516bynf9vgwf84zf5qhvlvqqsmyrx";
|
||||||
meta.description = "Monadic concurrency library";
|
meta.description = "Monadic concurrency library";
|
||||||
|
@ -391,7 +379,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
async_find = janePackage {
|
async_find = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "async_find";
|
pname = "async_find";
|
||||||
hash = "0qsz9f15s5rlk6za10s810v6nlkdxg2g9p1827lcpa7nhjcpi673";
|
hash = "0qsz9f15s5rlk6za10s810v6nlkdxg2g9p1827lcpa7nhjcpi673";
|
||||||
meta.description = "Directory traversal with Async";
|
meta.description = "Directory traversal with Async";
|
||||||
|
@ -399,7 +386,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
re2 = janePackage {
|
re2 = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "re2";
|
pname = "re2";
|
||||||
version = "0.12.1";
|
version = "0.12.1";
|
||||||
hash = "sha256-NPQKKUSwckZx4GN4wX2sc0Mn7bes6p79oZrN6xouc6o=";
|
hash = "sha256-NPQKKUSwckZx4GN4wX2sc0Mn7bes6p79oZrN6xouc6o=";
|
||||||
|
@ -412,7 +398,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
shell = janePackage {
|
shell = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "shell";
|
pname = "shell";
|
||||||
hash = "158857rdr6qgglc5iksg0l54jgf51b5lmsw7nlazpxwdwc9fcn5n";
|
hash = "158857rdr6qgglc5iksg0l54jgf51b5lmsw7nlazpxwdwc9fcn5n";
|
||||||
meta.description = "Yet another implementation of fork&exec and related functionality";
|
meta.description = "Yet another implementation of fork&exec and related functionality";
|
||||||
|
@ -421,7 +406,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
async_shell = janePackage {
|
async_shell = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "async_shell";
|
pname = "async_shell";
|
||||||
hash = "0cxln9hkc3cy522la9yi9p23qjwl69kqmadsq4lnjh5bxdad06sv";
|
hash = "0cxln9hkc3cy522la9yi9p23qjwl69kqmadsq4lnjh5bxdad06sv";
|
||||||
meta.description = "Shell helpers for Async";
|
meta.description = "Shell helpers for Async";
|
||||||
|
@ -429,7 +413,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
core_bench = janePackage {
|
core_bench = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "core_bench";
|
pname = "core_bench";
|
||||||
hash = "00hyzbbj19dkcw0vhfnc8w0ca3zkjriwwvl00ssa0a2g9mygijdm";
|
hash = "00hyzbbj19dkcw0vhfnc8w0ca3zkjriwwvl00ssa0a2g9mygijdm";
|
||||||
meta.description = "Benchmarking library";
|
meta.description = "Benchmarking library";
|
||||||
|
@ -437,7 +420,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
core_extended = janePackage {
|
core_extended = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "core_extended";
|
pname = "core_extended";
|
||||||
hash = "1gwx66235irpf5krb1r25a3c7w52qhmass8hp7rdv89il9jn49w4";
|
hash = "1gwx66235irpf5krb1r25a3c7w52qhmass8hp7rdv89il9jn49w4";
|
||||||
meta.description = "Extra components that are not as closely vetted or as stable as Core";
|
meta.description = "Extra components that are not as closely vetted or as stable as Core";
|
||||||
|
@ -445,7 +427,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
sexp_pretty = janePackage {
|
sexp_pretty = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "sexp_pretty";
|
pname = "sexp_pretty";
|
||||||
hash = "06hdsaszc5cd7fphiblbn4r1sh36xgjwf2igzr2rvlzqs7jiv2v4";
|
hash = "06hdsaszc5cd7fphiblbn4r1sh36xgjwf2igzr2rvlzqs7jiv2v4";
|
||||||
meta.description = "S-expression pretty-printer";
|
meta.description = "S-expression pretty-printer";
|
||||||
|
@ -453,7 +434,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
expect_test_helpers_kernel = janePackage {
|
expect_test_helpers_kernel = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "expect_test_helpers_kernel";
|
pname = "expect_test_helpers_kernel";
|
||||||
hash = "18ya187y2i2hfxr771sd9vy5jdsa30vhs56yjdhwk06v01b2fzbq";
|
hash = "18ya187y2i2hfxr771sd9vy5jdsa30vhs56yjdhwk06v01b2fzbq";
|
||||||
meta.description = "Helpers for writing expectation tests";
|
meta.description = "Helpers for writing expectation tests";
|
||||||
|
@ -462,7 +442,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
expect_test_helpers = janePackage {
|
expect_test_helpers = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "expect_test_helpers";
|
pname = "expect_test_helpers";
|
||||||
hash = "0ixqck2lnsmz107yw0q2sr8va80skjpldx7lz4ymjiq2vsghk0rb";
|
hash = "0ixqck2lnsmz107yw0q2sr8va80skjpldx7lz4ymjiq2vsghk0rb";
|
||||||
meta.description = "Async helpers for writing expectation tests";
|
meta.description = "Async helpers for writing expectation tests";
|
||||||
|
@ -470,7 +449,6 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
patience_diff = janePackage {
|
patience_diff = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "patience_diff";
|
pname = "patience_diff";
|
||||||
hash = "055kd3piadjnplip8c8q99ssh79d4irmhg2wng7aida5pbqp2p9f";
|
hash = "055kd3piadjnplip8c8q99ssh79d4irmhg2wng7aida5pbqp2p9f";
|
||||||
meta.description = "Diff library using Bram Cohen's patience diff algorithm";
|
meta.description = "Diff library using Bram Cohen's patience diff algorithm";
|
||||||
|
@ -478,45 +456,10 @@ with self;
|
||||||
};
|
};
|
||||||
|
|
||||||
ecaml = janePackage {
|
ecaml = janePackage {
|
||||||
duneVersion = "3";
|
|
||||||
pname = "ecaml";
|
pname = "ecaml";
|
||||||
hash = "0n9xi6agc3lgyj2nsi10cbif0xwn57xyaranad9r285rmbxrgjh7";
|
hash = "0n9xi6agc3lgyj2nsi10cbif0xwn57xyaranad9r285rmbxrgjh7";
|
||||||
meta.description = "Library for writing Emacs plugin in OCaml";
|
meta.description = "Library for writing Emacs plugin in OCaml";
|
||||||
propagatedBuildInputs = [ async expect_test_helpers_kernel ];
|
propagatedBuildInputs = [ async expect_test_helpers_kernel ];
|
||||||
};
|
};
|
||||||
|
|
||||||
### Packages at version 0.11, with dependencies at version 0.12
|
|
||||||
|
|
||||||
configurator = janePackage {
|
|
||||||
pname = "configurator";
|
|
||||||
version = "0.11.0";
|
|
||||||
hash = "0h686630cscav7pil8c3w0gbh6rj4b41dvbnwmicmlkc746q5bfk";
|
|
||||||
propagatedBuildInputs = [ stdio ];
|
|
||||||
meta.description = "Helper library for gathering system configuration";
|
|
||||||
};
|
|
||||||
|
|
||||||
ppx_core = janePackage {
|
|
||||||
pname = "ppx_core";
|
|
||||||
version = "0.11.0";
|
|
||||||
hash = "11hgm9mxig4cm3c827f6dns9mjv3pf8g6skf10x0gw9xnp1dmzmx";
|
|
||||||
propagatedBuildInputs = [ ppxlib ];
|
|
||||||
meta.description = "Deprecated (see ppxlib)";
|
|
||||||
};
|
|
||||||
|
|
||||||
ppx_driver = janePackage {
|
|
||||||
pname = "ppx_driver";
|
|
||||||
version = "0.11.0";
|
|
||||||
hash = "00kfx6js2kxk57k4v7hiqvwk7h35whgjihnxf75m82rnaf4yzvfi";
|
|
||||||
propagatedBuildInputs = [ ppxlib ];
|
|
||||||
meta.description = "Deprecated (see ppxlib)";
|
|
||||||
};
|
|
||||||
|
|
||||||
ppx_type_conv = janePackage {
|
|
||||||
pname = "ppx_type_conv";
|
|
||||||
version = "0.11.0";
|
|
||||||
hash = "04dbrglqqhkas25cpjz8xhjcbpk141c35qggzw66bn69izczfmaf";
|
|
||||||
propagatedBuildInputs = [ ppxlib ];
|
|
||||||
meta.description = "Deprecated (see ppxlib)";
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.12.0" }:
|
{ lib, fetchFromGitHub, buildDunePackage, defaultVersion ? "0.12.0" }:
|
||||||
|
|
||||||
{ pname, version ? defaultVersion, duneVersion ? "1", hash, ...}@args:
|
{ pname, version ? defaultVersion, duneVersion ? "3", hash, ...}@args:
|
||||||
|
|
||||||
buildDunePackage (args // {
|
buildDunePackage (args // {
|
||||||
inherit version duneVersion;
|
inherit version duneVersion;
|
||||||
|
|
|
@ -8,8 +8,6 @@ buildDunePackage rec {
|
||||||
pname = "ocaml-migrate-parsetree";
|
pname = "ocaml-migrate-parsetree";
|
||||||
version = "1.8.0";
|
version = "1.8.0";
|
||||||
|
|
||||||
duneVersion = if lib.versionAtLeast ocaml.version "4.08" then "3" else "1";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ocaml-ppx";
|
owner = "ocaml-ppx";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, buildDunePackage, fetchurl, ocaml }:
|
{ lib, buildDunePackage, fetchurl }:
|
||||||
|
|
||||||
buildDunePackage (rec {
|
buildDunePackage rec {
|
||||||
pname = "result";
|
pname = "result";
|
||||||
version = "1.5";
|
version = "1.5";
|
||||||
|
|
||||||
|
@ -19,6 +19,4 @@ buildDunePackage (rec {
|
||||||
'';
|
'';
|
||||||
license = lib.licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") {
|
}
|
||||||
duneVersion = "1";
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, fetchFromGitHub, buildDunePackage, ocaml }:
|
{ lib, fetchFromGitHub, buildDunePackage }:
|
||||||
|
|
||||||
buildDunePackage (rec {
|
buildDunePackage rec {
|
||||||
pname = "octavius";
|
pname = "octavius";
|
||||||
version = "1.2.2";
|
version = "1.2.2";
|
||||||
|
|
||||||
|
@ -21,6 +21,4 @@ buildDunePackage (rec {
|
||||||
license = licenses.isc;
|
license = licenses.isc;
|
||||||
maintainers = with maintainers; [ vbgl ];
|
maintainers = with maintainers; [ vbgl ];
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") {
|
}
|
||||||
duneVersion = "1";
|
|
||||||
})
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, fetchFromGitHub, buildDunePackage, ocaml }:
|
{ lib, fetchFromGitHub, buildDunePackage }:
|
||||||
|
|
||||||
buildDunePackage (rec {
|
buildDunePackage rec {
|
||||||
pname = "ppx_derivers";
|
pname = "ppx_derivers";
|
||||||
version = "1.2.1";
|
version = "1.2.1";
|
||||||
|
|
||||||
|
@ -19,6 +19,4 @@ buildDunePackage (rec {
|
||||||
maintainers = [ lib.maintainers.vbgl ];
|
maintainers = [ lib.maintainers.vbgl ];
|
||||||
inherit (src.meta) homepage;
|
inherit (src.meta) homepage;
|
||||||
};
|
};
|
||||||
} // lib.optionalAttrs (!lib.versionAtLeast ocaml.version "4.08") {
|
}
|
||||||
duneVersion = "1";
|
|
||||||
})
|
|
||||||
|
|
|
@ -12,14 +12,12 @@ let param = {
|
||||||
"0.8.1" = {
|
"0.8.1" = {
|
||||||
sha256 = "sha256-pct57oO7qAMEtlvEfymFOCvviWaLG0b5/7NzTC8vdSE=";
|
sha256 = "sha256-pct57oO7qAMEtlvEfymFOCvviWaLG0b5/7NzTC8vdSE=";
|
||||||
max_version = "4.10";
|
max_version = "4.10";
|
||||||
useDune2 = false;
|
|
||||||
OMP = [ ocaml-migrate-parsetree ];
|
OMP = [ ocaml-migrate-parsetree ];
|
||||||
};
|
};
|
||||||
"0.13.0" = {
|
"0.13.0" = {
|
||||||
sha256 = "sha256-geHz0whQDg5/YQjVsN2iuHlkClwh7z3Eqb2QOBzuOdk=";
|
sha256 = "sha256-geHz0whQDg5/YQjVsN2iuHlkClwh7z3Eqb2QOBzuOdk=";
|
||||||
min_version = "4.07";
|
min_version = "4.07";
|
||||||
max_version = "4.11";
|
max_version = "4.11";
|
||||||
useDune2 = false;
|
|
||||||
OMP = [ ocaml-migrate-parsetree ];
|
OMP = [ ocaml-migrate-parsetree ];
|
||||||
};
|
};
|
||||||
"0.15.0" = {
|
"0.15.0" = {
|
||||||
|
@ -80,8 +78,6 @@ buildDunePackage rec {
|
||||||
pname = "ppxlib";
|
pname = "ppxlib";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
duneVersion = if param.useDune2 or true then "3" else "1";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ocaml-ppx/ppxlib/releases/download/${version}/ppxlib-${version}.tbz";
|
url = "https://github.com/ocaml-ppx/ppxlib/releases/download/${version}/ppxlib-${version}.tbz";
|
||||||
inherit (param) sha256;
|
inherit (param) sha256;
|
||||||
|
|
|
@ -29,7 +29,8 @@ buildPythonPackage rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Python GUIs for Humans";
|
description = "Python GUIs for Humans";
|
||||||
homepage = "https://github.com/PySimpleGUI/PySimpleGUI";
|
homepage = "https://github.com/PySimpleGUI/PySimpleGUI";
|
||||||
license = licenses.lgpl3Plus;
|
license = licenses.unfree;
|
||||||
maintainers = with maintainers; [ lucasew ];
|
maintainers = with maintainers; [ lucasew ];
|
||||||
|
broken = true; # update to v5 broke the package, it now needs rsa and is trying to access an X11 socket?
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,14 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pytest-cases";
|
pname = "pytest-cases";
|
||||||
version = "3.8.4";
|
version = "3.8.5";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-tM7DNRVvRPO8+oXnnys0tfpS5jMqhULd8+hPoT+qzXY=";
|
hash = "sha256-ySBUGHhHp9MNirZwn7FnCoMOThkjS+cAyFyWttcQLBY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -8,16 +8,16 @@
|
||||||
}:
|
}:
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "turso-cli";
|
pname = "turso-cli";
|
||||||
version = "0.90.3";
|
version = "0.90.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "tursodatabase";
|
owner = "tursodatabase";
|
||||||
repo = "turso-cli";
|
repo = "turso-cli";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-NkCkInQLwGwb8bFeRTSk2rpuPBOkMvWBgVx2IFFyRFQ=";
|
hash = "sha256-+pd2bRyu1BFhzJ1iGDmBv/DR8oZHC0hGZBgZZIxpaYo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-oxlIaSSLZ6JirvUPOIHirp43G5qrDFJhNd6HjA9UYKo=";
|
vendorHash = "sha256-2NjdjB09WYzHjQEl2hMUWN1/xsj/Hlr8lVYU/pkxTqQ=";
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
|
|
|
@ -59,14 +59,14 @@ let
|
||||||
in
|
in
|
||||||
with py.pkgs; buildPythonApplication rec {
|
with py.pkgs; buildPythonApplication rec {
|
||||||
pname = "awscli2";
|
pname = "awscli2";
|
||||||
version = "2.15.34"; # N.B: if you change this, check if overrides are still up-to-date
|
version = "2.15.38"; # N.B: if you change this, check if overrides are still up-to-date
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "aws";
|
owner = "aws";
|
||||||
repo = "aws-cli";
|
repo = "aws-cli";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-lFovWxPlo3WlKE4yOlTtILbsRsILgioqVmPptOQO0bM=";
|
hash = "sha256-ddZqexGrO2m8iUE9RDkks0ohm27dpitbsj+20aWUrJw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
|
Loading…
Reference in New Issue
Block a user