Merge master into staging-next

This commit is contained in:
github-actions[bot] 2022-08-21 00:02:49 +00:00 committed by GitHub
commit e5f0224881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
78 changed files with 949 additions and 950 deletions

View File

@ -56,23 +56,6 @@ let
};
};
# this requires kernel package
dtbsWithSymbols = pkgs.stdenv.mkDerivation {
name = "dtbs-with-symbols";
inherit (cfg.kernelPackage) src nativeBuildInputs depsBuildBuild;
patches = map (patch: patch.patch) cfg.kernelPackage.kernelPatches;
buildPhase = ''
patchShebangs scripts/*
substituteInPlace scripts/Makefile.lib \
--replace 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget))' 'DTC_FLAGS += $(DTC_FLAGS_$(basetarget)) -@'
make ${pkgs.stdenv.hostPlatform.linux-kernel.baseConfig} ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
make dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
'';
installPhase = ''
make dtbs_install INSTALL_DTBS_PATH=$out/dtbs ARCH="${pkgs.stdenv.hostPlatform.linuxArch}"
'';
};
filterDTBs = src: if isNull cfg.filter
then "${src}/dtbs"
else
@ -83,6 +66,8 @@ let
| xargs -0 cp -v --no-preserve=mode --target-directory $out --parents
'';
filteredDTBs = filterDTBs cfg.kernelPackage;
# Compile single Device Tree overlay source
# file (.dts) into its compiled variant (.dtbo)
compileDTS = name: f: pkgs.callPackage({ stdenv, dtc }: stdenv.mkDerivation {
@ -197,7 +182,7 @@ in
};
hardware.deviceTree.package = if (cfg.overlays != [])
then pkgs.deviceTree.applyOverlays (filterDTBs dtbsWithSymbols) (withDTBOs cfg.overlays)
else (filterDTBs cfg.kernelPackage);
then pkgs.deviceTree.applyOverlays filteredDTBs (withDTBOs cfg.overlays)
else filteredDTBs;
};
}

View File

@ -20,19 +20,23 @@ let
ips = [ "9.9.9.9" "149.112.112.112" ];
url = "https://dns.quad9.net/dns-query";
};
opendns = {
ips = [ "208.67.222.222" "208.67.220.220" ];
url = "https://doh.opendns.com/dns-query";
};
custom = {
inherit (cfg.provider) ips url;
};
};
defaultProvider = "quad9";
providerCfg =
let
isCustom = cfg.provider.kind == "custom";
in
lib.concatStringsSep " " [
concatStringsSep " " [
"-b"
(concatStringsSep "," (if isCustom then cfg.provider.ips else providers."${cfg.provider.kind}".ips))
(concatStringsSep "," providers."${cfg.provider.kind}".ips)
"-r"
(if isCustom then cfg.provider.url else providers."${cfg.provider.kind}".url)
providers."${cfg.provider.kind}".url
];
in
@ -62,14 +66,16 @@ in
The upstream provider to use or custom in case you do not trust any of
the predefined providers or just want to use your own.
The default is ${defaultProvider} and there are privacy and security trade-offs
when using any upstream provider. Please consider that before using any
of them.
The default is ${defaultProvider} and there are privacy and security
trade-offs when using any upstream provider. Please consider that
before using any of them.
If you pick a custom provider, you will need to provide the bootstrap
IP addresses as well as the resolver https URL.
Supported providers: ${concatStringsSep ", " (builtins.attrNames providers)}
If you pick the custom provider, you will need to provide the
bootstrap IP addresses as well as the resolver https URL.
'';
type = types.enum ((builtins.attrNames providers) ++ [ "custom" ]);
type = types.enum (builtins.attrNames providers);
default = defaultProvider;
};
@ -105,14 +111,18 @@ in
config = lib.mkIf cfg.enable {
systemd.services.https-dns-proxy = {
description = "DNS to DNS over HTTPS (DoH) proxy";
requires = [ "network.target" ];
after = [ "network.target" ];
wants = [ "nss-lookup.target" ];
before = [ "nss-lookup.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = rec {
Type = "exec";
DynamicUser = true;
ProtectHome = "tmpfs";
ExecStart = lib.concatStringsSep " " (
[
"${pkgs.https-dns-proxy}/bin/https_dns_proxy"
(lib.getExe pkgs.https-dns-proxy)
"-a ${toString cfg.address}"
"-p ${toString cfg.port}"
"-l -"

View File

@ -25,13 +25,7 @@ in
{
options = {
services.xserver.displayManager.lightdm.greeters.slick = {
enable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Whether to enable lightdm-slick-greeter as the lightdm greeter.
'';
};
enable = mkEnableOption "lightdm-slick-greeter as the lightdm greeter";
theme = {
package = mkOption {

View File

@ -100,12 +100,6 @@ let
fileSystems = filter utils.fsNeededForBoot config.system.build.fileSystems;
fstab = pkgs.writeText "initrd-fstab" (lib.concatMapStringsSep "\n"
({ fsType, mountPoint, device, options, autoFormat, autoResize, ... }@fs: let
opts = options ++ optional autoFormat "x-systemd.makefs" ++ optional autoResize "x-systemd.growfs";
finalDevice = if (lib.elem "bind" options) then "/sysroot${device}" else device;
in "${finalDevice} /sysroot${mountPoint} ${fsType} ${lib.concatStringsSep "," opts}") fileSystems);
needMakefs = lib.any (fs: fs.autoFormat) fileSystems;
needGrowfs = lib.any (fs: fs.autoResize) fileSystems;
@ -354,8 +348,6 @@ in {
DefaultEnvironment=PATH=/bin:/sbin ${optionalString (isBool cfg.emergencyAccess && cfg.emergencyAccess) "SYSTEMD_SULOGIN_FORCE=1"}
'';
"/etc/fstab".source = fstab;
"/lib/modules".source = "${modulesClosure}/lib/modules";
"/lib/firmware".source = "${modulesClosure}/lib/firmware";

View File

@ -153,6 +153,34 @@ let
specialMount "${mount.device}" "${mount.mountPoint}" "${concatStringsSep "," mount.options}" "${mount.fsType}"
'') mounts);
makeFstabEntries =
let
fsToSkipCheck = [ "none" "bindfs" "btrfs" "zfs" "tmpfs" "nfs" "vboxsf" "glusterfs" "apfs" "9p" "cifs" "prl_fs" "vmhgfs" ];
isBindMount = fs: builtins.elem "bind" fs.options;
skipCheck = fs: fs.noCheck || fs.device == "none" || builtins.elem fs.fsType fsToSkipCheck || isBindMount fs;
# https://wiki.archlinux.org/index.php/fstab#Filepath_spaces
escape = string: builtins.replaceStrings [ " " "\t" ] [ "\\040" "\\011" ] string;
in fstabFileSystems: { rootPrefix ? "", excludeChecks ? false, extraOpts ? (fs: []) }: concatMapStrings (fs:
(optionalString (isBindMount fs) (escape rootPrefix))
+ (if fs.device != null then escape fs.device
else if fs.label != null then "/dev/disk/by-label/${escape fs.label}"
else throw "No device specified for mount point ${fs.mountPoint}.")
+ " " + escape (rootPrefix + fs.mountPoint)
+ " " + fs.fsType
+ " " + builtins.concatStringsSep "," (fs.options ++ (extraOpts fs))
+ " " + (optionalString (!excludeChecks)
("0 " + (if skipCheck fs then "0" else if fs.mountPoint == "/" then "1" else "2")))
+ "\n"
) fstabFileSystems;
initrdFstab = pkgs.writeText "initrd-fstab" (makeFstabEntries (filter utils.fsNeededForBoot fileSystems) {
rootPrefix = "/sysroot";
excludeChecks = true;
extraOpts = fs:
(optional fs.autoResize "x-systemd.growfs")
++ (optional fs.autoFormat "x-systemd.makefs");
});
in
{
@ -278,11 +306,6 @@ in
environment.etc.fstab.text =
let
fsToSkipCheck = [ "none" "bindfs" "btrfs" "zfs" "tmpfs" "nfs" "vboxsf" "glusterfs" "apfs" "9p" "cifs" "prl_fs" "vmhgfs" ];
isBindMount = fs: builtins.elem "bind" fs.options;
skipCheck = fs: fs.noCheck || fs.device == "none" || builtins.elem fs.fsType fsToSkipCheck || isBindMount fs;
# https://wiki.archlinux.org/index.php/fstab#Filepath_spaces
escape = string: builtins.replaceStrings [ " " "\t" ] [ "\\040" "\\011" ] string;
swapOptions = sw: concatStringsSep "," (
sw.options
++ optional (sw.priority != null) "pri=${toString sw.priority}"
@ -297,18 +320,7 @@ in
# <file system> <mount point> <type> <options> <dump> <pass>
# Filesystems.
${concatMapStrings (fs:
(if fs.device != null then escape fs.device
else if fs.label != null then "/dev/disk/by-label/${escape fs.label}"
else throw "No device specified for mount point ${fs.mountPoint}.")
+ " " + escape fs.mountPoint
+ " " + fs.fsType
+ " " + builtins.concatStringsSep "," fs.options
+ " 0"
+ " " + (if skipCheck fs then "0" else
if fs.mountPoint == "/" then "1" else "2")
+ "\n"
) fileSystems}
${makeFstabEntries fileSystems {}}
# Swap devices.
${flip concatMapStrings config.swapDevices (sw:
@ -316,6 +328,8 @@ in
)}
'';
boot.initrd.systemd.contents."/etc/fstab".source = initrdFstab;
# Provide a target that pulls in all filesystems.
systemd.targets.fs =
{ description = "All File Systems";

View File

@ -17,13 +17,13 @@
stdenv.mkDerivation rec {
pname = "osdlyrics";
version = "0.5.10";
version = "0.5.11";
src = fetchFromGitHub {
owner = "osdlyrics";
repo = "osdlyrics";
rev = version;
sha256 = "sha256-x9gIT1JkfPIc4RmmQJLv9rOG2WqAftoTK5uiRlS65zU=";
sha256 = "sha256-VxLNaNe4hFwgSW4JEF1T4BWC2NwiOgfwVGiAIOszfGE=";
};
nativeBuildInputs = [

View File

@ -2,6 +2,7 @@
, lib, fetchFromGitHub, neovimUtils, wrapNeovimUnstable
, neovim-unwrapped
, fetchFromGitLab
, runCommandLocal
, pkgs
}:
let
@ -19,6 +20,24 @@ let
}
];
packagesWithSingleLineConfigs = with vimPlugins; [
{
plugin = vim-obsession;
config = ''map <Leader>$ <Cmd>Obsession<CR>'';
}
{
plugin = trouble-nvim;
config = ''" placeholder config'';
}
];
nvimConfSingleLines = makeNeovimConfig {
plugins = packagesWithSingleLineConfigs;
customRC = ''
" just a comment
'';
};
nvimConfNix = makeNeovimConfig {
inherit plugins;
customRC = ''
@ -47,8 +66,9 @@ let
sha256 = "1ykcvyx82nhdq167kbnpgwkgjib8ii7c92y3427v986n2s5lsskc";
};
# neovim-drv must be a wrapped neovim
runTest = neovim-drv: buildCommand:
pkgs.runCommandLocal "test-${neovim-drv.name}" ({
runCommandLocal "test-${neovim-drv.name}" ({
nativeBuildInputs = [ ];
meta.platforms = neovim-drv.meta.platforms;
}) (''
@ -68,6 +88,12 @@ rec {
##################
nvim_with_plugins = wrapNeovim2 "-with-plugins" nvimConfNix;
singlelinesconfig = runTest (wrapNeovim2 "-single-lines" nvimConfSingleLines) ''
assertFileContent \
"$vimrcGeneric" \
"${./init-single-lines.vim}"
'';
nvim_via_override = neovim.override {
extraName = "-via-override";
configure = {
@ -131,7 +157,7 @@ rec {
nvim_via_override-test = runTest nvim_via_override ''
assertFileContent \
"$vimrcGeneric" \
"${./neovim-override.vim}"
"${./init-override.vim}"
'';

View File

@ -0,0 +1,3 @@
map <Leader>$ <Cmd>Obsession<CR>
" placeholder config
" just a comment

View File

@ -49,12 +49,17 @@ let
};
# transform all plugins into an attrset
# { optional = bool; plugin = package; dest = filename; }
pluginsNormalized = map (x: if x ? plugin then { dest = "init.vim"; optional = false; } // x else { plugin = x; optional = false;}) plugins;
# { optional = bool; plugin = package; }
pluginsNormalized = let
defaultPlugin = {
plugin = null;
config = null;
optional = false;
};
in
map (x: defaultPlugin // (if (x ? plugin) then x else { plugin = x; })) plugins;
pluginRC = lib.concatMapStrings (p: p.config or "") pluginsNormalized;
pluginRC = lib.foldl (acc: p: if p.config != null then acc ++ [p.config] else acc) [] pluginsNormalized;
pluginsPartitioned = lib.partition (x: x.optional == true) pluginsNormalized;
requiredPlugins = vimUtils.requiredPluginsForPackage myVimPackage;
@ -116,7 +121,11 @@ let
manifestRc = vimUtils.vimrcContent ({ customRC = ""; }) ;
# we call vimrcContent without 'packages' to avoid the init.vim generation
neovimRcContent = vimUtils.vimrcContent ({ beforePlugins = ""; customRC = pluginRC + customRC; packages = null; });
neovimRcContent = vimUtils.vimrcContent ({
beforePlugins = "";
customRC = lib.concatStringsSep "\n" (pluginRC ++ [customRC]);
packages = null;
});
in
builtins.removeAttrs args ["plugins"] // {

View File

@ -123,7 +123,7 @@ let
unwrapped = neovim;
initRc = neovimRcContent;
tests = callPackage ./tests.nix {
tests = callPackage ./tests {
};
};

View File

@ -18,13 +18,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "setzer";
version = "0.4.7";
version = "0.4.8";
src = fetchFromGitHub {
owner = "cvfosammmm";
repo = "Setzer";
rev = "v${version}";
hash = "sha256-IP56jOiiIK9EW4D5yEdLc49rUzcvegAX3Yyk2ERK/pE=";
hash = "sha256-7NPyvAof0xObYZws3KFAbdue/GpIRthzdX00jc9GhYs=";
};
format = "other";
@ -37,10 +37,10 @@ python3.pkgs.buildPythonApplication rec {
appstream-glib
wrapGAppsHook
desktop-file-utils
gobject-introspection
];
buildInputs = [
gobject-introspection
gtksourceview4
gspell
poppler_gi

View File

@ -11,13 +11,13 @@
stdenvNoCC.mkDerivation rec {
pname = "irpf";
version = "2022-1.6";
version = "2022-1.7";
src = let
year = lib.head (lib.splitVersion version);
in fetchzip {
url = "https://downloadirpf.receita.fazenda.gov.br/irpf/${year}/irpf/arquivos/IRPF${version}.zip";
sha256 = "sha256-/4dND4CMl4xnGGIb+FWqgL0wbt7fqUE78m737U0kAdw=";
sha256 = "sha256-EHuka0HzWoqjvT/DcuJ9LWSrWl0PW5FyS+7/PdCgrNQ=";
};
nativeBuildInputs = [ unzip makeWrapper copyDesktopItems ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "translate-shell";
version = "0.9.6.12";
version = "0.9.7";
src = fetchFromGitHub {
owner = "soimort";
repo = "translate-shell";
rev = "v${version}";
sha256 = "075vqnha21rhr1b61dim7dqlfwm1yffyzcaa83s36rpk9r5sddzx";
sha256 = "sha256-OLbGBP+QHW51mt0sFXf6SqrIYZ0iC/X10F148NAG4A4=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -3,13 +3,13 @@
python3Packages.buildPythonPackage rec {
pname = "qnotero";
version = "2.3.0";
version = "2.3.1";
src = fetchFromGitHub {
owner = "ealbiter";
repo = pname;
rev = "v${version}";
sha256 = "0y2xph4ha07slni039s034cn1wsk3q2d86hihy97h4ch47ignv20";
rev = "refs/tags/v${version}";
sha256 = "sha256-Rym7neluRbYCpuezRQyLc6gSl3xbVR9fvhOxxW5+Nzo=";
};
propagatedBuildInputs = [ python3Packages.pyqt5 wrapQtAppsHook ];

View File

@ -0,0 +1,30 @@
{ stdenv, lib, xorg, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "x-create-mouse-void";
version = "0.1";
src = fetchFromGitHub {
owner = "cas--";
repo = "XCreateMouseVoid";
rev = version;
sha256 = "151pv4gmzz9g6nd1xw94hmawlb5z8rgs1jb3x1zpvn3znd7f355c";
};
buildInputs = [ xorg.libX11 ];
installPhase = ''
runHook preInstall
mkdir -pv $out/bin
cp -a XCreateMouseVoid $out/bin/x-create-mouse-void
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/cas--/XCreateMouseVoid";
description = "Creates an undecorated black window and prevents the mouse from entering that window";
platforms = platforms.unix;
license = licenses.unfreeRedistributable;
maintainers = with maintainers; [ eigengrau ];
};
}

View File

@ -0,0 +1,79 @@
## How to upgrade llvm_git
- Run `update-git.py`.
This will set the github revision and sha256 for `llvmPackages_git.llvm` to whatever the latest chromium build is using.
For a more recent, commit run `nix-prefetch-github` and change the rev and sha256 accordingly.
- That was the easy part.
The hard part is updating the patch files.
The general process is:
1. Try to build `llvmPackages_git.llvm` and associated packages such as
`clang` and `compiler-rt`. You can use the `-L` and `--keep-failed` flags to make
debugging patch errors easy, e.g., `nix build .#llvmPackages_git.clang -L --keep-failed`
2. The build will error out with something similar to this:
```sh
...
clang-unstable> patching sources
clang-unstable> applying patch /nix/store/nndv6gq6w608n197fndvv5my4a5zg2qi-purity.patch
clang-unstable> patching file lib/Driver/ToolChains/Gnu.cpp
clang-unstable> Hunk #1 FAILED at 487.
clang-unstable> 1 out of 1 hunk FAILED -- saving rejects to file lib/Driver/ToolChains/Gnu.cpp.rej
note: keeping build directory '/tmp/nix-build-clang-unstable-2022-25-07.drv-17'
error: builder for '/nix/store/zwi123kpkyz52fy7p6v23azixd807r8c-clang-unstable-2022-25-07.drv' failed with exit code 1;
last 8 log lines:
> unpacking sources
> unpacking source archive /nix/store/mrxadx11wv1ckjr2208qgxp472pmmg6g-clang-src-unstable-2022-25-07
> source root is clang-src-unstable-2022-25-07/clang
> patching sources
> applying patch /nix/store/nndv6gq6w608n197fndvv5my4a5zg2qi-purity.patch
> patching file lib/Driver/ToolChains/Gnu.cpp
> Hunk #1 FAILED at 487.
> 1 out of 1 hunk FAILED -- saving rejects to file lib/Driver/ToolChains/Gnu.cpp.rej
For full logs, run 'nix log /nix/store/zwi123kpkyz52fy7p6v23azixd807r8c-clang-unstable-2022-25-07.drv'.
note: keeping build directory '/tmp/nix-build-compiler-rt-libc-unstable-2022-25-07.drv-20'
error: 1 dependencies of derivation '/nix/store/ndbbh3wrl0l39b22azf46f1n7zlqwmag-clang-wrapper-unstable-2022-25-07.drv' failed to build
```
Notice the `Hunk #1 Failed at 487` line.
The lines above show us that the `purity.patch` failed on `lib/Driver/ToolChains/Gnu.cpp` when compiling `clang`.
3. The task now is to cross reference the hunks in the purity patch with
`lib/Driver/ToolCahins/Gnu.cpp.orig` to see why the patch failed.
The `.orig` file will be in the build directory referenced in the line `note: keeping build directory ...`;
this message results from the `--keep-failed` flag.
4. Now you should be able to open whichever patch failed, and the `foo.orig` file that it failed on.
Correct the patch by adapting it to the new code and be mindful of whitespace;
which can be an easily missed reason for failures.
For cases where the hunk is no longer needed you can simply remove it from the patch.
This is fine for small corrections, but when more serious changes are needed its better to use git.
1. Clone the LLVM monorepo at https://github.com/llvm/llvm-project/
2. Check out the revision we were using before.
3. Use `patch -p1 < path/to-path` in the project subdirectories to apply the patches and commit.
4. Use `git rebase HEAD^ --onto <dest>` to rebase the patches onto the new revision we are trying to build, and fix all conflicts.
5. Use `git diff HEAD^:<project> HEAD:<project>` to get subdir diff to write back to Nixpkgs.
## Information on our current patch sets
### "GNU Install Dirs" patches
Use CMake's [`GNUInstallDirs`](https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html) to support multiple outputs.
Previously, LLVM Just hard-coded `bin`, `include`, and `lib${LLVM_TARGET_PREFIX}`.
We are making it use these variables.
For the older LLVM versions, these patches live in https://github.com/Ericson2314/llvm-project branches `split-prefix`.
Instead of applying the patches to the worktree per the above instructions, one can checkout those directly and rebase those instead.
For newer LLVM versions, enough has has been upstreamed,
(see https://reviews.llvm.org/differential/query/5UAfpj_9zHwY/ for my progress upstreaming),
that I have just assembled new gnu-install-dirs patches from the remaining unmerged patches instead of rebasing from the prior LLVM's gnu install dirs patch.

View File

@ -15,6 +15,7 @@ let
mkdir -p "$out"
cp -r ${monorepoSrc}/cmake "$out"
cp -r ${monorepoSrc}/${pname} "$out"
cp -r ${monorepoSrc}/clang-tools-extra "$out"
'';
sourceRoot = "${src.name}/${pname}";
@ -26,6 +27,7 @@ let
buildInputs = [ libxml2 libllvm ];
cmakeFlags = [
"-DCLANG_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/clang"
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
@ -71,7 +73,7 @@ let
# Move libclang to 'lib' output
moveToOutput "lib/libclang.*" "$lib"
moveToOutput "lib/libclang-cpp.*" "$lib"
substituteInPlace $out/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-cpp." "$lib/lib/libclang-cpp."

View File

@ -1,164 +1,69 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ea37850ad60..ac0f2d4f60b4 100644
index c27beec313d7..480f13e73c9f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.13.4)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(Clang)
@@ -78,15 +78,17 @@ if(CLANG_BUILT_STANDALONE)
if (NOT LLVM_CONFIG_FOUND)
# Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
# path is removed.
- set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}")
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
# N.B. this is just a default value, the CACHE PATHs below can be overriden.
set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
set(TOOLS_BINARY_DIR "${LLVM_TOOLS_BINARY_DIR}")
set(LIBRARY_DIR "${LLVM_LIBRARY_DIR}")
+ else()
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
endif()
+ include(GNUInstallDirs)
+
set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
@@ -424,7 +426,7 @@ include_directories(BEFORE
- set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
@@ -128,7 +130,7 @@ if(CLANG_BUILT_STANDALONE)
set(LLVM_INCLUDE_TESTS ON)
endif()
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(DIRECTORY include/clang include/clang-c
- DESTINATION include
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT clang-headers
FILES_MATCHING
PATTERN "*.def"
@@ -433,7 +435,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
)
- include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
+ include_directories(${LLVM_INCLUDE_DIRS})
link_directories("${LLVM_LIBRARY_DIR}")
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
- DESTINATION include
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT clang-headers
FILES_MATCHING
PATTERN "CMakeFiles" EXCLUDE
@@ -453,7 +455,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
add_custom_target(bash-autocomplete DEPENDS utils/bash-autocomplete.sh)
install(PROGRAMS utils/bash-autocomplete.sh
- DESTINATION share/clang
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
COMPONENT bash-autocomplete)
if(NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-bash-autocomplete
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake
index 5752f4277444..5bf08dbf5e83 100644
index 21ac332e4f5f..b16c314bd1e2 100644
--- a/cmake/modules/AddClang.cmake
+++ b/cmake/modules/AddClang.cmake
@@ -118,9 +118,9 @@ macro(add_clang_library name)
@@ -119,8 +119,8 @@ macro(add_clang_library name)
install(TARGETS ${lib}
COMPONENT ${lib}
${export_to_clangtargets}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- RUNTIME DESTINATION bin)
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-${lib}
@@ -159,7 +159,7 @@ macro(add_clang_tool name)
get_target_export_arg(${name} Clang export_to_clangtargets)
install(TARGETS ${name}
${export_to_clangtargets}
- RUNTIME DESTINATION bin
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT ${name})
if(NOT LLVM_ENABLE_IDE)
@@ -174,7 +174,7 @@ endmacro()
macro(add_clang_symlink name dest)
add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
# Always generate install targets
- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
+ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
endmacro()
function(clang_target_link_libraries target type)
diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
index 078988980c52..14b58614b40a 100644
index 6e2060991b92..b9bc930d26b8 100644
--- a/lib/Headers/CMakeLists.txt
+++ b/lib/Headers/CMakeLists.txt
@@ -234,7 +234,7 @@ set_target_properties(clang-resource-headers PROPERTIES
FOLDER "Misc"
RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
@@ -420,7 +420,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
add_header_target("windows-resource-headers" ${windows_only_files})
add_header_target("utility-resource-headers" ${utility_files})
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
install(
FILES ${files} ${generated_files}
diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
index 99c6081db2d6..0887102febb3 100644
--- a/tools/c-index-test/CMakeLists.txt
+++ b/tools/c-index-test/CMakeLists.txt
@@ -49,7 +49,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH
"@executable_path/../../lib")
else()
- set(INSTALL_DESTINATION bin)
+ set(INSTALL_DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
install(TARGETS c-index-test
diff --git a/tools/clang-format/CMakeLists.txt b/tools/clang-format/CMakeLists.txt
index 35ecdb11253c..d77d75de0094 100644
--- a/tools/clang-format/CMakeLists.txt
+++ b/tools/clang-format/CMakeLists.txt
@@ -21,20 +21,20 @@ if( LLVM_LIB_FUZZING_ENGINE OR LLVM_USE_SANITIZE_COVERAGE )
endif()
install(PROGRAMS clang-format-bbedit.applescript
- DESTINATION share/clang
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
COMPONENT clang-format)
install(PROGRAMS clang-format-diff.py
- DESTINATION share/clang
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
COMPONENT clang-format)
install(PROGRAMS clang-format-sublime.py
- DESTINATION share/clang
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
COMPONENT clang-format)
install(PROGRAMS clang-format.el
- DESTINATION share/clang
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
COMPONENT clang-format)
install(PROGRAMS clang-format.py
- DESTINATION share/clang
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
COMPONENT clang-format)
install(PROGRAMS git-clang-format
- DESTINATION bin
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT clang-format)
diff --git a/tools/clang-rename/CMakeLists.txt b/tools/clang-rename/CMakeLists.txt
index cda8e29ec5b1..0134d8ccd70b 100644
--- a/tools/clang-rename/CMakeLists.txt
+++ b/tools/clang-rename/CMakeLists.txt
@@ -19,8 +19,8 @@ clang_target_link_libraries(clang-rename
)
install(PROGRAMS clang-rename.py
- DESTINATION share/clang
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
COMPONENT clang-rename)
install(PROGRAMS clang-rename.el
- DESTINATION share/clang
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/clang
COMPONENT clang-rename)
#############################################################
# Install rules for the catch-all clang-resource-headers target
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt
index bf88dca0a34b..7a10181e7738 100644
index 8d95d0900e8c..ebc70ff7526d 100644
--- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt
@@ -186,7 +186,7 @@ endif()
if(INTERNAL_INSTALL_PREFIX)
set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include")
else()
- set(LIBCLANG_HEADERS_INSTALL_DESTINATION include)
+ set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
endif()
install(DIRECTORY ../../include/clang-c
@@ -216,7 +216,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
@@ -180,7 +180,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
COMPONENT
libclang-python-bindings
DESTINATION
@ -167,69 +72,34 @@ index bf88dca0a34b..7a10181e7738 100644
endforeach()
if(NOT LLVM_ENABLE_IDE)
add_custom_target(libclang-python-bindings)
diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt
index 74334e53c9b1..ebaae33e4324 100644
--- a/tools/scan-build/CMakeLists.txt
+++ b/tools/scan-build/CMakeLists.txt
@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD)
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
install(PROGRAMS bin/${BinFile}
- DESTINATION bin
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT scan-build)
endforeach()
diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
index 061dc7ef4dd9..adc54b2edc32 100644
--- a/tools/scan-build-py/CMakeLists.txt
+++ b/tools/scan-build-py/CMakeLists.txt
@@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
install(PROGRAMS lib/libscanbuild/${lib}
- DESTINATION lib/libscanbuild
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
COMPONENT scan-build-py)
endforeach()
@@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD)
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile})
list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile})
install(PROGRAMS libexec/${LibexecFile}
- DESTINATION libexec
+ DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
COMPONENT scan-build)
endforeach()
@@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
install(PROGRAMS lib/libscanbuild/resources/${resource}
- DESTINATION lib/libscanbuild/resources
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
COMPONENT scan-build-py)
endforeach()
@@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD)
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile})
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile})
install(FILES share/scan-build/${ShareFile}
- DESTINATION share/scan-build
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build
COMPONENT scan-build)
endforeach()
@@ -122,7 +122,7 @@ foreach(lib ${LibEar})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
install(PROGRAMS lib/libear/${lib}
- DESTINATION lib/libear
+ DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
COMPONENT scan-build-py)
endforeach()
diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt
index eccc6b83195b..ff72d9cf0666 100644
--- a/tools/scan-view/CMakeLists.txt
+++ b/tools/scan-view/CMakeLists.txt
@@ -20,7 +20,7 @@ if(CLANG_INSTALL_SCANVIEW)
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
install(PROGRAMS bin/${BinFile}
- DESTINATION bin
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT scan-view)
endforeach()
@@ -34,7 +34,7 @@ if(CLANG_INSTALL_SCANVIEW)
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/${ShareFile})
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-view/${ShareFile})
install(FILES share/${ShareFile}
- DESTINATION share/scan-view
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-view
COMPONENT scan-view)
endforeach()
diff --git a/utils/hmaptool/CMakeLists.txt b/utils/hmaptool/CMakeLists.txt
index 62f2de0cb15c..6aa66825b6ec 100644
--- a/utils/hmaptool/CMakeLists.txt
+++ b/utils/hmaptool/CMakeLists.txt
@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM
list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL})
install(PROGRAMS ${CLANG_HMAPTOOL}
- DESTINATION bin
+ DESTINATION ${CMAKE_INSTALL_BINDIR}
COMPONENT hmaptool)
add_custom_target(hmaptool ALL DEPENDS ${Depends})

View File

@ -11,12 +11,13 @@ diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
index fe3c0191bb..c6a482bece 100644
--- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/lib/Driver/ToolChains/Gnu.cpp
@@ -487,12 +487,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
if (!IsStatic) {
@@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
} else {
if (Args.hasArg(options::OPT_rdynamic))
CmdArgs.push_back("-export-dynamic");
-
- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) {
- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE &&
- !Args.hasArg(options::OPT_r)) {
- CmdArgs.push_back("-dynamic-linker");
- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
- ToolChain.getDynamicLinker(Args)));

View File

@ -2,7 +2,7 @@ diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
index 3a66dd9c3fb..7efc85d9f9f 100644
--- a/lib/builtins/CMakeLists.txt
+++ b/lib/builtins/CMakeLists.txt
@@ -345,4 +345,8 @@ if (NOT MSVC)
@@ -348,4 +348,8 @@ if (NOT MSVC)
+ set(i486_SOURCES ${i386_SOURCES})
+ set(i586_SOURCES ${i386_SOURCES})
@ -11,7 +11,7 @@ index 3a66dd9c3fb..7efc85d9f9f 100644
if (WIN32)
set(i386_SOURCES
${i386_SOURCES}
@@ -608,6 +612,7 @@ else ()
@@ -723,6 +723,7 @@ else ()
endif()
foreach (arch ${BUILTIN_SUPPORTED_ARCH})

View File

@ -66,7 +66,6 @@ stdenv.mkDerivation {
outputs = [ "out" "dev" ];
patches = [
./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
./gnu-install-dirs.patch
# ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the

View File

@ -1,30 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c5003b5efa1d..4fffb9721284 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,8 @@
cmake_minimum_required(VERSION 3.13.4)
+include(GNUInstallDirs)
+
# Check if compiler-rt is built as a standalone project.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR COMPILER_RT_STANDALONE_BUILD)
project(CompilerRT C CXX ASM)
diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
index 1ada0ab30ba0..b4be6c4a3c73 100644
index 8a6219568b3f..30ee68a47ccf 100644
--- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake
@@ -66,7 +66,7 @@ if (LLVM_TREE_AVAILABLE)
else()
# Take output dir and install path from the user.
set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
- "Path where built compiler-rt libraries should be stored.")
+ "Path where built compiler-rt build artifacts should be stored.")
set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH
"Path where built compiler-rt executables should be stored.")
set(COMPILER_RT_INSTALL_PATH "" CACHE PATH
@@ -98,23 +98,23 @@ endif()
@@ -100,13 +100,13 @@ endif()
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(COMPILER_RT_OUTPUT_LIBRARY_DIR
${COMPILER_RT_OUTPUT_DIR}/lib)
@ -40,16 +18,3 @@ index 1ada0ab30ba0..b4be6c4a3c73 100644
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
"Path where built compiler-rt libraries should be installed.")
endif()
-extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" bin)
+extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_BINDIR}")
set(COMPILER_RT_INSTALL_BINARY_DIR "${default_install_path}" CACHE PATH
"Path where built compiler-rt executables should be installed.")
-extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" include)
+extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_INCLUDEDIR}")
set(COMPILER_RT_INSTALL_INCLUDE_DIR "${default_install_path}" CACHE PATH
"Path where compiler-rt headers should be installed.")
-extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" share)
+extend_path(default_install_path "${COMPILER_RT_INSTALL_PATH}" "${CMAKE_INSTALL_DATADIR}")
set(COMPILER_RT_INSTALL_DATA_DIR "${default_install_path}" CACHE PATH
"Path where compiler-rt data files should be installed.")

View File

@ -18,11 +18,11 @@
}:
let
release_version = "14.0.0";
release_version = "15.0.0";
candidate = ""; # empty or "rcN"
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
rev = "fb1582f6c54422995c6fb61ba4c55126b357f64e"; # When using a Git commit
rev-version = "unstable-2022-01-07"; # When using a Git commit
rev = "a5640968f2f7485b2aa4919f5fa68fd8f23e2d1f"; # When using a Git commit
rev-version = "unstable-2022-26-07"; # When using a Git commit
version = if rev != "" then rev-version else "${release_version}${dash-candidate}";
targetConfig = stdenv.targetPlatform.config;
@ -30,7 +30,7 @@ let
owner = "llvm";
repo = "llvm-project";
rev = if rev != "" then rev else "llvmorg-${version}";
sha256 = "1pkgdsscvf59i22ix763lp2z3sg0v2z2ywh0n07k3ki7q1qpqbhk";
sha256 = "1sh5xihdfdn2hp7ds3lkaq1bfrl4alj36gl1aidmhlw65p5rdvl7";
};
llvm_meta = {
@ -158,16 +158,17 @@ let
] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
targetLlvmLibraries.libunwind
];
extraBuildCommands = ''
echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
echo "-lunwind" >> $out/nix-support/cc-ldflags
'' + lib.optionalString stdenv.targetPlatform.isWasm ''
echo "-fno-exceptions" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands cc;
extraBuildCommands = mkExtraBuildCommands cc;
nixSupport.cc-cflags =
[ "-rtlib=compiler-rt"
"-Wno-unused-command-line-argument"
"-B${targetLlvmLibraries.compiler-rt}/lib"
]
++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
++ lib.optional
(!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
"-lunwind"
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
};
clangNoLibcxx = wrapCCWith rec {
@ -177,11 +178,12 @@ let
extraPackages = [
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = ''
echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
echo "-nostdlib++" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands cc;
extraBuildCommands = mkExtraBuildCommands cc;
nixSupport.cc-cflags = [
"-rtlib=compiler-rt"
"-B${targetLlvmLibraries.compiler-rt}/lib"
"-nostdlib++"
];
};
clangNoLibc = wrapCCWith rec {
@ -191,10 +193,11 @@ let
extraPackages = [
targetLlvmLibraries.compiler-rt
];
extraBuildCommands = ''
echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands cc;
extraBuildCommands = mkExtraBuildCommands cc;
nixSupport.cc-cflags = [
"-rtlib=compiler-rt"
"-B${targetLlvmLibraries.compiler-rt}/lib"
];
};
clangNoCompilerRt = wrapCCWith rec {
@ -202,9 +205,8 @@ let
libcxx = null;
bintools = bintoolsNoLibc';
extraPackages = [ ];
extraBuildCommands = ''
echo "-nostartfiles" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands0 cc;
extraBuildCommands = mkExtraBuildCommands0 cc;
nixSupport.cc-cflags = [ "-nostartfiles" ];
};
clangNoCompilerRtWithLibc = wrapCCWith rec {

View File

@ -29,18 +29,29 @@ stdenv.mkDerivation rec {
mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
cp -r ${monorepoSrc}/third-party "$out"
cp -r ${monorepoSrc}/runtimes "$out"
'';
sourceRoot = "${src.name}/${basename}";
sourceRoot = "${src.name}/runtimes";
outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
prePatch = ''
cd ../${basename}
chmod -R u+w .
'';
patches = [
./gnu-install-dirs.patch
] ++ lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
];
postPatch = ''
cd ../runtimes
'';
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
patchShebangs utils/cat_files.py
'';
@ -50,7 +61,10 @@ stdenv.mkDerivation rec {
buildInputs = lib.optionals (!headersOnly) [ libcxxabi ];
cmakeFlags = [ "-DLIBCXX_CXX_ABI=libcxxabi" ]
cmakeFlags = [
"-DLLVM_ENABLE_RUNTIMES=libcxx"
"-DLIBCXX_CXX_ABI=${lib.optionalString (!headersOnly) "system-"}libcxxabi"
] ++ lib.optional (!headersOnly) "-DLIBCXX_CXX_ABI_INCLUDE_PATHS=${libcxxabi.dev}/include/c++/v1"
++ lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
++ lib.optionals stdenv.hostPlatform.isWasm [
@ -62,15 +76,6 @@ stdenv.mkDerivation rec {
buildFlags = lib.optional headersOnly "generate-cxx-headers";
installTargets = lib.optional headersOnly "install-cxx-headers";
# At this point, cxxabi headers would be installed in the dev output, which
# prevents moveToOutput from doing its job later in the build process.
postInstall = lib.optionalString (!headersOnly) ''
mv "$dev/include/c++/v1/"* "$out/include/c++/v1/"
pushd "$dev"
rmdir -p include/c++/v1
popd
'';
passthru = {
isLLVM = true;
};

View File

@ -1,85 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0569a4a54ca..7d665f5a3258 100644
index 74eff2002fc9..c935d10878bb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,8 @@ endif()
#===============================================================================
cmake_minimum_required(VERSION 3.13.4)
+include(GNUInstallDirs)
+
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
# Add path for custom modules
@@ -415,13 +417,13 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
@@ -419,7 +419,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ set(LIBCXX_INSTALL_LIBRARY_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}" CACHE PATH
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
"Path where built libc++ libraries should be installed.")
- set(LIBCXX_INSTALL_RUNTIME_DIR bin CACHE PATH
+ set(LIBCXX_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libc++ runtime libraries should be installed.")
- set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ set(LIBCXX_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE PATH
"Path where target-agnostic libc++ headers should be installed.")
- set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH
+ set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH
set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH
"Path where target-specific libc++ headers should be installed.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR})
@@ -431,11 +433,11 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
@@ -436,7 +436,7 @@ else()
set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
endif()
set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
"Path where built libc++ libraries should be installed.")
- set(LIBCXX_INSTALL_RUNTIME_DIR bin CACHE PATH
+ set(LIBCXX_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}/c++/v1" CACHE PATH
"Path where built libc++ runtime libraries should be installed.")
- set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ set(LIBCXX_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE PATH
"Path where target-agnostic libc++ headers should be installed.")
set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}" CACHE PATH
"Path where target-specific libc++ headers should be installed.")
@@ -443,11 +445,11 @@ else()
set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
"Path where built libc++ libraries should be installed.")
- set(LIBCXX_INSTALL_RUNTIME_DIR bin CACHE PATH
+ set(LIBCXX_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libc++ runtime libraries should be installed.")
- set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ set(LIBCXX_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE PATH
"Path where target-agnostic libc++ headers should be installed.")
set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}" CACHE PATH
"Path where target-specific libc++ headers should be installed.")
diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
index 5a8a4a270a1a..d69405ddeeac 100644
--- a/cmake/Modules/HandleLibCXXABI.cmake
+++ b/cmake/Modules/HandleLibCXXABI.cmake
@@ -1,8 +1,9 @@
-
#===============================================================================
# Add an ABI library if appropriate
#===============================================================================
+include(GNUInstallDirs)
+
#
# _setup_abi: Set up the build to use an ABI library
#
@@ -63,7 +64,7 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
if (LIBCXX_INSTALL_HEADERS)
install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
- DESTINATION include/c++/v1/${dstdir}
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}"
COMPONENT cxx-headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)

View File

@ -18,9 +18,11 @@ stdenv.mkDerivation rec {
cp -r ${monorepoSrc}/libcxx/src/include "$out/libcxx/src"
mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
cp -r ${monorepoSrc}/runtimes "$out"
'';
sourceRoot = "${src.name}/${pname}";
sourceRoot = "${src.name}/runtimes";
outputs = [ "out" "dev" ];
@ -30,14 +32,25 @@ stdenv.mkDerivation rec {
patch -p1 -d llvm -i ${./wasm.patch}
'';
prePatch = ''
cd ../${pname}
chmod -R u+w .
'';
patches = [
./gnu-install-dirs.patch
./skip-other-project-tests.patch
];
postPatch = ''
cd ../runtimes
'';
nativeBuildInputs = [ cmake python3 ];
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
cmakeFlags = [
"-DLLVM_ENABLE_RUNTIMES=libcxxabi"
"-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DLLVM_ENABLE_LIBCXX=ON"
@ -49,28 +62,20 @@ stdenv.mkDerivation rec {
"-DLIBCXXABI_ENABLE_SHARED=OFF"
];
installPhase = if stdenv.isDarwin
then ''
for file in lib/*.dylib; do
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
install_name_tool -id $out/$file $file
done
make install
install -d 755 $out/include
install -m 644 ../include/*.h $out/include
''
else ''
install -d -m 755 $out/include $out/lib
install -m 644 lib/libc++abi.a $out/lib
install -m 644 ../include/cxxabi.h $out/include
'' + lib.optionalString enableShared ''
install -m 644 lib/libc++abi.so.1.0 $out/lib
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
'';
preInstall = lib.optionalString stdenv.isDarwin ''
for file in lib/*.dylib; do
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
install_name_tool -id $out/$file $file
done
'';
postInstall = ''
mkdir -p "$dev/include"
install -m 644 ../../${pname}/include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
'';
meta = llvm_meta // {
homepage = "https://libcxxabi.llvm.org/";

View File

@ -1,46 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 858f5d5cfd7f..16c67d7062be 100644
index b8326d08d23a..a1e36f713161 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,8 @@ endif()
cmake_minimum_required(VERSION 3.13.4)
+include(GNUInstallDirs)
+
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
# Add path for custom modules
@@ -213,9 +215,9 @@ set(CMAKE_MODULE_PATH
@@ -187,7 +187,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
"Path where built libc++abi libraries should be installed.")
- set(LIBCXXABI_INSTALL_RUNTIME_DIR bin CACHE PATH
+ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libc++abi runtime libraries should be installed.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
@@ -224,16 +226,16 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
@@ -201,7 +201,7 @@ else()
set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
endif()
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
"Path where built libc++abi libraries should be installed.")
- set(LIBCXXABI_INSTALL_RUNTIME_DIR bin CACHE PATH
+ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libc++abi runtime libraries should be installed.")
else()
set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
"Path where built libc++abi libraries should be installed.")
- set(LIBCXXABI_INSTALL_RUNTIME_DIR bin CACHE PATH
+ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libc++abi runtime libraries should be installed.")
endif()

View File

@ -0,0 +1,45 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,10 +131,21 @@ if (NOT LIBCXXABI_ENABLE_SHARED AND NOT LIBCXXABI_ENABLE_STATIC)
message(FATAL_ERROR "libc++abi must be built as either a shared or static library.")
endif()
-# TODO: Remove this, which shouldn't be necessary since we know we're being built
-# side-by-side with libc++.
set(LIBCXXABI_LIBCXX_INCLUDES "" CACHE PATH
"Specify path to libc++ includes.")
+if (NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
+ if (NOT IS_DIRECTORY ${LIBCXXABI_LIBCXX_INCLUDES})
+ message(FATAL_ERROR
+ "LIBCXXABI_LIBCXX_INCLUDES=${LIBCXXABI_LIBCXX_INCLUDES} is not a valid directory. "
+ "Please provide the path to where the libc++ headers have been installed.")
+ endif()
+ add_library(cxx-headers INTERFACE)
+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
+ target_compile_options(cxx-headers INTERFACE /I "${LIBCXXABI_LIBCXX_INCLUDES}")
+ else()
+ target_compile_options(cxx-headers INTERFACE -I "${LIBCXXABI_LIBCXX_INCLUDES}")
+ endif()
+endif()
set(LIBCXXABI_HERMETIC_STATIC_LIBRARY_DEFAULT OFF)
if (WIN32)
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -61,9 +61,13 @@ if (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
list(APPEND LIBCXXABI_TEST_DEPS cxx_external_threads)
endif()
-list(APPEND LIBCXXABI_TEST_DEPS cxx)
-if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
- list(APPEND LIBCXXABI_TEST_DEPS unwind)
+if(libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
+ list(APPEND LIBCXXABI_TEST_DEPS cxx)
+endif()
+if(libunwind IN_LIST LLVM_ENABLE_RUNTIMES)
+ if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
+ list(APPEND LIBCXXABI_TEST_DEPS unwind)
+ endif()
endif()
set(AUTO_GEN_COMMENT "## Autogenerated by libcxxabi configuration.\n# Do not edit!")

View File

@ -1,6 +1,7 @@
{ lib, stdenv, llvm_meta, version
, monorepoSrc, runCommand
, cmake
, python3
, enableShared ? !stdenv.hostPlatform.isStatic
}:
@ -19,19 +20,32 @@ stdenv.mkDerivation rec {
cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx"
mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$out/llvm"
cp -r ${monorepoSrc}/runtimes "$out"
'';
sourceRoot = "${src.name}/${pname}";
sourceRoot = "${src.name}/runtimes";
prePatch = ''
cd ../${pname}
chmod -R u+w .
'';
patches = [
./gnu-install-dirs.patch
];
postPatch = ''
cd ../runtimes
'';
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake ];
nativeBuildInputs = [ cmake python3 ];
cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
cmakeFlags = [
"-DLLVM_ENABLE_RUNTIMES=libunwind"
] ++ lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
meta = llvm_meta // {
# Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst

View File

@ -1,65 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e3cc66dd2226..1299b596ce0d 100644
index 5a06805f05f1..86a50329e6a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,8 @@ endif()
cmake_minimum_required(VERSION 3.13.4)
+include(GNUInstallDirs)
+
set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
# Add path for custom modules
@@ -139,25 +141,27 @@ set(CMAKE_MODULE_PATH
@@ -117,7 +117,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ set(LIBUNWIND_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}" CACHE PATH
+ "Path where built libunwind headers should be installed.")
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
"Path where built libunwind libraries should be installed.")
- set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH
+ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libunwind runtime libraries should be installed.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
@@ -129,7 +129,7 @@ else()
else()
set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
endif()
-elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
- set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
- "Path where built libunwind libraries should be installed.")
- set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH
- "Path where built libunwind runtime libraries should be installed.")
else()
- set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
+ if(LLVM_LIBRARY_OUTPUT_INTDIR)
+ set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+ else()
+ set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+ endif()
+ set(LIBUNWIND_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE PATH
+ "Path where built libunwind headers should be installed.")
+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
"Path where built libunwind libraries should be installed.")
- set(LIBUNWIND_INSTALL_RUNTIME_DIR bin CACHE PATH
+ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
"Path where built libunwind runtime libraries should be installed.")
endif()
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index c3bb1dd0f69f..adf1766c44cb 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -14,7 +14,7 @@ if(LIBUNWIND_INSTALL_HEADERS)
foreach(file ${files})
get_filename_component(dir ${file} DIRECTORY)
install(FILES ${file}
- DESTINATION "include/${dir}"
+ DESTINATION "${LIBUNWIND_INSTALL_INCLUDE_DIR}/${dir}"
COMPONENT unwind-headers
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)

View File

@ -25,16 +25,14 @@ stdenv.mkDerivation rec {
patches = [
./gnu-install-dirs.patch
# On Darwin the llvm-config is perhaps not working fine as the
# LLVM_MAIN_SRC_DIR is not getting set correctly, and the build fails as
# the include path is not correct.
./fix-root-src-dir.patch
];
nativeBuildInputs = [ cmake ];
buildInputs = [ libllvm libxml2 ];
cmakeFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
cmakeFlags = [
"-DLLD_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/lld"
] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
"-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
];

View File

@ -1,13 +0,0 @@
diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt
index e1a29b884d17..9d542f8fbfc1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -64,7 +64,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set(LLVM_MAIN_INCLUDE_DIR ${MAIN_INCLUDE_DIR} CACHE PATH "Path to llvm/include")
set(LLVM_BINARY_DIR ${LLVM_OBJ_ROOT} CACHE PATH "Path to LLVM build tree")
- set(LLVM_MAIN_SRC_DIR ${MAIN_SRC_DIR} CACHE PATH "Path to LLVM source tree")
+ set(LLVM_MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm" CACHE PATH "Path to LLVM source tree")
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR}
NO_DEFAULT_PATH)

View File

@ -1,5 +1,36 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dcc649629a4b..58dca54642e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,13 +70,15 @@ if(LLD_BUILT_STANDALONE)
if (NOT LLVM_CONFIG_FOUND)
# Pull values from LLVMConfig.cmake. We can drop this once the llvm-config
# path is removed.
- set(MAIN_INCLUDE_DIR "${LLVM_INCLUDE_DIR}")
+ set(INCLUDE_DIRS ${LLVM_INCLUDE_DIRS})
set(LLVM_OBJ_DIR "${LLVM_BINARY_DIR}")
# N.B. this is just a default value, the CACHE PATHs below can be overridden.
set(MAIN_SRC_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../llvm")
+ else()
+ set(INCLUDE_DIRS "${LLVM_BINARY_DIR}/include" "${MAIN_INCLUDE_DIR}")
endif()
- set(LLVM_MAIN_INCLUDE_DIR "${MAIN_INCLUDE_DIR}" CACHE PATH "Path to llvm/include")
+ set(LLVM_INCLUDE_DIRS ${INCLUDE_DIRS} CACHE PATH "Path to llvm/include and any other header dirs needed")
set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
@@ -95,7 +97,7 @@ if(LLD_BUILT_STANDALONE)
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
- include_directories("${LLVM_BINARY_DIR}/include" ${LLVM_INCLUDE_DIRS})
+ include_directories(${LLVM_INCLUDE_DIRS})
link_directories(${LLVM_LIBRARY_DIRS})
if(LLVM_INCLUDE_TESTS)
diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
index dd2898ce6236..ebbea040ff54 100644
index d3924f7243d4..42a7cd62281c 100644
--- a/cmake/modules/AddLLD.cmake
+++ b/cmake/modules/AddLLD.cmake
@@ -18,8 +18,8 @@ macro(add_lld_library name)
@ -13,10 +44,3 @@ index dd2898ce6236..ebbea040ff54 100644
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
@@ -62,5 +62,5 @@ endmacro()
macro(add_lld_symlink name dest)
add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
# Always generate install targets
- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
+ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
endmacro()

View File

@ -1,16 +1,3 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 79d451965ed4..78188978d6de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,8 @@ set(CMAKE_MODULE_PATH
# If we are not building as part of LLVM, build LLDB as a standalone project,
# using LLVM as an external library.
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ include(GNUInstallDirs)
+
project(lldb)
include(LLDBStandalone)
diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
index 3291a7c808e1..b27d27ce6a87 100644
--- a/cmake/modules/AddLLDB.cmake

View File

@ -1,11 +1,17 @@
--- a/source/Plugins/Process/Linux/Procfs.h
+++ b/source/Plugins/Process/Linux/Procfs.h
@@ -11,21 +11,12 @@
@@ -10,6 +10,7 @@
// sys/procfs.h on Android/Linux for all supported architectures.
#include <sys/ptrace.h>
+#include <asm/ptrace.h>
#include "lldb/lldb-types.h"
@@ -17,23 +18,13 @@
#include <vector>
-#ifdef __ANDROID__
-#if defined(__arm64__) || defined(__aarch64__)
-typedef unsigned long elf_greg_t;
@ -29,3 +35,6 @@
#include <sys/procfs.h>
-#endif // __ANDROID__
+#endif
namespace lldb_private {
namespace process_linux {

View File

@ -89,6 +89,9 @@ in stdenv.mkDerivation (rec {
rm test/DebugInfo/X86/convert-inlined.ll
rm test/DebugInfo/X86/convert-linked.ll
rm test/tools/dsymutil/X86/op-convert.test
rm test/tools/gold/X86/split-dwarf.ll
rm test/tools/llvm-dwarfdump/X86/prettyprint_types.s
rm test/tools/llvm-dwarfdump/X86/simplified-template-names.s
'' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
# Seems to require certain floating point hardware (NEON?)
rm test/ExecutionEngine/frem.ll
@ -114,7 +117,7 @@ in stdenv.mkDerivation (rec {
# Some flags don't need to be repassed because LLVM already does so (like
# CMAKE_BUILD_TYPE), others are irrelevant to the result.
flagsForLlvmConfig = [
"-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/"
"-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
"-DLLVM_ENABLE_RTTI=ON"
] ++ optionals enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON"
@ -194,7 +197,7 @@ in stdenv.mkDerivation (rec {
--replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
--replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
--replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
--replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "'"$lib"'")'
''
+ optionalString (stdenv.isDarwin && enableSharedLibraries) ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
@ -209,6 +212,9 @@ in stdenv.mkDerivation (rec {
checkTarget = "check-all";
# For the update script:
passthru.monorepoSrc = monorepoSrc;
requiredSystemFeatures = [ "big-parallel" ];
meta = llvm_meta // {
homepage = "https://llvm.org/";

View File

@ -1,22 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fec956091cd5..5a766f5c5d7c 100644
index 45399dc0537e..5d946e9e6583 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -303,6 +303,9 @@ set(LLVM_EXAMPLES_INSTALL_DIR "examples" CACHE STRING
"Path for examples subdirectory (enabled by LLVM_BUILD_EXAMPLES=ON) (defaults to 'examples')")
mark_as_advanced(LLVM_EXAMPLES_INSTALL_DIR)
+set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
+ "Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
+
# They are used as destination of target generators.
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
@@ -942,7 +942,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
install(TARGETS tf_xla_runtime EXPORT LLVMExports
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
# Once we add more modules, we should handle this more automatically.
if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index fed1fec7d72e..4baed19b9e98 100644
index 057431208322..56f0dcb258da 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -838,8 +838,8 @@ macro(add_llvm_library name)
@@ -844,8 +844,8 @@ macro(add_llvm_library name)
get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
install(TARGETS ${name}
${export_to_llvmexports}
@ -27,58 +26,28 @@ index fed1fec7d72e..4baed19b9e98 100644
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
if (NOT LLVM_ENABLE_IDE)
@@ -1056,7 +1056,7 @@ function(process_llvm_pass_plugins)
"set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
install(FILES
${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
- DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
+ DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
COMPONENT cmake-exports)
set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
@@ -1902,7 +1902,7 @@ function(llvm_install_library_symlink name dest type)
@@ -2007,7 +2007,7 @@ function(llvm_install_library_symlink name dest type)
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
if(WIN32 AND "${type}" STREQUAL "SHARED")
set(output_dir bin)
set(output_dir "${CMAKE_INSTALL_BINDIR}")
endif()
@@ -1913,7 +1913,7 @@ function(llvm_install_library_symlink name dest type)
@@ -2271,15 +2271,15 @@ function(llvm_setup_rpath name)
endfunction()
-function(llvm_install_symlink name dest)
+function(llvm_install_symlink name dest output_dir)
cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
foreach(path ${CMAKE_MODULE_PATH})
if(EXISTS ${path}/LLVMInstallSymlink.cmake)
@@ -1936,7 +1936,7 @@ function(llvm_install_symlink name dest)
set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
install(SCRIPT ${INSTALL_SYMLINK}
- CODE "install_symlink(${full_name} ${full_dest} ${LLVM_TOOLS_INSTALL_DIR})"
+ CODE "install_symlink(${full_name} ${full_dest} ${output_dir})"
COMPONENT ${component})
if (NOT LLVM_ENABLE_IDE AND NOT ARG_ALWAYS_GENERATE)
@@ -2019,7 +2019,8 @@ function(add_llvm_tool_symlink link_name target)
endif()
if ((TOOL_IS_TOOLCHAIN OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY) AND LLVM_BUILD_TOOLS)
- llvm_install_symlink(${link_name} ${target})
+ GNUInstallDirs_get_absolute_install_dir(output_dir LLVM_TOOLS_INSTALL_DIR)
+ llvm_install_symlink(${link_name} ${target} ${output_dir})
endif()
endif()
endfunction()
@@ -2148,9 +2149,9 @@ function(llvm_setup_rpath name)
if (APPLE)
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
- set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
# $ORIGIN is not interpreted at link time by aix ld.
# Since BUILD_SHARED_LIBS is only recommended for use by developers,
# hardcode the rpath to build/install lib dir first in this mode.
# FIXME: update this when there is better solution.
- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
elseif(UNIX)
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
@ -102,19 +71,10 @@ index 891c9e6d618c..8d963f3b0069 100644
list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
index cea0c1df0a14..eedcd9450312 100644
index d4b0ab959148..26ed981fd09f 100644
--- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt
@@ -2,7 +2,7 @@ include(ExtendPath)
include(LLVMDistributionSupport)
include(FindPrefixFromConfig)
-set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
+set(LLVM_INSTALL_PACKAGE_DIR ${LLVM_INSTALL_CMAKE_DIR} CACHE STRING "Path for CMake subdirectory (defaults to 'cmake/llvm')")
set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
# First for users who use an installed LLVM, create the LLVMExports.cmake file.
@@ -122,7 +122,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
@@ -128,7 +128,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
)
list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
@ -123,24 +83,11 @@ index cea0c1df0a14..eedcd9450312 100644
set(LLVM_CONFIG_LIBRARY_DIRS
"${LLVM_CONFIG_LIBRARY_DIR}"
# FIXME: Should there be other entries here?
diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
index b5c35f706cb7..9261ab797de6 100644
--- a/cmake/modules/LLVMInstallSymlink.cmake
+++ b/cmake/modules/LLVMInstallSymlink.cmake
@@ -6,7 +6,7 @@ include(GNUInstallDirs)
function(install_symlink name target outdir)
set(DESTDIR $ENV{DESTDIR})
- set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}")
+ set(bindir "${DESTDIR}${outdir}/")
message(STATUS "Creating ${name}")
diff --git a/docs/CMake.rst b/docs/CMake.rst
index 044ec8a4d39d..504d0eac3ade 100644
index 879b7b231d4c..9c31d14e8950 100644
--- a/docs/CMake.rst
+++ b/docs/CMake.rst
@@ -224,7 +224,7 @@ description is in `LLVM-related variables`_ below.
@@ -250,7 +250,7 @@ description is in `LLVM-related variables`_ below.
**LLVM_LIBDIR_SUFFIX**:STRING
Extra suffix to append to the directory where libraries are to be
installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
@ -149,72 +96,43 @@ index 044ec8a4d39d..504d0eac3ade 100644
**LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
Building the llvm toolchain can use a lot of resources, particularly
@@ -910,9 +910,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
@@ -284,6 +284,10 @@ manual, or execute ``cmake --help-variable VARIABLE_NAME``.
The path to install executables, relative to the *CMAKE_INSTALL_PREFIX*.
Defaults to "bin".
This file is available in two different locations.
-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where
- ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM.
- On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
+* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where
+ ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are
+ installed as part of an installed version of LLVM. This is typically
+ ``cmake/llvm/`` within the lib directory. On Linux, this is typically
+ ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
* ``<LLVM_BUILD_ROOT>/lib/cmake/llvm/LLVMConfig.cmake`` where
``<LLVM_BUILD_ROOT>`` is the root of the LLVM build tree. **Note: this is only
diff --git a/include/llvm/CMakeLists.txt b/include/llvm/CMakeLists.txt
index b46319f24fc8..2feabd1954e4 100644
--- a/include/llvm/CMakeLists.txt
+++ b/include/llvm/CMakeLists.txt
@@ -5,5 +5,5 @@ add_subdirectory(Frontend)
# If we're doing an out-of-tree build, copy a module map for generated
# header files into the build area.
if (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
- configure_file(module.modulemap.build module.modulemap COPYONLY)
+ configure_file(module.modulemap.build ${LLVM_INCLUDE_DIR}/module.modulemap COPYONLY)
endif (NOT "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+**CMAKE_INSTALL_LIBDIR**:PATH
+ The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*.
+ Defaults to "lib".
+
**CMAKE_INSTALL_INCLUDEDIR**:PATH
The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*.
Defaults to "include".
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
index abbb8a450da6..70c497be12f5 100644
index 370005cd8d7d..7e790bc52111 100644
--- a/tools/llvm-config/BuildVariables.inc.in
+++ b/tools/llvm-config/BuildVariables.inc.in
@@ -23,7 +23,10 @@
@@ -23,6 +23,7 @@
#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
+#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
+#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
#define LLVM_INSTALL_PACKAGE_DIR "@LLVM_INSTALL_PACKAGE_DIR@"
#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
#define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
index 8ed88f33ead4..5e7184bab90d 100644
index 2c6c55f89d38..f6d2068a0827 100644
--- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp
@@ -363,12 +363,20 @@ int main(int argc, char **argv) {
ActiveIncludeDir = std::string(Path.str());
}
{
- SmallString<256> Path(LLVM_TOOLS_INSTALL_DIR);
+ SmallString<256> Path(LLVM_INSTALL_BINDIR);
@@ -369,7 +369,11 @@ int main(int argc, char **argv) {
sys::fs::make_absolute(ActivePrefix, Path);
ActiveBinDir = std::string(Path.str());
}
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
- ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
+ {
+ SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
+ sys::fs::make_absolute(ActivePrefix, Path);
+ ActiveLibDir = std::string(Path.str());
+ }
+ {
+ SmallString<256> Path(LLVM_INSTALL_CMAKEDIR);
+ sys::fs::make_absolute(ActivePrefix, Path);
+ ActiveCMakeDir = std::string(Path.str());
+ }
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}
{
SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
sys::fs::make_absolute(ActivePrefix, Path);

View File

@ -5,6 +5,7 @@
, runCommand
, cmake
, llvm
, lit
, clang-unwrapped
, perl
, pkg-config
@ -24,17 +25,29 @@ stdenv.mkDerivation rec {
sourceRoot = "${src.name}/${pname}";
patches = [
./gnu-install-dirs.patch
./fix-find-tool.patch
./gnu-install-dirs.patch
./run-lit-directly.patch
];
outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake perl pkg-config clang-unwrapped ];
nativeBuildInputs = [ cmake perl pkg-config lit ];
buildInputs = [ llvm ];
# Unsup:Pass:XFail:Fail
# 26:267:16:8
doCheck = false;
checkTarget = "check-openmp";
preCheck = ''
patchShebangs ../tools/archer/tests/deflake.bash
'';
cmakeFlags = [
"-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" # Building the AMDGCN device RTL currently fails
"-DCLANG_TOOL=${clang-unwrapped}/bin/clang"
"-DOPT_TOOL=${llvm}/bin/opt"
"-DLINK_TOOL=${llvm}/bin/llvm-link"
];
meta = llvm_meta // {

View File

@ -1,54 +1,18 @@
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt
index 242df638f80d..a4654e96371f 100644
index ce66214822a2..6ab7b33c95da 100644
--- a/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/libomptarget/DeviceRTL/CMakeLists.txt
@@ -25,16 +25,16 @@ endif()
@@ -27,10 +27,10 @@ endif()
if (LLVM_DIR)
# Builds that use pre-installed LLVM have LLVM_DIR set.
# A standalone or LLVM_ENABLE_RUNTIMES=openmp build takes this route
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR})
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}
- NO_DEFAULT_PATH)
- find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ REQUIRED)
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
libomptarget_say("Building DeviceRTL. Using clang: ${CLANG_TOOL}")
elseif (LLVM_TOOL_CLANG_BUILD AND NOT CMAKE_CROSSCOMPILING AND NOT OPENMP_STANDALONE_BUILD)
# LLVM in-tree builds may use CMake target names to discover the tools.
- set(CLANG_TOOL $<TARGET_FILE:clang>)
- set(LINK_TOOL $<TARGET_FILE:llvm-link>)
- set(OPT_TOOL $<TARGET_FILE:opt>)
+ set(CLANG_TOOL $<TARGET_FILE:clang> REQUIRED)
+ set(LINK_TOOL $<TARGET_FILE:llvm-link> REQUIRED)
+ set(OPT_TOOL $<TARGET_FILE:opt> REQUIRED)
libomptarget_say("Building DeviceRTL. Using clang from in-tree build")
else()
libomptarget_say("Not building DeviceRTL. No appropriate clang found")
diff --git a/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
index 3f4c02671aeb..be9f4677d7b5 100644
--- a/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
+++ b/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
@@ -38,16 +38,16 @@ endif()
if (LLVM_DIR)
# Builds that use pre-installed LLVM have LLVM_DIR set.
- find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ find_program(CLANG_TOOL clang PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}
- NO_DEFAULT_PATH)
- find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+ REQUIRED)
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR} REQUIRED)
libomptarget_say("Building AMDGCN device RTL. Using clang: ${CLANG_TOOL}")
elseif (LLVM_TOOL_CLANG_BUILD AND NOT CMAKE_CROSSCOMPILING AND NOT OPENMP_STANDALONE_BUILD)
# LLVM in-tree builds may use CMake target names to discover the tools.
- set(CLANG_TOOL $<TARGET_FILE:clang>)
- set(LINK_TOOL $<TARGET_FILE:llvm-link>)
- set(OPT_TOOL $<TARGET_FILE:opt>)
+ set(CLANG_TOOL $<TARGET_FILE:clang> REQUIRED)
+ set(LINK_TOOL $<TARGET_FILE:llvm-link> REQUIRED)
+ set(OPT_TOOL $<TARGET_FILE:opt> REQUIRED)
libomptarget_say("Building AMDGCN device RTL. Using clang from in-tree build")
else()
libomptarget_say("Not building AMDGCN device RTL. No appropriate clang found")
+ )
+ find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL))
libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL} or opt: ${OPT_TOOL}")
return()

View File

@ -1,17 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f11a05f5622..fb90f8f6a49b 100644
index b6ddbe90516d..311ab1d50e7f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,8 @@ if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_S
set(OPENMP_STANDALONE_BUILD TRUE)
project(openmp C CXX)
+ include(GNUInstallDirs)
+
# CMAKE_BUILD_TYPE was not set, default to Release.
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
@@ -19,7 +21,7 @@ if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_S
@@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD)
set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
"Suffix of lib installation directory, e.g. 64 => lib64")
# Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
@ -20,7 +11,7 @@ index 7f11a05f5622..fb90f8f6a49b 100644
# Group test settings.
set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING
@@ -30,7 +32,7 @@ if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_S
@@ -40,7 +40,7 @@ if (OPENMP_STANDALONE_BUILD)
else()
set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
# If building in tree, we honor the same install suffix LLVM uses.
@ -29,61 +20,3 @@ index 7f11a05f5622..fb90f8f6a49b 100644
if (NOT MSVC)
set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang)
index 0e1ce2afd154..8b3810f83713 100644
--- a/libomptarget/plugins/amdgpu/CMakeLists.txt
+++ b/libomptarget/plugins/amdgpu/CMakeLists.txt
@@ -80,7 +80,7 @@ add_library(omptarget.rtl.amdgpu SHARED
# Install plugin under the lib destination folder.
# When we build for debug, OPENMP_LIBDIR_SUFFIX get set to -debug
-install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "lib${OPENMP_LIBDIR_SUFFIX}")
+install(TARGETS omptarget.rtl.amdgpu LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX}")
set_property(TARGET omptarget.rtl.amdgpu PROPERTY INSTALL_RPATH_USE_LINK_PATH ON)
if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
diff --git a/libomptarget/plugins/ve/CMakeLists.txt b/libomptarget/plugins/ve/CMakeLists.txt
index 16ce0891ca23..db30ee9c769f 100644
--- a/libomptarget/plugins/ve/CMakeLists.txt
+++ b/libomptarget/plugins/ve/CMakeLists.txt
@@ -32,7 +32,7 @@ if(${LIBOMPTARGET_DEP_VEO_FOUND})
# Install plugin under the lib destination folder.
install(TARGETS "omptarget.rtl.${tmachine_libname}"
- LIBRARY DESTINATION lib${OPENMP_LIBDIR_SUFFIX})
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${OPENMP_LIBDIR_SUFFIX})
target_link_libraries(
"omptarget.rtl.${tmachine_libname}"
diff --git a/runtime/src/CMakeLists.txt b/runtime/src/CMakeLists.txt
index e4f4e6e1e73f..1164b3b22b0e 100644
--- a/runtime/src/CMakeLists.txt
+++ b/runtime/src/CMakeLists.txt
@@ -346,13 +346,13 @@ add_dependencies(libomp-micro-tests libomp-test-deps)
# We want to install libomp in DESTDIR/CMAKE_INSTALL_PREFIX/lib
# We want to install headers in DESTDIR/CMAKE_INSTALL_PREFIX/include
if(${OPENMP_STANDALONE_BUILD})
- set(LIBOMP_HEADERS_INSTALL_PATH include)
+ set(LIBOMP_HEADERS_INSTALL_PATH "${CMAKE_INSTALL_INCLUDEDIR}")
else()
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION})
set(LIBOMP_HEADERS_INSTALL_PATH "${OPENMP_INSTALL_LIBDIR}/clang/${CLANG_VERSION}/include")
endif()
if(WIN32)
- install(TARGETS omp RUNTIME DESTINATION bin)
+ install(TARGETS omp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS ${LIBOMP_IMP_LIB_TARGET} ARCHIVE DESTINATION "${OPENMP_INSTALL_LIBDIR}")
# Create aliases (regular copies) of the library for backwards compatibility
set(LIBOMP_ALIASES "libiomp5md")
diff --git a/tools/multiplex/CMakeLists.txt b/tools/multiplex/CMakeLists.txt
index 64317c112176..4002784da736 100644
--- a/tools/multiplex/CMakeLists.txt
+++ b/tools/multiplex/CMakeLists.txt
@@ -4,7 +4,7 @@ if(LIBOMP_OMPT_SUPPORT)
add_library(ompt-multiplex INTERFACE)
target_include_directories(ompt-multiplex INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
- install(FILES ompt-multiplex.h DESTINATION include)
+ install(FILES ompt-multiplex.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
add_subdirectory(tests)
endif()

View File

@ -0,0 +1,12 @@
diff --git a/cmake/OpenMPTesting.cmake b/cmake/OpenMPTesting.cmake
--- a/cmake/OpenMPTesting.cmake
+++ b/cmake/OpenMPTesting.cmake
@@ -185,7 +185,7 @@ function(add_openmp_testsuite target comment)
if (${OPENMP_STANDALONE_BUILD})
set(LIT_ARGS ${OPENMP_LIT_ARGS} ${ARG_ARGS})
add_custom_target(${target}
- COMMAND ${PYTHON_EXECUTABLE} ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
+ COMMAND ${OPENMP_LLVM_LIT_EXECUTABLE} ${LIT_ARGS} ${ARG_UNPARSED_ARGUMENTS}
COMMENT ${comment}
DEPENDS ${ARG_DEPENDS}
USES_TERMINAL

View File

@ -1,14 +1,14 @@
{ lib, stdenv, fetchFromGitHub, meson, ninja, python3Packages }:
stdenv.mkDerivation rec {
version = "unstable-2019-10-09";
pname = "boxfort";
version = "0.1.4";
src = fetchFromGitHub {
owner = "Snaipe";
repo = "BoxFort";
rev = "356f047db08b7344ea7980576b705e65b9fc8772";
sha256 = "1p0llz7n0p5gzpvqszmra9p88vnr0j88sp5ixhgbfz89bswg62ss";
rev = "v${version}";
sha256 = "jmtWTOkOlqVZ7tFya3IrQjr714Y8TzAVY5Cq+RzDuRs=";
};
nativeBuildInputs = [ meson ninja ];
@ -29,7 +29,5 @@ stdenv.mkDerivation rec {
license = licenses.mit;
maintainers = with maintainers; [ thesola10 Yumasi ];
platforms = platforms.unix;
# Upstream currently broken for macOS https://cirrus-ci.com/build/5624937369042944
broken = stdenv.targetPlatform.isDarwin;
};
}

View File

@ -1,19 +1,20 @@
{ lib, stdenv, fetchFromGitHub, boxfort, cmake, libcsptr, pkg-config, gettext
, dyncall , nanomsg, python3Packages }:
{ lib, stdenv, fetchFromGitHub, boxfort, meson, libcsptr, pkg-config, gettext
, cmake, ninja, protobuf, libffi, libgit2, dyncall, nanomsg, nanopbMalloc
, python3Packages }:
stdenv.mkDerivation rec {
version = "2.3.3";
pname = "criterion";
version = "2.4.1";
src = fetchFromGitHub {
owner = "Snaipe";
repo = "Criterion";
rev = "v${version}";
sha256 = "0y1ay8is54k3y82vagdy0jsa3nfkczpvnqfcjm5n9iarayaxaq8p";
sha256 = "KT1XvhT9t07/ubsqzrVUp4iKcpVc1Z+saGF4pm2RsgQ=";
fetchSubmodules = true;
};
nativeBuildInputs = [ cmake pkg-config ];
nativeBuildInputs = [ meson ninja cmake pkg-config protobuf ];
buildInputs = [
boxfort.dev
@ -21,13 +22,19 @@ stdenv.mkDerivation rec {
gettext
libcsptr
nanomsg
nanopbMalloc
libgit2
libffi
];
checkInputs = with python3Packages; [ cram ];
cmakeFlags = [ "-DCTESTS=ON" ];
doCheck = true;
checkTarget = "criterion_tests test";
checkTarget = "test";
postPatch = ''
patchShebangs ci/isdir.py src/protocol/gen-pb.py
'';
outputs = [ "dev" "out" ];

View File

@ -6,6 +6,7 @@
, python3
, stdenv
, buildPackages
, mallocBuild ? false
}:
stdenv.mkDerivation rec {
@ -27,7 +28,7 @@ stdenv.mkDerivation rec {
"-DBUILD_SHARED_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.so{.0,}
"-DBUILD_STATIC_LIBS=ON" # generate $out/lib/libprotobuf-nanopb.a
"-Dnanopb_PROTOC_PATH=${buildPackages.protobuf}/bin/protoc"
];
] ++ lib.optional mallocBuild "-DCMAKE_C_FLAGS=-DPB_ENABLE_MALLOC 1";
postInstall = ''
mkdir -p $out/share/nanopb/generator/proto

View File

@ -7,7 +7,7 @@
buildPythonPackage rec {
pname = "arc4";
version = "0.2.0";
version = "0.3.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -16,7 +16,7 @@ buildPythonPackage rec {
owner = "manicmaniac";
repo = pname;
rev = version;
hash = "sha256-1VgPYLyBQkxyuUO7KZv5sqYIEieV1RkBtlLVkLUUO4w=";
hash = "sha256-z8zj46/xX/gXtWzlmnHuAsnK3xYCL4NM5/xpYcH+Qlo=";
};
checkInputs = [

View File

@ -20,7 +20,7 @@
buildPythonPackage rec {
pname = "datasets";
version = "2.3.2";
version = "2.4.0";
format = "setuptools";
disabled = pythonOlder "3.7";
@ -29,7 +29,7 @@ buildPythonPackage rec {
owner = "huggingface";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-VBYCDEOK5KyYuvlybr37LgOchlEUAl/aqiC+J6WQbSA=";
hash = "sha256-1XdOcZjqtpQV5RgkCBwg+Ql5lUzUspgveoV8P/PBmII=";
};
postPatch = ''

View File

@ -0,0 +1,46 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, aiofiles
, aiohttp
, click-log
, emoji
, glom
, jinja2
, pyyaml
}:
buildPythonPackage rec {
pname = "dinghy";
version = "0.13.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "nedbat";
repo = pname;
rev = version;
sha256 = "sha256-uRiWcrs3xIb6zxNg0d6/+NCqnEgadHSTLpS53CoZ5so=";
};
propagatedBuildInputs = [
aiofiles
aiohttp
click-log
emoji
glom
jinja2
pyyaml
];
checkInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "dinghy.cli" ];
meta = with lib; {
description = "A GitHub activity digest tool";
homepage = "https://github.com/nedbat/dinghy";
license = licenses.asl20;
maintainers = with maintainers; [ trundle veehaitch ];
};
}

View File

@ -13,7 +13,7 @@
buildPythonPackage rec {
pname = "duckdb-engine";
version = "0.2.0";
version = "0.5.0";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -22,19 +22,31 @@ buildPythonPackage rec {
repo = "duckdb_engine";
owner = "Mause";
rev = "refs/tags/v${version}";
hash = "sha256-UoTGFsno92iejBGvCsJ/jnhKJ41K9eTGwC7DomAp7IE=";
hash = "sha256-6bR2pt7gUHZu4I7VmJgVsFT9u3/e4c9RAKHHlbX/Tyk=";
};
nativeBuildInputs = [ poetry-core ];
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [ duckdb sqlalchemy ];
propagatedBuildInputs = [
duckdb
sqlalchemy
];
checkInputs = [ pytestCheckHook hypothesis ipython-sql typing-extensions ];
checkInputs = [
pytestCheckHook
hypothesis
ipython-sql
typing-extensions
];
pythonImportsCheck = [ "duckdb_engine" ];
pythonImportsCheck = [
"duckdb_engine"
];
meta = with lib; {
description = "Very very very basic sqlalchemy driver for duckdb";
description = "SQLAlchemy driver for duckdb";
homepage = "https://github.com/Mause/duckdb_engine";
license = licenses.mit;
maintainers = with maintainers; [ cpcloud ];

View File

@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "envisage";
version = "6.0.1";
version = "6.1.0";
format = "setuptools";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
sha256 = "8864c29aa344f7ac26eeb94788798f2d0cc791dcf95c632da8d79ebc580e114c";
sha256 = "sha256-AATsUNcYLB4vtyvuooAMDZx8p5fayijb6yJoUKTCW40=";
};
# for the optional dependency ipykernel, only versions < 6 are

View File

@ -6,14 +6,14 @@
buildPythonPackage rec {
pname = "peaqevcore";
version = "5.10.3";
version = "5.10.5";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-Ua3yDPxZEa4F66knhSfu4hxCNVJTUy/4BO/+a8GqOB0=";
hash = "sha256-rW9QWbnG1sURiWNYxYuACqK3kGS7hIjswcwR5cVwwVg=";
};
postPatch = ''

View File

@ -1,7 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, pytest
, pytestCheckHook
, sphinx
}:
@ -14,19 +14,27 @@ buildPythonPackage rec {
sha256 = "82151cbd43ccec94a1530155f4ad34f251aaca6a0ffd5516d7fadf952d32dc1e";
};
checkInputs = [
pytest
];
checkPhase = "py.test";
postPatch = ''
# Fix tests for python-3.10 and add 3.10 to CI matrix
# Should be fixed in versions > 0.3.1
# https://github.com/ashb/sphinx-argparse/pull/3
substituteInPlace sphinxarg/parser.py \
--replace "if action_group.title == 'optional arguments':" "if action_group.title == 'optional arguments' or action_group.title == 'options':"
'';
propagatedBuildInputs = [
sphinx
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [ "sphinxarg" ];
meta = {
description = "A sphinx extension that automatically documents argparse commands and options";
homepage = "https://github.com/ribozz/sphinx-argparse";
homepage = "https://github.com/ashb/sphinx-argparse";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ clacke ];
};

View File

@ -5,25 +5,37 @@
, pyqt5
, qtpy
, typing-extensions
, pytest
, pytestCheckHook
, pygments
}:
buildPythonPackage rec {
pname = "superqt";
version = "0.3.3";
version = "0.3.5";
format = "pyproject";
src = fetchFromGitHub {
owner = "napari";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-Ns3AFUL0BReIwTHfrlfXr/2GLtLvT7hfSjjh+r7btcY=";
sha256 = "sha256-nKNFV/mzdugQ+UJ/qB0SkCSm5vEpvI/tgHYKJr6NEyg=";
};
format = "pyproject";
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ pyqt5 qtpy typing-extensions ];
checkInputs = [ pytestCheckHook pytest ];
propagatedBuildInputs = [
pyqt5
qtpy
typing-extensions
pygments
];
checkInputs = [ pytestCheckHook ];
doCheck = false; # Segfaults...
pythonImportsCheck = [ "superqt" ];
SETUPTOOLS_SCM_PRETEND_VERSION = version;
meta = with lib; {

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "flow";
version = "0.183.1";
version = "0.185.1";
src = fetchFromGitHub {
owner = "facebook";
repo = "flow";
rev = "v${version}";
sha256 = "sha256-RaME+vbmF/hDjwB/ZdvL+/ZgLtWeETMpi/xBlK1EvA0=";
sha256 = "sha256-GZ1DzMlhwIyQtkNYXU6sLoqRNinOXN+A7ImkaNSGuJY=";
};
makeFlags = [ "FLOW_RELEASE=1" ];
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
install -Dm644 resources/shell/bash-completion $out/share/bash-completion/completions/flow
'';
buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml-migrate-parsetree-2 dtoa core_kernel sedlex ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec visitors wtf8 ])
buildInputs = (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml-migrate-parsetree-2 dtoa fileutils core_kernel sedlex ocaml_lwt lwt_log lwt_ppx ppx_deriving ppx_gen_rec visitors wtf8 ])
++ lib.optionals stdenv.isDarwin [ CoreServices ];
meta = with lib; {

View File

@ -81,6 +81,9 @@ stdenv.mkDerivation rec {
mkdir -p "$out/bin"
cp bin/godot.* $out/bin/godot
wrapProgram "$out/bin/godot" \
--set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib
mkdir "$dev"
cp -r modules/gdnative/include $dev
@ -93,9 +96,6 @@ stdenv.mkDerivation rec {
cp icon.png "$out/share/icons/godot.png"
substituteInPlace "$out/share/applications/org.godotengine.Godot.desktop" \
--replace "Exec=godot" "Exec=$out/bin/godot"
makeWrapper $out/bin/godot $out/bin/godot \
--set ALSA_PLUGIN_DIR ${alsa-plugins}/lib/alsa-lib
'';
meta = with lib; {

View File

@ -19,15 +19,15 @@
}:
let
buildNum = "2022-04-20-920";
buildNum = "2022-08-01-115";
in
stdenv.mkDerivation rec {
pname = "rgp";
version = "1.13";
version = "1.13.1";
src = fetchurl {
url = "https://gpuopen.com/download/radeon-developer-tool-suite/RadeonDeveloperToolSuite-${buildNum}.tgz";
hash = "sha256-/Z7mSZVAvaTAY9RU7suK/gA0RJIeeLdN6LWiseVq9Js=";
hash = "sha256-e88vk+ZtDPB/1HrDKXbzkDaMESNE+qIW7ERwrqe+ZN8=";
};
nativeBuildInputs = [ makeWrapper autoPatchelfHook ];
@ -57,7 +57,7 @@ stdenv.mkDerivation rec {
chmod +x $out/opt/rgp/scripts/*
patchShebangs $out/opt/rgp/scripts
for prog in RadeonDeveloperPanel RadeonDeveloperService RadeonDeveloperServiceCLI RadeonGPUAnalyzer RadeonGPUProfiler rga rtda; do
for prog in RadeonDeveloperPanel RadeonDeveloperService RadeonDeveloperServiceCLI RadeonGPUAnalyzer RadeonGPUProfiler RadeonMemoryVisualizer RadeonRaytracingAnalyzer rga rtda; do
# makeWrapper is needed so that executables are started from the opt
# directory, where qt.conf and other tools are
makeWrapper \

View File

@ -8,14 +8,14 @@
rustPlatform.buildRustPackage rec {
pname = "cargo-public-api";
version = "0.13.0";
version = "0.14.0";
src = fetchCrate {
inherit pname version;
sha256 = "sha256-e+HM4pO0bLszlcSklsiRPamr/GUVckuw7uBSgDSK7d0=";
sha256 = "sha256-OFWmrwZdyvIhyKsWEfaU7wHIqeuNhjwZQkwKTccBnTI=";
};
cargoSha256 = "sha256-RKO/YMVWKVtparAfDUtpQ3mbRWataNnjnFUUQozQghs=";
cargoSha256 = "sha256-nubWXEG8XmX2t7WsNvbcDpub5H1x5467cSFRvs8PEpQ=";
nativeBuildInputs = [ pkg-config ];

View File

@ -59,14 +59,6 @@ let
++ optional (lib.versionAtLeast version "4.14") libelf
++ optional (lib.versionAtLeast version "5.13") zstd;
installkernel = buildPackages.writeShellScript "installkernel" ''
set -e
mkdir -p $4
cp -av $2 $4
cp -av $3 $4
'';
drvAttrs = config_: kernelConf: kernelPatches: configfile:
let
config = let attrName = attr: "CONFIG_" + attr; in {
@ -114,10 +106,6 @@ let
++ optional (lib.versionAtLeast version "5.2" && lib.versionOlder version "5.4") ./gen-kheaders-metadata.patch;
prePatch = ''
for mf in $(find -name Makefile -o -name Makefile.include -o -name install.sh); do
echo "stripping FHS paths in \`$mf'..."
sed -i "$mf" -e 's|/usr/bin/||g ; s|/bin/||g ; s|/sbin/||g'
done
sed -i Makefile -e 's|= depmod|= ${buildPackages.kmod}/bin/depmod|'
# Don't include a (random) NT_GNU_BUILD_ID, to make the build more deterministic.
@ -146,6 +134,11 @@ let
fi
patchShebangs scripts
# also patch arch-specific install scripts
for i in $(find arch -name install.sh); do
patchShebangs "$i"
done
'';
configurePhase = ''
@ -185,18 +178,69 @@ let
kernelConf.target
"vmlinux" # for "perf" and things like that
] ++ optional isModular "modules"
++ optional buildDTBs "dtbs"
++ optionals buildDTBs ["dtbs" "DTC_FLAGS=-@"]
++ extraMakeFlags;
installFlags = [
"INSTALLKERNEL=${installkernel}"
"INSTALL_PATH=$(out)"
] ++ (optional isModular "INSTALL_MOD_PATH=$(out)")
++ optional installsFirmware "INSTALL_FW_PATH=$(out)/lib/firmware"
++ optionals buildDTBs ["dtbs_install" "INSTALL_DTBS_PATH=$(out)/dtbs"];
preInstall = ''
preInstall = let
# All we really need to do here is copy the final image and System.map to $out,
# and use the kernel's modules_install, firmware_install, dtbs_install, etc. targets
# for the rest. Easy, right?
#
# Unfortunately for us, the obvious way of getting the built image path,
# make -s image_name, does not work correctly, because some architectures
# (*cough* aarch64 *cough*) change KBUILD_IMAGE on the fly in their install targets,
# so we end up attempting to install the thing we didn't actually build.
#
# Thankfully, there's a way out that doesn't involve just hardcoding everything.
#
# The kernel has an install target, which runs a pretty simple shell script
# (located at scripts/install.sh or arch/$arch/boot/install.sh, depending on
# which kernel version you're looking at) that tries to do something sensible.
#
# (it would be great to hijack this script immediately, as it has all the
# information we need passed to it and we don't need it to try and be smart,
# but unfortunately, the exact location of the scripts differs between kernel
# versions, and they're seemingly not considered to be public API at all)
#
# One of the ways it tries to discover what "something sensible" actually is
# is by delegating to what's supposed to be a user-provided install script
# located at ~/bin/installkernel.
#
# (the other options are:
# - a distribution-specific script at /sbin/installkernel,
# which we can't really create in the sandbox easily
# - an architecture-specific script at arch/$arch/boot/install.sh,
# which attempts to guess _something_ and usually guesses very wrong)
#
# More specifically, the install script exec's into ~/bin/installkernel, if one
# exists, with the following arguments:
#
# $1: $KERNELRELEASE - full kernel version string
# $2: $KBUILD_IMAGE - the final image path
# $3: System.map - path to System.map file, seemingly hardcoded everywhere
# $4: $INSTALL_PATH - path to the destination directory as specified in installFlags
#
# $2 is exactly what we want, so hijack the script and use the knowledge given to it
# by the makefile overlords for our own nefarious ends.
#
# Note that the makefiles specifically look in ~/bin/installkernel, and
# writeShellScriptBin writes the script to <store path>/bin/installkernel,
# so HOME needs to be set to just the store path.
#
# FIXME: figure out a less roundabout way of doing this.
installkernel = buildPackages.writeShellScriptBin "installkernel" ''
cp -av $2 $4
cp -av $3 $4
'';
in ''
installFlagsArray+=("-j$NIX_BUILD_CORES")
export HOME=${installkernel}
'';
# Some image types need special install targets (e.g. uImage is installed with make uinstall)

View File

@ -1,24 +1,40 @@
{ lib, stdenv, fetchFromGitHub, cmake, gtest, c-ares, curl, libev }:
let
# https-dns-proxy supports HTTP3 if curl has support, but as of 2022-08 curl doesn't work with that enabled
# curl' = (curl.override { http3Support = true; });
curl' = curl;
in
stdenv.mkDerivation rec {
pname = "https-dns-proxy";
# there are no stable releases (yet?)
version = "unstable-2021-03-29";
version = "unstable-2022-05-05";
src = fetchFromGitHub {
owner = "aarond10";
repo = "https_dns_proxy";
rev = "bbd9ef272dcda3ead515871f594768af13192af7";
sha256 = "sha256-r+IpDklI3vITK8ZlZvIFm3JdDe2r8DK2ND3n1a/ThrM=";
rev = "d310a378795790350703673388821558163944de";
hash = "sha256-On4SKUeltPhzM/x+K9aKciKBw5lmVySxnmLi2tnKr3Y=";
};
postPatch = ''
substituteInPlace https_dns_proxy.service.in \
--replace "\''${CMAKE_INSTALL_PREFIX}/" ""
substituteInPlace munin/https_dns_proxy.plugin \
--replace '--unit https_dns_proxy.service' '--unit https-dns-proxy.service'
'';
nativeBuildInputs = [ cmake gtest ];
buildInputs = [ c-ares curl libev ];
buildInputs = [ c-ares curl' libev ];
installPhase = ''
install -Dm555 -t $out/bin https_dns_proxy
install -Dm444 -t $out/share/doc/${pname} ../{LICENSE,README}.*
postInstall = ''
install -Dm444 -t $out/share/doc/${pname} ../{LICENSE,*.md}
install -Dm444 -t $out/share/${pname}/munin ../munin/*
# the systemd service definition is garbage, and we use our own with NixOS
mv $out/lib/systemd $out/share/${pname}
rmdir $out/lib
'';
# upstream wants to add tests and the gtest framework is in place, so be ready
@ -30,5 +46,6 @@ stdenv.mkDerivation rec {
license = licenses.mit;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.linux;
mainProgram = "https_dns_proxy";
};
}

View File

@ -29,13 +29,13 @@ let
in
buildDotnetModule rec {
pname = "jellyfin";
version = "10.8.3"; # ensure that jellyfin-web has matching version
version = "10.8.4"; # ensure that jellyfin-web has matching version
src = fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin";
rev = "v${version}";
sha256 = "QVpmHhVR4+UbVz5m92g5VcpcxVz1/9MNll2YN7ZnNHw=";
sha256 = "dzaySywQ43Vdj0GUGjpKaSgsu5Zu0SKyoOCYHAfp/v8=";
};
patches = [

View File

@ -11817,8 +11817,8 @@ let
args = {
name = "jellyfin-web";
packageName = "jellyfin-web";
version = "10.8.3";
src = ../../../../../../../nix/store/d2926w8z62c6p0v09x8mhq0r9g1x354w-source;
version = "10.8.4";
src = ../../../../../../../nix/store/xhax6fynqk44hhwd647im3jd31dbaw4n-source;
dependencies = [
sources."@ampproject/remapping-2.1.2"
(sources."@apideck/better-ajv-errors-0.3.3" // {

View File

@ -14,21 +14,21 @@
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm"; version = "6.0.6"; sha256 = "1fv3xvqc98l3ma4s8f2g4fklifbj1i24fngcvlhfm4j6s295xjj1"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-arm64"; version = "6.0.6"; sha256 = "1z50gqg0jimk98yd0zr2vxn087h3h1qn08fdcqbaxfgpcw30yi87"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.App.Runtime.linux-x64"; version = "6.0.6"; sha256 = "0ndah9cqkgswhi60wrnni10j1d2hdg8jljij83lk1wbfqbng86jm"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.Authorization"; version = "6.0.7"; sha256 = "0ib35ikrdcfq49jgqp595r9k061b8pmizx5cxkggw71j5rpiswp1"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.Metadata"; version = "6.0.7"; sha256 = "132lij9fkpim2vckm20kvwlqv8apjd4hr43mh09amk2pblih872q"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.Authorization"; version = "6.0.8"; sha256 = "0lyqamnvhgmk818sv4n9162vri5ysr3lyfai60zpk3kjlqz34j09"; })
(fetchNuGet { pname = "Microsoft.AspNetCore.Metadata"; version = "6.0.8"; sha256 = "065mdy88ybiavjxfq2nlx5zsrlyyqga1nbhgddag4q4f49jfc45b"; })
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "6.0.0"; sha256 = "15gqy2m14fdlvy1g59207h5kisznm355kbw010gy19vh47z8gpz3"; })
(fetchNuGet { pname = "Microsoft.Build.Tasks.Git"; version = "1.1.1"; sha256 = "1bb5p4zlnfn88skkvymxfsn0jybqncl4356hwnic9jxdq2d4fz1w"; })
(fetchNuGet { pname = "Microsoft.CodeAnalysis.BannedApiAnalyzers"; version = "3.3.3"; sha256 = "1z6x0d8lpcfjr3sxy25493i17vvcg5bsay6c03qan6mnj5aqzw2k"; })
(fetchNuGet { pname = "Microsoft.CSharp"; version = "4.0.1"; sha256 = "0zxc0apx1gcx361jlq8smc9pfdgmyjh6hpka8dypc9w23nlsh6yj"; })
(fetchNuGet { pname = "Microsoft.Data.Sqlite.Core"; version = "6.0.7"; sha256 = "0r5njqyl10dv0akwl5y32ik0rpzs9lwj151j6ayz358pn4x26akk"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore"; version = "6.0.7"; sha256 = "1wcjjn70v8cyy5flga0nlnhg973s6pzb3rpnzv905ix3g70zdp4k"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Abstractions"; version = "6.0.7"; sha256 = "0xhkh9k3xpgjdsizg1wdncwz4rdjvffq3x0sfcarscmg2j5fa4yj"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Analyzers"; version = "6.0.7"; sha256 = "0fdh0w5c51kkpvh1p5f0dn90kikh3zdyc1k4hjvv1z8kr603nd1b"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Design"; version = "6.0.7"; sha256 = "0mdb2gqmb94sw38cpqm972vdhh88n7q81xhq4gq771hp2wspn5ap"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Relational"; version = "6.0.7"; sha256 = "1kx0ac7jgf8nmp5nra4cd6h2xbwvb3zkyzx7cds60y1j9nm7lx1g"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Sqlite"; version = "6.0.7"; sha256 = "1mam4qg6yq6qnlkx3i45gs3nwgd7njfm9r5gjs1p9wm6bm953dad"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Sqlite.Core"; version = "6.0.7"; sha256 = "15l36dgq6rzvgx7i9g9jm3298p9g1pdahwa2dxblmm0gzsp65wpl"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Tools"; version = "6.0.7"; sha256 = "1sp693z0x7crbficpl2s0y06pz0c39mbbj9as8y6bln7bx8khymy"; })
(fetchNuGet { pname = "Microsoft.Data.Sqlite.Core"; version = "6.0.8"; sha256 = "1q3rp78yni4mj8bgr5dg1s99mg0dh3rd2ha4f29vfhvp9gps5khi"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore"; version = "6.0.8"; sha256 = "1lacqr6mj655vdqrg7pna3a00nzkr5z1c2ddz4l0m28lsfyb7390"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Abstractions"; version = "6.0.8"; sha256 = "1nx66ygn3xs14raa51zhb6a1g58vq4r5b7vm1y5gw7995bcgdgha"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Analyzers"; version = "6.0.8"; sha256 = "1f934bynjb7k2bfdmsslbnvg2gdrr7n1789pk4sglj41raaxdlvl"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Design"; version = "6.0.8"; sha256 = "1sb8qkfkghn3bw21rlnb2gpban7gzs293qps7d2qdxs64nnbjcq7"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Relational"; version = "6.0.8"; sha256 = "1qbi5srbgl6y70gq3cdy4qfpw0b5wk447jd353xqgblj0nhpqaxn"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Sqlite"; version = "6.0.8"; sha256 = "19z7w26ksq553x47b0p3qxiib5yz4cfkjdqimb855cly55117jyy"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Sqlite.Core"; version = "6.0.8"; sha256 = "1bnim9p7qv3p2fg0ajkbkbvi8jnbam70hd49shgp0a38y0j6dhd4"; })
(fetchNuGet { pname = "Microsoft.EntityFrameworkCore.Tools"; version = "6.0.8"; sha256 = "1rh69cxchvxnmwkdjm6ffvfivbk3lbg2ahjp7pd1f40dicxf7rvd"; })
(fetchNuGet { pname = "Microsoft.Extensions.ApiDescription.Server"; version = "3.0.0"; sha256 = "13a47xcqyi5gz85swxd4mgp7ndgl4kknrvv3xwmbn71hsh953hsh"; })
(fetchNuGet { pname = "Microsoft.Extensions.Caching.Abstractions"; version = "6.0.0"; sha256 = "0qn30d3pg4rx1x2k525jj4x5g1fxm2v5m0ksz2dmk1gmqalpask8"; })
(fetchNuGet { pname = "Microsoft.Extensions.Caching.Memory"; version = "6.0.1"; sha256 = "0ra0ldbg09r40jzvfqhpb3h42h80nafvka9hg51dja32k3mxn5gk"; })
@ -55,9 +55,9 @@
(fetchNuGet { pname = "Microsoft.Extensions.DependencyInjection.Abstractions"; version = "6.0.0"; sha256 = "1vi67fw7q99gj7jd64gnnfr4d2c0ijpva7g9prps48ja6g91x6a9"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyModel"; version = "3.0.0"; sha256 = "1cm0hycgb33mf1ja9q91wxi3gk13d1p462gdq7gndrya23hw2jm5"; })
(fetchNuGet { pname = "Microsoft.Extensions.DependencyModel"; version = "6.0.0"; sha256 = "08c4fh1n8vsish1vh7h73mva34g0as4ph29s4lvps7kmjb4z64nl"; })
(fetchNuGet { pname = "Microsoft.Extensions.Diagnostics.HealthChecks"; version = "6.0.7"; sha256 = "14jqhm15gg03smjx74vfcqmviw42yb9lqfdy0h8824mls350cb73"; })
(fetchNuGet { pname = "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions"; version = "6.0.7"; sha256 = "1bv9p3yw4icz602pn95hk8640s16ysqgp2c2lj2znrz7iay2jg4m"; })
(fetchNuGet { pname = "Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore"; version = "6.0.7"; sha256 = "1gvgv6r0pp4x8whfgqxvyc876300v91rz0rysy33gjg71imf5557"; })
(fetchNuGet { pname = "Microsoft.Extensions.Diagnostics.HealthChecks"; version = "6.0.8"; sha256 = "18h8bccffwvlcjf6bva7b62lyx887hcj3qmd0zzcyn00lc818i8z"; })
(fetchNuGet { pname = "Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions"; version = "6.0.8"; sha256 = "006sd4b0sh529fka8wwh4hf7n7c4qb3z7rawaqg9j1rwz6i10zvd"; })
(fetchNuGet { pname = "Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore"; version = "6.0.8"; sha256 = "1gjq3nj81vhfhfzfqs2dfm76lqpbhc0j8kl69m9qzigwsvvcvqpp"; })
(fetchNuGet { pname = "Microsoft.Extensions.FileProviders.Abstractions"; version = "3.1.8"; sha256 = "0z173lsfypzjdx1a352svh1pgk7lgq2wpj5q60i1rgcrd3ib8b21"; })
(fetchNuGet { pname = "Microsoft.Extensions.FileProviders.Abstractions"; version = "6.0.0"; sha256 = "1fbqmfapxdz77drcv1ndyj2ybvd2rv4c9i9pgiykcpl4fa6dc65q"; })
(fetchNuGet { pname = "Microsoft.Extensions.FileProviders.Physical"; version = "6.0.0"; sha256 = "1ikc3kf325xig6njbi2aj5kmww4xlaq9lsrpc8v764fsm4x10474"; })
@ -151,7 +151,7 @@
(fetchNuGet { pname = "Serilog.Sinks.File"; version = "5.0.0"; sha256 = "097rngmgcrdfy7jy8j7dq3xaq2qky8ijwg0ws6bfv5lx0f3vvb0q"; })
(fetchNuGet { pname = "Serilog.Sinks.Graylog"; version = "2.3.0"; sha256 = "1mnji4p1n9rsjxlaal84zkypwqcfciws1si863zz4ld2xvv9adri"; })
(fetchNuGet { pname = "SerilogAnalyzer"; version = "0.15.0.0"; sha256 = "0k83cyzl9520q282vp07zb8rs16a56axv7a31l3m5fb1afq2hv9l"; })
(fetchNuGet { pname = "SharpCompress"; version = "0.32.1"; sha256 = "0n7iv6kp7gzgqrxxvwdxklvhia3ngpydc6l2nw7hzw637v4bjfl6"; })
(fetchNuGet { pname = "SharpCompress"; version = "0.32.2"; sha256 = "1p198bl08ia89rf4n6yjpacj3yrz6s574snsfl40l8vlqcdrc1pm"; })
(fetchNuGet { pname = "SkiaSharp"; version = "2.88.1-preview.79"; sha256 = "0yf7kkzzlqi692c9s27g54xm29fh8vs7wxv8zz5z8lvk432hwvhn"; })
(fetchNuGet { pname = "SkiaSharp.NativeAssets.Linux"; version = "2.88.1-preview.79"; sha256 = "08538148f7pmkrfn3lb1167gg8kqw59xlygrsas2x4888h9zlxjh"; })
(fetchNuGet { pname = "SkiaSharp.NativeAssets.macOS"; version = "2.88.1-preview.79"; sha256 = "033d36x2i8xan9qbv7fikc9i7z93n46jfk031ds2yiqh850b2am5"; })
@ -219,7 +219,7 @@
(fetchNuGet { pname = "System.Threading"; version = "4.0.11"; sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls"; })
(fetchNuGet { pname = "System.Threading.Tasks"; version = "4.0.11"; sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5"; })
(fetchNuGet { pname = "System.Threading.Tasks.Dataflow"; version = "6.0.0"; sha256 = "1b4vyjdir9kdkiv2fqqm4f76h0df68k8gcd7jb2b38zgr2vpnk3c"; })
(fetchNuGet { pname = "TagLibSharp"; version = "2.2.0"; sha256 = "0jb0f84p4jd59ha36spyk9q08g6fjap3xywq32rcs2xwzhhqiq0y"; })
(fetchNuGet { pname = "TagLibSharp"; version = "2.3.0"; sha256 = "1z7v9lrkss1f8s42sclsq3az9zjihgmhyxnwhjyf0scgk1amngrw"; })
(fetchNuGet { pname = "TMDbLib"; version = "1.9.2"; sha256 = "10vh8wx9f1rcr7wsqiqvi1gq31y4skai1px079hq08y4rbslllnq"; })
(fetchNuGet { pname = "UTF.Unknown"; version = "2.5.1"; sha256 = "0giks1ww539m4r5kzdyzkq0cvfi5k50va9idjz93rclgljl96gpl"; })
(fetchNuGet { pname = "zlib.net-mutliplatform"; version = "1.0.5"; sha256 = "168z0p5aywajxpwhnrns0j2ddza9n0k2dcnm5h2cxdbcirphjprg"; })

View File

@ -7,13 +7,13 @@
stdenv.mkDerivation rec {
pname = "jellyfin-web";
version = "10.8.3";
version = "10.8.4";
src = fetchFromGitHub {
owner = "jellyfin";
repo = "jellyfin-web";
rev = "v${version}";
sha256 = "ZQXvF8Tt5xSylIpxQpkOeJR8nWXw806s7uDcSiVDQyA=";
sha256 = "3A2eBwO0Vg0Qgwm0Y04jheu42JpbxL6XtJRkrxSUkGo=";
};
nativeBuildInputs = [

View File

@ -8,11 +8,11 @@
stdenvNoCC.mkDerivation rec {
pname = "komga";
version = "0.157.0";
version = "0.157.1";
src = fetchurl {
url = "https://github.com/gotson/${pname}/releases/download/v${version}/${pname}-${version}.jar";
sha256 = "sha256-PkQL61fKplt6h1jcFCIMER+ZfzowDP466dR1AaDHw5Q=";
sha256 = "sha256-EXwMvUVNi2FuN+/6HI+HOxBpbwELhTSyvRtyGNgzSAQ=";
};
nativeBuildInputs = [

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "postsrsd";
version = "1.11";
version = "1.12";
src = fetchFromGitHub {
owner = "roehling";
repo = "postsrsd";
rev = version;
sha256 = "sha256-M1VtH+AToLh9J4zwIznInfFJzqmKElTvqAgI+qqL+Lw=";
sha256 = "sha256-aSI9TR1wSyMA0SKkbavk+IugRfW4ZEgpzrNiXn0F5ak=";
};
cmakeFlags = [ "-DGENERATE_SRS_SECRET=OFF" "-DINIT_FLAVOR=systemd" ];

View File

@ -2,17 +2,17 @@
buildGoModule rec {
pname = "artifactory_exporter";
version = "1.9.1";
version = "1.9.4";
rev = "v${version}";
src = fetchFromGitHub {
owner = "peimanja";
repo = pname;
rev = rev;
sha256 = "1m68isplrs3zvkg0mans9bgablsif6264x3w475bpnhf68r87v1q";
sha256 = "sha256-vrbuKWoKfDrgJEOYsncwJZ8lyAfanbV8jKQDVCZY2Sg=";
};
vendorSha256 = "0acwgb0h89parkx75jp057m2hrqyd95vr2zcfqnxbnyy98gxip73";
vendorSha256 = "sha256-wKBSAZSE/lSUbkHkyBEkO0wvkrK6fKxXIjF6G+ILqHM=";
subPackages = [ "." ];

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "fastly-exporter";
version = "7.0.1";
version = "7.2.4";
src = fetchFromGitHub {
owner = "peterbourgon";
repo = pname;
rev = "v${version}";
sha256 = "sha256-KL+UfYuHtfQ9sKad7Q1KqIK4CFzDsIWvgG1YO1ZbUQc=";
sha256 = "sha256-dg2JPVZJSjbBirvKvfQHGi06Fah48RHk5vbHgn5Q59M=";
};
vendorSha256 = "sha256-yE7yvnyDfrrFdBmBBYe2gBU7b4gOWl5kfqkoblE51EQ=";
vendorSha256 = "sha256-wsOgZTeErUQkt+yJ7P0Oi8Ks7WBj/e457lZNs+ZwJgY=";
meta = with lib; {
description = "Prometheus exporter for the Fastly Real-time Analytics API";

View File

@ -0,0 +1,41 @@
{ lib
, buildGoModule
, fetchFromGitHub
}:
buildGoModule rec {
pname = "pocketbase";
version = "0.4.2";
src = fetchFromGitHub {
owner = "pocketbase";
repo = pname;
rev = "v${version}";
sha256 = "sha256-uDseJmuK6SI3e2ICqr8SJ0iKOVCXONueZUJ6J8MKwYE=";
};
vendorSha256 = "sha256-8IiY/gjK8m2ntOXyG84HMiyT4GK3CgDTRG1DB+v0jAs=";
# This is the released subpackage from upstream repo
subPackages = [ "examples/base" ];
CGO_ENABLED = 0;
# Upstream build instructions
ldflags = [
"-s"
"-w"
"-X github.com/pocketbase/pocketbase.Version=${version}"
];
postInstall = ''
mv $out/bin/base $out/bin/pocketbase
'';
meta = with lib; {
description = "Open Source realtime backend in 1 file";
homepage = "https://github.com/pocketbase/pocketbase";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
};
}

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "soft-serve";
version = "0.3.3";
version = "0.4.0";
src = fetchFromGitHub {
owner = "charmbracelet";
repo = "soft-serve";
rev = "v${version}";
sha256 = "sha256-LxtVum/yM+G3lyGSsOv3bICQrQC6kZKIMoAA7AnQ8VY=";
sha256 = "sha256-X9Dym2AV2By7huPI1Ns0UWue3qRZcauroIv/UAePf/U=";
};
vendorSha256 = "sha256-KUB6w03Dw57baRYhRK1wWVWFvjMLx3KOJnS/YLbE7GE=";
vendorSha256 = "sha256-FCTJJ5T2UCtpctd+ubL7ey24xtbdiw7Q2kRBdAVPtCI=";
doCheck = false;

View File

@ -15,13 +15,13 @@
}:
stdenv.mkDerivation rec {
pname = "postgis";
version = "3.2.2";
version = "3.2.3";
outputs = [ "out" "doc" ];
src = fetchurl {
url = "https://download.osgeo.org/postgis/source/postgis-${version}.tar.gz";
sha256 = "sha256-GM89AT9FsaqO1Z14vHB+nhJeJQ2PBhU5aum/4918PXw=";
sha256 = "sha256-G02LXHVuWrpZ77wYM7Iu/k1lYneO7KVvpJf+susTZow=";
};
buildInputs = [ libxml2 postgresql geos proj gdal json_c protobufc ]

View File

@ -17,13 +17,13 @@ let
in
py.pkgs.buildPythonApplication rec {
pname = "netbox";
version = "3.2.8";
version = "3.3.0";
src = fetchFromGitHub {
owner = "netbox-community";
repo = pname;
rev = "refs/tags/v${version}";
sha256 = "sha256-fMTla+WVojoStwguHvsciyr0YNI09AvotuGB2o0hBUQ=";
sha256 = "sha256-tdl3A5l8CDNdVpNMKHg31QJoQSdr1v0COTcX33Sh7nc=";
};
format = "other";

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "kics";
version = "1.5.13";
version = "1.5.14";
src = fetchFromGitHub {
owner = "Checkmarx";
repo = "kics";
rev = "v${version}";
sha256 = "sha256-+trrtcK0zIjgl8SzURbvaabB/RtDKMEYyU8ZttD0hOs=";
sha256 = "sha256-6ZxkKtzav9mq6MTTuf83l3F8aH1EYyX4cV/xKqyv+2Q=";
};
vendorSha256 = "sha256-/hoyT/PJ/nEQFg/1CJTb4lwOQ8ZYZtuHQeQUpPZepvc=";
vendorSha256 = "sha256-G19VVoba15pCJld5hSIWZGr5bYDUcdC82GYWXdx0OMc=";
subPackages = [ "cmd/console" ];

View File

@ -5,13 +5,13 @@
buildGoModule rec {
pname = "mmctl";
version = "7.1.2";
version = "7.2.0";
src = fetchFromGitHub {
owner = "mattermost";
repo = "mmctl";
rev = "v${version}";
sha256 = "sha256-wqX6HVcI8PTE0gFYh03oxWRQ1Tzs/Z9V2cG9qu1MsLA=";
sha256 = "sha256-LPhFWZrQdusJKv0pDHWOv1gQ0EyVpT3nzkPYshh6pRw=";
};
vendorSha256 = null;

View File

@ -7,16 +7,16 @@
buildGoModule rec {
pname = "dnsmonster";
version = "0.9.4";
version = "0.9.5";
src = fetchFromGitHub {
owner = "mosajjal";
repo = pname;
rev = "v${version}";
hash = "sha256-5+ivBnpE4odmm7N1FVJcKw5VlEkPiGOadsFy4Vq6gVo=";
hash = "sha256-csYJ8jdk84Uf0Sti5wGK27NH9FFHzUHFJXV8r4FWO68=";
};
vendorSha256 = "sha256-WCgaf34l+4dq79STBtUp1wX02ldKuTYvB+op/UTAtNQ=";
vendorSha256 = "sha256-+Wpn9VhFDx5NPk7lbp/iP3kdn3bvR+AL5nfivu8944I=";
buildInputs = [
libpcap

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "reaver-wps-t6x";
version = "1.6.5";
version = "1.6.6";
src = fetchFromGitHub {
owner = "t6x";
repo = "reaver-wps-fork-t6x";
rev = "v${version}";
sha256 = "03v5jyb4if74rpg0mcd8700snb120b6w2gnsa3aqdgj5676ic5dn";
sha256 = "sha256-7g4ZRkyu0TIOUw68dSPP4RyIRyeq1GgUMYFVSQB8/1I=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -0,0 +1,33 @@
{ stdenv, lib, fetchFromGitHub, makeWrapper, libuchardet, dos2unix, file }:
stdenv.mkDerivation {
pname = "subedit";
version = "1.2.2";
src = fetchFromGitHub {
owner = "helixarch";
repo = "subedit";
rev = "74e11816d7b4813064a2434a5abc0f78f66c0e53";
sha256 = "sha256-3ywBBCWbwDqNNkxRupNJX6mYKxVFnoCFKav3Hc4E+8A=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ libuchardet dos2unix file ];
installPhase = ''
mkdir -p $out/bin
install -m555 subedit $out/bin/
'';
postFixup = ''
wrapProgram $out/bin/subedit --prefix PATH : "${lib.makeBinPath [ libuchardet dos2unix file ]}"
'';
meta = with lib; {
homepage = "https://github.com/helixarch/subedit";
description = "Command-line subtitle editor written in BASH";
license = licenses.gpl2;
maintainers = with maintainers; [ ppom ];
};
}

View File

@ -9898,6 +9898,8 @@ with pkgs;
podiff = callPackage ../tools/text/podiff { };
pocketbase = callPackage ../servers/pocketbase { };
podman = callPackage ../applications/virtualization/podman/wrapper.nix { };
podman-unwrapped = callPackage ../applications/virtualization/podman { };
@ -11039,6 +11041,8 @@ with pkgs;
subberthehut = callPackage ../tools/misc/subberthehut { };
subedit = callPackage ../tools/text/subedit { };
subgit = callPackage ../applications/version-management/git-and-tools/subgit { };
subsurface = libsForQt514.callPackage ../applications/misc/subsurface { };
@ -20834,6 +20838,7 @@ with pkgs;
flatbuffers = callPackage ../development/libraries/flatbuffers { };
nanopb = callPackage ../development/libraries/nanopb { };
nanopbMalloc = callPackage ../development/libraries/nanopb { mallocBuild = true; };
gnupth = callPackage ../development/libraries/pth { };
pth = if stdenv.hostPlatform.isMusl then npth else gnupth;
@ -31735,6 +31740,8 @@ with pkgs;
inherit (xorg) xcompmgr;
x-create-mouse-void = callPackage ../applications/window-managers/x-create-mouse-void { };
picom = callPackage ../applications/window-managers/picom {};
picom-next = callPackage ../applications/window-managers/picom/picom-next.nix { };

View File

@ -2403,6 +2403,8 @@ in {
dingz = callPackage ../development/python-modules/dingz { };
dinghy = callPackage ../development/python-modules/dinghy { };
diofant = callPackage ../development/python-modules/diofant { };
dipy = callPackage ../development/python-modules/dipy { };