Merge master into haskell-updates

This commit is contained in:
github-actions[bot] 2022-08-21 00:14:51 +00:00 committed by GitHub
commit f6479ba1d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
168 changed files with 1792 additions and 1235 deletions

6
.github/CODEOWNERS vendored
View File

@ -108,9 +108,9 @@
/pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn /pkgs/top-level/haskell-packages.nix @cdepillabout @sternenseemann @maralorn
# Perl # Perl
/pkgs/development/interpreters/perl @stigtsp @zakame /pkgs/development/interpreters/perl @stigtsp @zakame @dasJ
/pkgs/top-level/perl-packages.nix @stigtsp @zakame /pkgs/top-level/perl-packages.nix @stigtsp @zakame @dasJ
/pkgs/development/perl-modules @stigtsp @zakame /pkgs/development/perl-modules @stigtsp @zakame @dasJ
# R # R
/pkgs/applications/science/math/R @jbedo /pkgs/applications/science/math/R @jbedo

View File

@ -13893,6 +13893,12 @@
github = "wamserma"; github = "wamserma";
githubId = 60148; githubId = 60148;
}; };
water-sucks = {
email = "varun@cvte.org";
name = "Varun Narravula";
github = "water-sucks";
githubId = 68445574;
};
waynr = { waynr = {
name = "Wayne Warren"; name = "Wayne Warren";
email = "wayne.warren.s@gmail.com"; email = "wayne.warren.s@gmail.com";

View File

@ -125,7 +125,9 @@
</listitem> </listitem>
<listitem> <listitem>
<para> <para>
Cinnamon has been updated to 5.4. Cinnamon has been updated to 5.4. While at it, the cinnamon
module now defaults to blueman as bluetooth manager and
slick-greeter as lightdm greeter to match upstream.
</para> </para>
</listitem> </listitem>
<listitem> <listitem>

View File

@ -50,7 +50,8 @@ In addition to numerous new and upgraded packages, this release has the followin
- PHP now defaults to PHP 8.1, updated from 8.0. - PHP now defaults to PHP 8.1, updated from 8.0.
- Cinnamon has been updated to 5.4. - Cinnamon has been updated to 5.4. While at it, the cinnamon module now defaults to
blueman as bluetooth manager and slick-greeter as lightdm greeter to match upstream.
- `hardware.nvidia` has a new option `open` that can be used to opt in the opensource version of NVIDIA kernel driver. Note that the driver's support for GeForce and Workstation GPUs is still alpha quality, see [NVIDIA Releases Open-Source GPU Kernel Modules](https://developer.nvidia.com/blog/nvidia-releases-open-source-gpu-kernel-modules/) for the official announcement. - `hardware.nvidia` has a new option `open` that can be used to opt in the opensource version of NVIDIA kernel driver. Note that the driver's support for GeForce and Workstation GPUs is still alpha quality, see [NVIDIA Releases Open-Source GPU Kernel Modules](https://developer.nvidia.com/blog/nvidia-releases-open-source-gpu-kernel-modules/) for the official announcement.

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 filterDTBs = src: if isNull cfg.filter
then "${src}/dtbs" then "${src}/dtbs"
else else
@ -83,6 +66,8 @@ let
| xargs -0 cp -v --no-preserve=mode --target-directory $out --parents | xargs -0 cp -v --no-preserve=mode --target-directory $out --parents
''; '';
filteredDTBs = filterDTBs cfg.kernelPackage;
# Compile single Device Tree overlay source # Compile single Device Tree overlay source
# file (.dts) into its compiled variant (.dtbo) # file (.dts) into its compiled variant (.dtbo)
compileDTS = name: f: pkgs.callPackage({ stdenv, dtc }: stdenv.mkDerivation { compileDTS = name: f: pkgs.callPackage({ stdenv, dtc }: stdenv.mkDerivation {
@ -197,7 +182,7 @@ in
}; };
hardware.deviceTree.package = if (cfg.overlays != []) hardware.deviceTree.package = if (cfg.overlays != [])
then pkgs.deviceTree.applyOverlays (filterDTBs dtbsWithSymbols) (withDTBOs cfg.overlays) then pkgs.deviceTree.applyOverlays filteredDTBs (withDTBOs cfg.overlays)
else (filterDTBs cfg.kernelPackage); else filteredDTBs;
}; };
} }

View File

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

View File

@ -58,13 +58,18 @@ in
}; };
config = mkMerge [ config = mkMerge [
(mkIf (cfg.enable && config.services.xserver.displayManager.lightdm.enable && config.services.xserver.displayManager.lightdm.greeters.gtk.enable) {
services.xserver.displayManager.lightdm.greeters.gtk.extraConfig = mkDefault (builtins.readFile "${pkgs.cinnamon.mint-artwork}/etc/lightdm/lightdm-gtk-greeter.conf.d/99_linuxmint.conf");
})
(mkIf cfg.enable { (mkIf cfg.enable {
services.xserver.displayManager.sessionPackages = [ pkgs.cinnamon.cinnamon-common ]; services.xserver.displayManager.sessionPackages = [ pkgs.cinnamon.cinnamon-common ];
services.xserver.displayManager.lightdm.greeters.slick = {
enable = mkDefault true;
# Taken from mint-artwork.gschema.override
theme.name = mkDefault "Mint-X";
theme.package = mkDefault pkgs.cinnamon.mint-themes;
iconTheme.name = mkDefault "Mint-X-Dark";
iconTheme.package = mkDefault pkgs.cinnamon.mint-x-icons;
};
services.xserver.displayManager.sessionCommands = '' services.xserver.displayManager.sessionCommands = ''
if test "$XDG_CURRENT_DESKTOP" = "Cinnamon"; then if test "$XDG_CURRENT_DESKTOP" = "Cinnamon"; then
true true

View File

@ -0,0 +1,118 @@
{ config, lib, pkgs, ... }:
with lib;
let
ldmcfg = config.services.xserver.displayManager.lightdm;
cfg = ldmcfg.greeters.slick;
inherit (pkgs) writeText;
theme = cfg.theme.package;
icons = cfg.iconTheme.package;
font = cfg.font.package;
slickGreeterConf = writeText "slick-greeter.conf" ''
[Greeter]
background=${ldmcfg.background}
theme-name=${cfg.theme.name}
icon-theme-name=${cfg.iconTheme.name}
font-name=${cfg.font.name}
draw-user-backgrounds=${boolToString cfg.draw-user-backgrounds}
${cfg.extraConfig}
'';
in
{
options = {
services.xserver.displayManager.lightdm.greeters.slick = {
enable = mkEnableOption "lightdm-slick-greeter as the lightdm greeter";
theme = {
package = mkOption {
type = types.package;
default = pkgs.gnome.gnome-themes-extra;
defaultText = literalExpression "pkgs.gnome.gnome-themes-extra";
description = lib.mdDoc ''
The package path that contains the theme given in the name option.
'';
};
name = mkOption {
type = types.str;
default = "Adwaita";
description = lib.mdDoc ''
Name of the theme to use for the lightdm-slick-greeter.
'';
};
};
iconTheme = {
package = mkOption {
type = types.package;
default = pkgs.gnome.adwaita-icon-theme;
defaultText = literalExpression "pkgs.gnome.adwaita-icon-theme";
description = lib.mdDoc ''
The package path that contains the icon theme given in the name option.
'';
};
name = mkOption {
type = types.str;
default = "Adwaita";
description = lib.mdDoc ''
Name of the icon theme to use for the lightdm-slick-greeter.
'';
};
};
font = {
package = mkOption {
type = types.package;
default = pkgs.ubuntu_font_family;
defaultText = literalExpression "pkgs.ubuntu_font_family";
description = lib.mdDoc ''
The package path that contains the font given in the name option.
'';
};
name = mkOption {
type = types.str;
default = "Ubuntu 11";
description = lib.mdDoc ''
Name of the font to use.
'';
};
};
draw-user-backgrounds = mkEnableOption "draw user backgrounds";
extraConfig = mkOption {
type = types.lines;
default = "";
description = lib.mdDoc ''
Extra configuration that should be put in the lightdm-slick-greeter.conf
configuration file.
'';
};
};
};
config = mkIf (ldmcfg.enable && cfg.enable) {
services.xserver.displayManager.lightdm = {
greeters.gtk.enable = false;
greeter = mkDefault {
package = pkgs.lightdm-slick-greeter.xgreeters;
name = "lightdm-slick-greeter";
};
};
environment.systemPackages = [
icons
theme
];
fonts.fonts = [ font ];
environment.etc."lightdm/slick-greeter.conf".source = slickGreeterConf;
};
}

View File

@ -82,6 +82,7 @@ in
./lightdm-greeters/enso-os.nix ./lightdm-greeters/enso-os.nix
./lightdm-greeters/pantheon.nix ./lightdm-greeters/pantheon.nix
./lightdm-greeters/tiny.nix ./lightdm-greeters/tiny.nix
./lightdm-greeters/slick.nix
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] [ (mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] [
"services" "services"
"xserver" "xserver"

View File

@ -100,12 +100,6 @@ let
fileSystems = filter utils.fsNeededForBoot config.system.build.fileSystems; 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; needMakefs = lib.any (fs: fs.autoFormat) fileSystems;
needGrowfs = lib.any (fs: fs.autoResize) 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"} 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/modules".source = "${modulesClosure}/lib/modules";
"/lib/firmware".source = "${modulesClosure}/lib/firmware"; "/lib/firmware".source = "${modulesClosure}/lib/firmware";

View File

@ -153,6 +153,34 @@ let
specialMount "${mount.device}" "${mount.mountPoint}" "${concatStringsSep "," mount.options}" "${mount.fsType}" specialMount "${mount.device}" "${mount.mountPoint}" "${concatStringsSep "," mount.options}" "${mount.fsType}"
'') mounts); '') 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 in
{ {
@ -278,11 +306,6 @@ in
environment.etc.fstab.text = environment.etc.fstab.text =
let 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 "," ( swapOptions = sw: concatStringsSep "," (
sw.options sw.options
++ optional (sw.priority != null) "pri=${toString sw.priority}" ++ optional (sw.priority != null) "pri=${toString sw.priority}"
@ -297,18 +320,7 @@ in
# <file system> <mount point> <type> <options> <dump> <pass> # <file system> <mount point> <type> <options> <dump> <pass>
# Filesystems. # Filesystems.
${concatMapStrings (fs: ${makeFstabEntries fileSystems {}}
(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}
# Swap devices. # Swap devices.
${flip concatMapStrings config.swapDevices (sw: ${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. # Provide a target that pulls in all filesystems.
systemd.targets.fs = systemd.targets.fs =
{ description = "All File Systems"; { description = "All File Systems";

View File

@ -98,7 +98,6 @@ in
gnome-photos = callInstalledTest ./gnome-photos.nix {}; gnome-photos = callInstalledTest ./gnome-photos.nix {};
graphene = callInstalledTest ./graphene.nix {}; graphene = callInstalledTest ./graphene.nix {};
gsconnect = callInstalledTest ./gsconnect.nix {}; gsconnect = callInstalledTest ./gsconnect.nix {};
json-glib = callInstalledTest ./json-glib.nix {};
ibus = callInstalledTest ./ibus.nix {}; ibus = callInstalledTest ./ibus.nix {};
libgdata = callInstalledTest ./libgdata.nix {}; libgdata = callInstalledTest ./libgdata.nix {};
librsvg = callInstalledTest ./librsvg.nix {}; librsvg = callInstalledTest ./librsvg.nix {};

View File

@ -1,5 +0,0 @@
{ pkgs, makeInstalledTest, ... }:
makeInstalledTest {
tested = pkgs.json-glib;
}

View File

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

View File

@ -7,14 +7,14 @@
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "termusic"; pname = "termusic";
version = "0.7.2"; version = "0.7.3";
src = fetchCrate { src = fetchCrate {
inherit pname version; inherit pname version;
sha256 = "sha256-4o36h/x4+h2H4xpgPfOgIza6zNANyhmSM3Cm1XwWb7w="; sha256 = "sha256-5I9Fu+A5IBfaxaPcYKTzWq3/8ts0BPSOOVeU6D61dbc=";
}; };
cargoHash = "sha256-WHxrMD6W7UyJg8HhjxWlm9KQ5SKsM6fLdvhDzBb16pI="; cargoHash = "sha256-R/hElL0MjeBqboJTQkIREPOh+/YbdKtUAzqPD6BpSPs=";
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];
buildInputs = [ alsa-lib ]; buildInputs = [ alsa-lib ];

View File

@ -0,0 +1,110 @@
{ lib
, stdenv
, fetchFromGitHub
, pkg-config
, python3
, vala
, intltool
, autoreconfHook
, wrapGAppsHook
, lightdm
, gtk3
, pixman
, libcanberra
, libX11
, libXext
, linkFarm
, lightdm-slick-greeter
, numlockx
}:
stdenv.mkDerivation rec {
pname = "lightdm-slick-greeter";
version = "1.5.9";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "slick-greeter";
rev = version;
sha256 = "sha256-UEzidH4ZWggcOWHHuAclHbbgATDBdogL99Ze0PlwRoc=";
};
nativeBuildInputs = [
pkg-config
vala
intltool
autoreconfHook
wrapGAppsHook
python3
python3.pkgs.wrapPython
];
buildInputs = [
lightdm
gtk3
pixman
libcanberra
libX11
libXext
];
pythonPath = [
python3.pkgs.pygobject3 # for slick-greeter-check-hidpi
];
postPatch = ''
substituteInPlace src/slick-greeter.vala \
--replace "/usr/bin/numlockx" "${numlockx}/bin/numlockx" \
--replace "/usr/share/xsessions/" "/run/current-system/sw/share/xsessions/" \
--replace "/usr/bin/slick-greeter" "${placeholder "out"}/bin/slick-greeter"
substituteInPlace src/session-list.vala \
--replace "/usr/share" "${placeholder "out"}/share"
patchShebangs files/usr/bin/*
'';
preAutoreconf = ''
# intltoolize fails during autoreconfPhase unless this
# directory is created manually.
mkdir m4
'';
configureFlags = [
"--localstatedir=/var"
"--sysconfdir=/etc"
"--sbindir=${placeholder "out"}/bin"
];
installFlags = [
"localstatedir=\${TMPDIR}"
"sysconfdir=${placeholder "out"}/etc"
];
postInstall = ''
substituteInPlace "$out/share/xgreeters/slick-greeter.desktop" \
--replace "Exec=slick-greeter" "Exec=$out/bin/slick-greeter"
cp -r files/usr/* $out
'';
preFixup = ''
buildPythonPath "$out $pythonPath"
gappsWrapperArgs+=(
--prefix PYTHONPATH : "$program_PYTHONPATH"
)
'';
passthru.xgreeters = linkFarm "lightdm-slick-greeter-xgreeters" [{
path = "${lightdm-slick-greeter}/share/xgreeters/slick-greeter.desktop";
name = "lightdm-slick-greeter.desktop";
}];
meta = with lib; {
description = "A slick-looking LightDM greeter";
homepage = "https://github.com/linuxmint/slick-greeter";
license = licenses.gpl3Only;
maintainers = with maintainers; [ water-sucks ];
platforms = platforms.linux;
};
}

View File

@ -2,6 +2,7 @@
, lib, fetchFromGitHub, neovimUtils, wrapNeovimUnstable , lib, fetchFromGitHub, neovimUtils, wrapNeovimUnstable
, neovim-unwrapped , neovim-unwrapped
, fetchFromGitLab , fetchFromGitLab
, runCommandLocal
, pkgs , pkgs
}: }:
let 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 { nvimConfNix = makeNeovimConfig {
inherit plugins; inherit plugins;
customRC = '' customRC = ''
@ -47,8 +66,9 @@ let
sha256 = "1ykcvyx82nhdq167kbnpgwkgjib8ii7c92y3427v986n2s5lsskc"; sha256 = "1ykcvyx82nhdq167kbnpgwkgjib8ii7c92y3427v986n2s5lsskc";
}; };
# neovim-drv must be a wrapped neovim
runTest = neovim-drv: buildCommand: runTest = neovim-drv: buildCommand:
pkgs.runCommandLocal "test-${neovim-drv.name}" ({ runCommandLocal "test-${neovim-drv.name}" ({
nativeBuildInputs = [ ]; nativeBuildInputs = [ ];
meta.platforms = neovim-drv.meta.platforms; meta.platforms = neovim-drv.meta.platforms;
}) ('' }) (''
@ -68,6 +88,12 @@ rec {
################## ##################
nvim_with_plugins = wrapNeovim2 "-with-plugins" nvimConfNix; nvim_with_plugins = wrapNeovim2 "-with-plugins" nvimConfNix;
singlelinesconfig = runTest (wrapNeovim2 "-single-lines" nvimConfSingleLines) ''
assertFileContent \
"$vimrcGeneric" \
"${./init-single-lines.vim}"
'';
nvim_via_override = neovim.override { nvim_via_override = neovim.override {
extraName = "-via-override"; extraName = "-via-override";
configure = { configure = {
@ -131,7 +157,7 @@ rec {
nvim_via_override-test = runTest nvim_via_override '' nvim_via_override-test = runTest nvim_via_override ''
assertFileContent \ assertFileContent \
"$vimrcGeneric" \ "$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 # transform all plugins into an attrset
# { optional = bool; plugin = package; dest = filename; } # { optional = bool; plugin = package; }
pluginsNormalized = map (x: if x ? plugin then { dest = "init.vim"; optional = false; } // x else { plugin = x; optional = false;}) plugins; pluginsNormalized = let
defaultPlugin = {
plugin = null;
config = null;
optional = false;
};
in
map (x: defaultPlugin // (if (x ? plugin) then x else { plugin = x; })) plugins;
pluginRC = lib.foldl (acc: p: if p.config != null then acc ++ [p.config] else acc) [] pluginsNormalized;
pluginRC = lib.concatMapStrings (p: p.config or "") pluginsNormalized;
pluginsPartitioned = lib.partition (x: x.optional == true) pluginsNormalized; pluginsPartitioned = lib.partition (x: x.optional == true) pluginsNormalized;
requiredPlugins = vimUtils.requiredPluginsForPackage myVimPackage; requiredPlugins = vimUtils.requiredPluginsForPackage myVimPackage;
@ -116,7 +121,11 @@ let
manifestRc = vimUtils.vimrcContent ({ customRC = ""; }) ; manifestRc = vimUtils.vimrcContent ({ customRC = ""; }) ;
# we call vimrcContent without 'packages' to avoid the init.vim generation # 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 in
builtins.removeAttrs args ["plugins"] // { builtins.removeAttrs args ["plugins"] // {

View File

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

View File

@ -9,13 +9,13 @@ let
else throw "unsupported platform"; else throw "unsupported platform";
in stdenv.mkDerivation rec { in stdenv.mkDerivation rec {
pname = "pixelorama"; pname = "pixelorama";
version = "0.10.1"; version = "0.10.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Orama-Interactive"; owner = "Orama-Interactive";
repo = "Pixelorama"; repo = "Pixelorama";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-+Sfhv66skHawe6jzfzQyFxejN5TvTdmWunzl0/7yy4M="; sha256 = "sha256-IqOBZGo0M8JfREpCv14AvRub6yVTpKfAd5JCNqCVolQ=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

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

View File

@ -11,13 +11,13 @@
stdenvNoCC.mkDerivation rec { stdenvNoCC.mkDerivation rec {
pname = "irpf"; pname = "irpf";
version = "2022-1.6"; version = "2022-1.7";
src = let src = let
year = lib.head (lib.splitVersion version); year = lib.head (lib.splitVersion version);
in fetchzip { in fetchzip {
url = "https://downloadirpf.receita.fazenda.gov.br/irpf/${year}/irpf/arquivos/IRPF${version}.zip"; 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 ]; nativeBuildInputs = [ unzip makeWrapper copyDesktopItems ];

View File

@ -10,14 +10,14 @@
python3Packages.buildPythonPackage rec { python3Packages.buildPythonPackage rec {
pname = "hydrus"; pname = "hydrus";
version = "495"; version = "496";
format = "other"; format = "other";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "hydrusnetwork"; owner = "hydrusnetwork";
repo = "hydrus"; repo = "hydrus";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
sha256 = "sha256-MuSK19oSrRJZebATRpDW1CmUq4NKcpuoPmOuLyvL8A8="; sha256 = "sha256-Ng3ogPxyzn4cKVE/0iz56VWGyABkM2ZF7ktajaJ9Mn8=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -1,9 +1,9 @@
{ buildGoModule, fetchFromGitHub, installShellFiles, lib }: { buildGoModule, fetchFromGitHub, installShellFiles, lib }:
let let
humioCtlVersion = "0.29.1"; humioCtlVersion = "0.29.2";
sha256 = "sha256-89rVUzxUf9lM1KE55m1EQidwc26q/QadY0kgu/afj9I="; sha256 = "sha256-Ba3xy2hbU6Gq/TeLnNxSkJga8CqHNyqSgx2ZrFhThL4=";
vendorSha256 = "sha256-n9gfY6oNxOjU6sGm8Bd8asFlHxm+dzHdVWj4CmfvFpA="; vendorSha256 = "sha256-70QxW2nn6PS6HZWllmQ8O39fbUcbe4c/nKAygLnD4n0=";
in buildGoModule { in buildGoModule {
name = "humioctl-${humioCtlVersion}"; name = "humioctl-${humioCtlVersion}";
pname = "humioctl"; pname = "humioctl";

View File

@ -25,14 +25,14 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rofi-unwrapped"; pname = "rofi-unwrapped";
version = "1.7.4"; version = "1.7.5";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "davatorium"; owner = "davatorium";
repo = "rofi"; repo = "rofi";
rev = version; rev = version;
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "sha256-xAGhwzm+L8/aBJ65zfbnHyZFlg5x0b2s1x1aTC2I5po="; sha256 = "sha256-3XFusKeckagEPfbLtt1xAVTEfn1Qebdi/Iq1AYbHCR4=";
}; };
preConfigure = '' preConfigure = ''

View File

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

View File

@ -17,13 +17,13 @@
python3.pkgs.buildPythonApplication rec { python3.pkgs.buildPythonApplication rec {
pname = "variety"; pname = "variety";
version = "0.8.7"; version = "0.8.9";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "varietywalls"; owner = "varietywalls";
repo = "variety"; repo = "variety";
rev = version; rev = "refs/tags/${version}";
hash = "sha256-OFQiZe8G5v4F8HUJPeEM3ggVWHaALT1txy/aymHZ+jc="; hash = "sha256-Tm8RXn2S/NDUD3JWeCHKqSFkxZPJdNMojPGnU4WEpr0=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -4,13 +4,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "xmrig-proxy"; pname = "xmrig-proxy";
version = "6.15.1"; version = "6.18.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "xmrig"; owner = "xmrig";
repo = "xmrig-proxy"; repo = "xmrig-proxy";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-VbHymVc/swrRaEBqvYlCEVjYeU0ii9oSr+b6q0hlCaQ="; sha256 = "sha256-3Tp0wTL3uHs0N4CdlNusvpuam653b6qUZu9/KBT4HOM=";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -1,37 +1,63 @@
{ lib, stdenv, fetchurl { lib
, stdenv
, fetchhg
, autoreconfHook
, fltk , fltk
, libXcursor
, libXi
, libXinerama
, libjpeg
, libpng
, mbedtls
, openssl , openssl
, libjpeg, libpng
, perl , perl
, libXcursor, libXi, libXinerama }: , pkg-config
, which
}:
stdenv.mkDerivation rec { stdenv.mkDerivation {
version = "3.0.5";
pname = "dillo"; pname = "dillo";
version = "unstable-2021-02-09";
src = fetchurl { src = fetchhg {
url = "https://www.dillo.org/download/${pname}-${version}.tar.bz2"; url = "https://hg.sr.ht/~seirdy/dillo-mirror";
sha256 = "12ql8n1lypv3k5zqgwjxlw1md90ixz3ag6j1gghfnhjq3inf26yv"; rev = "67b70f024568b505633524be61fcfbde5337849f";
sha256 = "sha256-lbn5u9oEL0zt9yBhznBS9Dz9/6kSwRDJeNXKEojty1g=";
}; };
buildInputs = with lib; nativeBuildInputs = [
[ perl fltk openssl libjpeg libpng libXcursor libXi libXinerama ]; autoreconfHook
pkg-config
which
];
buildInputs = [
fltk
libXcursor
libXi
libXinerama
libjpeg
libpng
mbedtls
openssl
perl
];
# Workaround build failure on -fno-common toolchains: # Workaround build failure on -fno-common toolchains:
# ld: main.o:/build/dillo-3.0.5/dpid/dpid.h:64: multiple definition of `sock_set'; # ld: main.o:/build/dillo-3.0.5/dpid/dpid.h:64: multiple definition of `sock_set';
# dpid.o:/build/dillo-3.0.5/dpid/dpid.h:64: first defined here # dpid.o:/build/dillo-3.0.5/dpid/dpid.h:64: first defined here
NIX_CFLAGS_COMPILE = "-fcommon"; NIX_CFLAGS_COMPILE = "-fcommon";
configureFlags = [ "--enable-ssl" ]; configureFlags = [ "--enable-ssl=yes" ];
meta = with lib; { meta = with lib; {
homepage = "https://www.dillo.org/"; homepage = "https://hg.sr.ht/~seirdy/dillo-mirror";
description = "A fast graphical web browser with a small footprint"; description = "A fast graphical web browser with a small footprint";
longDescription = '' longDescription = ''
Dillo is a small, fast web browser, tailored for older machines. Dillo is a small, fast web browser, tailored for older machines.
''; '';
maintainers = [ maintainers.AndersonTorres ]; maintainers = [ maintainers.AndersonTorres ];
platforms = platforms.linux; platforms = platforms.linux;
license = licenses.gpl3; license = licenses.gpl3Plus;
}; };
} }

View File

@ -1,10 +1,11 @@
{ buildPythonApplication { lib
, buildPythonApplication
, attrs , attrs
, click , click
, cloudflare , cloudflare
, fetchFromGitHub , fetchFromGitHub
, lib , fetchpatch
, poetry , poetry-core
, pydantic , pydantic
, pytestCheckHook , pytestCheckHook
, requests , requests
@ -13,6 +14,7 @@
buildPythonApplication rec { buildPythonApplication rec {
pname = "cloudflare-dyndns"; pname = "cloudflare-dyndns";
version = "4.1"; version = "4.1";
format = "pyproject";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "kissgyorgy"; owner = "kissgyorgy";
@ -21,9 +23,9 @@ buildPythonApplication rec {
hash = "sha256-6Q5fpJ+HuQ+hc3xTtB5tR43pn9WZ0nZZR723iLAkpis="; hash = "sha256-6Q5fpJ+HuQ+hc3xTtB5tR43pn9WZ0nZZR723iLAkpis=";
}; };
format = "pyproject"; nativeBuildInputs = [
poetry-core
nativeBuildInputs = [ poetry ]; ];
propagatedBuildInputs = [ propagatedBuildInputs = [
attrs attrs
@ -33,13 +35,25 @@ buildPythonApplication rec {
requests requests
]; ];
checkInputs = [
pytestCheckHook
];
patches = [
# Switch to poetry-core, https://github.com/kissgyorgy/cloudflare-dyndns/pull/22
(fetchpatch {
name = "switch-to-poetry-core.patch";
url = "https://github.com/kissgyorgy/cloudflare-dyndns/commit/741ed1ccb3373071ce15683a3b8ddc78d64866f8.patch";
sha256 = "sha256-mjSah0DWptZB6cjhP6dJg10BpJylPSQ2K4TKda7VmHw=";
})
];
postPatch = '' postPatch = ''
substituteInPlace pyproject.toml \ substituteInPlace pyproject.toml \
--replace 'click = "^7.0"' 'click = "*"' --replace 'click = "^7.0"' 'click = "*"' \
--replace 'attrs = "^21.1.0"' 'attrs = "*"'
''; '';
checkInputs = [ pytestCheckHook ];
disabledTests = [ disabledTests = [
"test_get_ipv4" "test_get_ipv4"
]; ];

View File

@ -2,16 +2,16 @@
buildGoModule rec { buildGoModule rec {
pname = "atlantis"; pname = "atlantis";
version = "0.19.7"; version = "0.19.8";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "runatlantis"; owner = "runatlantis";
repo = "atlantis"; repo = "atlantis";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-wnYLZ/mSNco8lIr6zmVoGGVGnOBWAzXgB+uy5U5Os4A="; sha256 = "sha256-o8lBpiR8gIo1kyOTkPOIuMnJbJsi619Zl0bAAFGYM4E=";
}; };
vendorSha256 = "sha256-nNZLL8S32vGfQkDD+vI4ovUvZZgGzgQmb8BAGBb+R4k="; vendorSha256 = "sha256-aEMRCvZBaY1uwZqKtMmZ4aiPdNmtANcnuE7eykBiTQg=";
subPackages = [ "." ]; subPackages = [ "." ];

View File

@ -11,13 +11,13 @@
buildGoModule rec { buildGoModule rec {
pname = "werf"; pname = "werf";
version = "1.2.160"; version = "1.2.163";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "werf"; owner = "werf";
repo = "werf"; repo = "werf";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-UeZpH6A/N+frShOOVeRCsIXdBKiI0chsxQvsGJF5JwE="; sha256 = "sha256-TgXJ5l/vWHIlAEMmPWM50AOMHU9crsmjtxJdmGzPM+w=";
}; };
vendorSha256 = "sha256-XpSAFiweD2oUKleD6ztDp1+3PpfUWXfGaaE/9mzRrUQ="; vendorSha256 = "sha256-XpSAFiweD2oUKleD6ztDp1+3PpfUWXfGaaE/9mzRrUQ=";

View File

@ -73,7 +73,7 @@ let
in in
env.mkDerivation rec { env.mkDerivation rec {
pname = "telegram-desktop"; pname = "telegram-desktop";
version = "4.1.0"; version = "4.1.1";
# Note: Update via pkgs/applications/networking/instant-messengers/telegram/tdesktop/update.py # Note: Update via pkgs/applications/networking/instant-messengers/telegram/tdesktop/update.py
# Telegram-Desktop with submodules # Telegram-Desktop with submodules
@ -82,7 +82,7 @@ env.mkDerivation rec {
repo = "tdesktop"; repo = "tdesktop";
rev = "v${version}"; rev = "v${version}";
fetchSubmodules = true; fetchSubmodules = true;
sha256 = "06va1b5dac7a2av6vc0xin27y1hfnf4xbafy10myv33am8l5222m"; sha256 = "0b8nwimks6hfnb3bqik8d4s9z689hhj4p9ykqgc36pmpr54nyma8";
}; };
postPatch = '' postPatch = ''

View File

@ -1,11 +1,12 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, makeWrapper , wrapGAppsHook
, makeDesktopItem , makeDesktopItem
, copyDesktopItems , copyDesktopItems
, unzip , unzip
, xdg-utils , xdg-utils
, gtk3
, jdk , jdk
, gradle , gradle
, perl , perl
@ -78,11 +79,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ nativeBuildInputs = [
jdk jdk
gradle gradle
makeWrapper wrapGAppsHook
copyDesktopItems copyDesktopItems
unzip unzip
]; ];
buildInputs = [ gtk3 ];
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
@ -118,17 +121,22 @@ stdenv.mkDerivation rec {
tar xf build/distributions/JabRef-${version}.tar -C $out --strip-components=1 tar xf build/distributions/JabRef-${version}.tar -C $out --strip-components=1
unzip $out/lib/javafx-web-18-linux${lib.optionalString stdenv.isAarch64 "-aarch64"}.jar libjfxwebkit.so -d $out/lib/ unzip $out/lib/javafx-web-18-linux${lib.optionalString stdenv.isAarch64 "-aarch64"}.jar libjfxwebkit.so -d $out/lib/
wrapProgram $out/bin/JabRef \
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]} \
--set JAVA_HOME "${jdk}" \
--set JAVA_OPTS "-Djava.library.path=$out/lib/ --patch-module org.jabref=$out/share/java/jabref/resources/main"
# lowercase alias (for convenience and required for browser extensions) # lowercase alias (for convenience and required for browser extensions)
ln -sf $out/bin/JabRef $out/bin/jabref ln -sf $out/bin/JabRef $out/bin/jabref
rm $out/bin/JabRef.bat
runHook postInstall runHook postInstall
''; '';
preFixup = ''
gappsWrapperArgs+=(
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
--set JAVA_HOME "${jdk}"
--set JAVA_OPTS "-Djava.library.path=$out/lib/ --patch-module org.jabref=$out/share/java/jabref/resources/main"
)
'';
meta = with lib; { meta = with lib; {
description = "Open source bibliography reference manager"; description = "Open source bibliography reference manager";
homepage = "https://www.jabref.org"; homepage = "https://www.jabref.org";

View File

@ -3,11 +3,11 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "morgen"; pname = "morgen";
version = "2.5.8"; version = "2.5.9";
src = fetchurl { src = fetchurl {
url = "https://download.todesktop.com/210203cqcj00tw1/morgen-${version}.deb"; url = "https://download.todesktop.com/210203cqcj00tw1/morgen-${version}.deb";
sha256 = "sha256-8WFDhEWrVGah2pyhTuaZYamiqQltC8zY2D411rOFBaE="; sha256 = "sha256-WGBn4ZLERGXNPBRDoxhsOcnRT07wEdCO6+sUq/l7Hok=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

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

View File

@ -18,6 +18,8 @@ stdenvNoCC.mkDerivation rec {
sha256 = "sha256-ZE/uYBKB2popdIdZWA8AvyJiwMzt32u6u/H/AyNcoVo="; sha256 = "sha256-ZE/uYBKB2popdIdZWA8AvyJiwMzt32u6u/H/AyNcoVo=";
}; };
dontFixup = true;
installPhase = '' installPhase = ''
runHook preInstall runHook preInstall
APP_DIR="$out/Applications/iTerm2.app" APP_DIR="$out/Applications/iTerm2.app"

View File

@ -7,11 +7,11 @@
buildPythonApplication rec { buildPythonApplication rec {
pname = "ffmpeg-normalize"; pname = "ffmpeg-normalize";
version = "1.24.0"; version = "1.24.1";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-sQ8Qorf74ypMmpRd9b/wrqg28TZ295t6qkKosxyaG1I="; sha256 = "sha256-HUiz1t5wxUPR2elxE1Q5/BwRnkHgzej2HsrZnFbhHhA=";
}; };
propagatedBuildInputs = [ ffmpeg ffmpeg-progress-yield ]; propagatedBuildInputs = [ ffmpeg ffmpeg-progress-yield ];

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

@ -2,13 +2,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "v2ray-geoip"; pname = "v2ray-geoip";
version = "202208040058"; version = "202208180100";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "v2fly"; owner = "v2fly";
repo = "geoip"; repo = "geoip";
rev = "97174fe0eeb28838b0e5e805687d230df773e661"; rev = "005c33be4dd95339596ddd5ce792e8f97dd168a3";
sha256 = "sha256-hodJ4HQHbv9voSS847pAHd3YSmfkV7fKyJhEUApVN+w="; sha256 = "sha256-KvEmgtbelZOauE2WBTzJkwJkaUVW2x8ezgmTE+Gbwu8=";
}; };
installPhase = '' installPhase = ''

View File

@ -28,7 +28,6 @@ stdenv.mkDerivation rec {
-e s,DMZ-White,Vanilla-DMZ,g \ -e s,DMZ-White,Vanilla-DMZ,g \
-e s,DMZ-Black,Vanilla-DMZ-AA,g \ -e s,DMZ-Black,Vanilla-DMZ-AA,g \
-e s,linuxmint-logo-5,cinnamon-symbolic,g \ -e s,linuxmint-logo-5,cinnamon-symbolic,g \
-e s,^theme-name=Mint-X$,theme-name=Mint-X-Dark,g \
{} + {} +
# fixup broken symlink # fixup broken symlink

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

View File

@ -1,164 +1,69 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ea37850ad60..ac0f2d4f60b4 100644 index c27beec313d7..480f13e73c9f 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.13.4) @@ -78,15 +78,17 @@ if(CLANG_BUILT_STANDALONE)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) if (NOT LLVM_CONFIG_FOUND)
project(Clang) # 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(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(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to") set(LLVM_BINARY_DIR "${LLVM_OBJ_ROOT}" CACHE PATH "Path to LLVM build tree")
set(CMAKE_CXX_STANDARD_REQUIRED YES) set(LLVM_MAIN_SRC_DIR "${MAIN_SRC_DIR}" CACHE PATH "Path to LLVM source tree")
set(CMAKE_CXX_EXTENSIONS NO) set(LLVM_TOOLS_BINARY_DIR "${TOOLS_BINARY_DIR}" CACHE PATH "Path to llvm/bin")
@@ -424,7 +426,7 @@ include_directories(BEFORE @@ -128,7 +130,7 @@ if(CLANG_BUILT_STANDALONE)
set(LLVM_INCLUDE_TESTS ON)
endif()
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) - include_directories("${LLVM_BINARY_DIR}/include" "${LLVM_MAIN_INCLUDE_DIR}")
install(DIRECTORY include/clang include/clang-c + include_directories(${LLVM_INCLUDE_DIRS})
- DESTINATION include link_directories("${LLVM_LIBRARY_DIR}")
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT clang-headers
FILES_MATCHING
PATTERN "*.def"
@@ -433,7 +435,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
- 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
diff --git a/cmake/modules/AddClang.cmake b/cmake/modules/AddClang.cmake 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 --- a/cmake/modules/AddClang.cmake
+++ b/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} install(TARGETS ${lib}
COMPONENT ${lib} COMPONENT ${lib}
${export_to_clangtargets} ${export_to_clangtargets}
- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} - LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
- RUNTIME DESTINATION bin) + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}"
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
if (NOT LLVM_ENABLE_IDE) 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 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 --- a/lib/Headers/CMakeLists.txt
+++ b/lib/Headers/CMakeLists.txt +++ b/lib/Headers/CMakeLists.txt
@@ -234,7 +234,7 @@ set_target_properties(clang-resource-headers PROPERTIES @@ -420,7 +420,7 @@ add_header_target("openmp-resource-headers" ${openmp_wrapper_files})
FOLDER "Misc" add_header_target("windows-resource-headers" ${windows_only_files})
RUNTIME_OUTPUT_DIRECTORY "${output_dir}") add_header_target("utility-resource-headers" ${utility_files})
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) -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) +set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
install( #############################################################
FILES ${files} ${generated_files} # Install rules for the catch-all clang-resource-headers target
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)
diff --git a/tools/libclang/CMakeLists.txt b/tools/libclang/CMakeLists.txt 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 --- a/tools/libclang/CMakeLists.txt
+++ b/tools/libclang/CMakeLists.txt +++ b/tools/libclang/CMakeLists.txt
@@ -186,7 +186,7 @@ endif() @@ -180,7 +180,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
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})
COMPONENT COMPONENT
libclang-python-bindings libclang-python-bindings
DESTINATION DESTINATION
@ -167,69 +72,34 @@ index bf88dca0a34b..7a10181e7738 100644
endforeach() endforeach()
if(NOT LLVM_ENABLE_IDE) if(NOT LLVM_ENABLE_IDE)
add_custom_target(libclang-python-bindings) add_custom_target(libclang-python-bindings)
diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt diff --git a/tools/scan-build-py/CMakeLists.txt b/tools/scan-build-py/CMakeLists.txt
index 74334e53c9b1..ebaae33e4324 100644 index 061dc7ef4dd9..adc54b2edc32 100644
--- a/tools/scan-build/CMakeLists.txt --- a/tools/scan-build-py/CMakeLists.txt
+++ b/tools/scan-build/CMakeLists.txt +++ b/tools/scan-build-py/CMakeLists.txt
@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD) @@ -88,7 +88,7 @@ foreach(lib ${LibScanbuild})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/${lib})
install(PROGRAMS bin/${BinFile} install(PROGRAMS lib/libscanbuild/${lib}
- DESTINATION bin - DESTINATION lib/libscanbuild
+ DESTINATION ${CMAKE_INSTALL_BINDIR} + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild"
COMPONENT scan-build) COMPONENT scan-build-py)
endforeach() endforeach()
@@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD) @@ -106,7 +106,7 @@ foreach(resource ${LibScanbuildResources})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile}) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libscanbuild/resources/${resource})
list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile}) list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libscanbuild/resources/${resource})
install(PROGRAMS libexec/${LibexecFile} install(PROGRAMS lib/libscanbuild/resources/${resource}
- DESTINATION libexec - DESTINATION lib/libscanbuild/resources
+ DESTINATION ${CMAKE_INSTALL_LIBEXECDIR} + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libscanbuild/resources"
COMPONENT scan-build) COMPONENT scan-build-py)
endforeach() endforeach()
@@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD) @@ -122,7 +122,7 @@ foreach(lib ${LibEar})
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile}) DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/lib/libear/${lib})
list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile}) list(APPEND Depends ${CMAKE_BINARY_DIR}/lib/libear/${lib})
install(FILES share/scan-build/${ShareFile} install(PROGRAMS lib/libear/${lib}
- DESTINATION share/scan-build - DESTINATION lib/libear
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build + DESTINATION "${CMAKE_INSTALL_LIBDIR}/libear"
COMPONENT scan-build) COMPONENT scan-build-py)
endforeach() 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 index fe3c0191bb..c6a482bece 100644
--- a/lib/Driver/ToolChains/Gnu.cpp --- a/lib/Driver/ToolChains/Gnu.cpp
+++ b/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, @@ -487,13 +487,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
if (!IsStatic) { } else {
if (Args.hasArg(options::OPT_rdynamic)) if (Args.hasArg(options::OPT_rdynamic))
CmdArgs.push_back("-export-dynamic"); 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("-dynamic-linker");
- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) + - CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
- ToolChain.getDynamicLinker(Args))); - 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 index 3a66dd9c3fb..7efc85d9f9f 100644
--- a/lib/builtins/CMakeLists.txt --- a/lib/builtins/CMakeLists.txt
+++ b/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(i486_SOURCES ${i386_SOURCES})
+ set(i586_SOURCES ${i386_SOURCES}) + set(i586_SOURCES ${i386_SOURCES})
@ -11,7 +11,7 @@ index 3a66dd9c3fb..7efc85d9f9f 100644
if (WIN32) if (WIN32)
set(i386_SOURCES set(i386_SOURCES
${i386_SOURCES} ${i386_SOURCES}
@@ -608,6 +612,7 @@ else () @@ -723,6 +723,7 @@ else ()
endif() endif()
foreach (arch ${BUILTIN_SUPPORTED_ARCH}) foreach (arch ${BUILTIN_SUPPORTED_ARCH})

View File

@ -66,7 +66,6 @@ stdenv.mkDerivation {
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
patches = [ 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 ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
./gnu-install-dirs.patch ./gnu-install-dirs.patch
# ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the # 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 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 --- a/cmake/base-config-ix.cmake
+++ b/cmake/base-config-ix.cmake +++ b/cmake/base-config-ix.cmake
@@ -66,7 +66,7 @@ if (LLVM_TREE_AVAILABLE) @@ -100,13 +100,13 @@ endif()
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()
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(COMPILER_RT_OUTPUT_LIBRARY_DIR set(COMPILER_RT_OUTPUT_LIBRARY_DIR
${COMPILER_RT_OUTPUT_DIR}/lib) ${COMPILER_RT_OUTPUT_DIR}/lib)
@ -40,16 +18,3 @@ index 1ada0ab30ba0..b4be6c4a3c73 100644
set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH set(COMPILER_RT_INSTALL_LIBRARY_DIR "${default_install_path}" CACHE PATH
"Path where built compiler-rt libraries should be installed.") "Path where built compiler-rt libraries should be installed.")
endif() 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 let
release_version = "14.0.0"; release_version = "15.0.0";
candidate = ""; # empty or "rcN" candidate = ""; # empty or "rcN"
dash-candidate = lib.optionalString (candidate != "") "-${candidate}"; dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
rev = "fb1582f6c54422995c6fb61ba4c55126b357f64e"; # When using a Git commit rev = "a5640968f2f7485b2aa4919f5fa68fd8f23e2d1f"; # When using a Git commit
rev-version = "unstable-2022-01-07"; # 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}"; version = if rev != "" then rev-version else "${release_version}${dash-candidate}";
targetConfig = stdenv.targetPlatform.config; targetConfig = stdenv.targetPlatform.config;
@ -30,7 +30,7 @@ let
owner = "llvm"; owner = "llvm";
repo = "llvm-project"; repo = "llvm-project";
rev = if rev != "" then rev else "llvmorg-${version}"; rev = if rev != "" then rev else "llvmorg-${version}";
sha256 = "1pkgdsscvf59i22ix763lp2z3sg0v2z2ywh0n07k3ki7q1qpqbhk"; sha256 = "1sh5xihdfdn2hp7ds3lkaq1bfrl4alj36gl1aidmhlw65p5rdvl7";
}; };
llvm_meta = { llvm_meta = {
@ -158,16 +158,17 @@ let
] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [ ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
targetLlvmLibraries.libunwind targetLlvmLibraries.libunwind
]; ];
extraBuildCommands = '' extraBuildCommands = mkExtraBuildCommands cc;
echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags nixSupport.cc-cflags =
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags [ "-rtlib=compiler-rt"
'' + lib.optionalString (!stdenv.targetPlatform.isWasm) '' "-Wno-unused-command-line-argument"
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags "-B${targetLlvmLibraries.compiler-rt}/lib"
'' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) '' ]
echo "-lunwind" >> $out/nix-support/cc-ldflags ++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
'' + lib.optionalString stdenv.targetPlatform.isWasm '' ++ lib.optional
echo "-fno-exceptions" >> $out/nix-support/cc-cflags (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
'' + mkExtraBuildCommands cc; "-lunwind"
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
}; };
clangNoLibcxx = wrapCCWith rec { clangNoLibcxx = wrapCCWith rec {
@ -177,11 +178,12 @@ let
extraPackages = [ extraPackages = [
targetLlvmLibraries.compiler-rt targetLlvmLibraries.compiler-rt
]; ];
extraBuildCommands = '' extraBuildCommands = mkExtraBuildCommands cc;
echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags nixSupport.cc-cflags = [
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags "-rtlib=compiler-rt"
echo "-nostdlib++" >> $out/nix-support/cc-cflags "-B${targetLlvmLibraries.compiler-rt}/lib"
'' + mkExtraBuildCommands cc; "-nostdlib++"
];
}; };
clangNoLibc = wrapCCWith rec { clangNoLibc = wrapCCWith rec {
@ -191,10 +193,11 @@ let
extraPackages = [ extraPackages = [
targetLlvmLibraries.compiler-rt targetLlvmLibraries.compiler-rt
]; ];
extraBuildCommands = '' extraBuildCommands = mkExtraBuildCommands cc;
echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags nixSupport.cc-cflags = [
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags "-rtlib=compiler-rt"
'' + mkExtraBuildCommands cc; "-B${targetLlvmLibraries.compiler-rt}/lib"
];
}; };
clangNoCompilerRt = wrapCCWith rec { clangNoCompilerRt = wrapCCWith rec {
@ -202,9 +205,8 @@ let
libcxx = null; libcxx = null;
bintools = bintoolsNoLibc'; bintools = bintoolsNoLibc';
extraPackages = [ ]; extraPackages = [ ];
extraBuildCommands = '' extraBuildCommands = mkExtraBuildCommands0 cc;
echo "-nostartfiles" >> $out/nix-support/cc-cflags nixSupport.cc-cflags = [ "-nostartfiles" ];
'' + mkExtraBuildCommands0 cc;
}; };
clangNoCompilerRtWithLibc = wrapCCWith rec { clangNoCompilerRtWithLibc = wrapCCWith rec {

View File

@ -29,18 +29,29 @@ stdenv.mkDerivation rec {
mkdir -p "$out/llvm" mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$out/llvm" cp -r ${monorepoSrc}/llvm/cmake "$out/llvm"
cp -r ${monorepoSrc}/llvm/utils "$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"; outputs = [ "out" ] ++ lib.optional (!headersOnly) "dev";
prePatch = ''
cd ../${basename}
chmod -R u+w .
'';
patches = [ patches = [
./gnu-install-dirs.patch ./gnu-install-dirs.patch
] ++ lib.optionals stdenv.hostPlatform.isMusl [ ] ++ lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch ../../libcxx-0001-musl-hacks.patch
]; ];
postPatch = ''
cd ../runtimes
'';
preConfigure = lib.optionalString stdenv.hostPlatform.isMusl '' preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
patchShebangs utils/cat_files.py patchShebangs utils/cat_files.py
''; '';
@ -50,7 +61,10 @@ stdenv.mkDerivation rec {
buildInputs = lib.optionals (!headersOnly) [ libcxxabi ]; 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.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON" ++ lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
++ lib.optionals stdenv.hostPlatform.isWasm [ ++ lib.optionals stdenv.hostPlatform.isWasm [
@ -62,15 +76,6 @@ stdenv.mkDerivation rec {
buildFlags = lib.optional headersOnly "generate-cxx-headers"; buildFlags = lib.optional headersOnly "generate-cxx-headers";
installTargets = lib.optional headersOnly "install-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 = { passthru = {
isLLVM = true; isLLVM = true;
}; };

View File

@ -1,85 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index b0569a4a54ca..7d665f5a3258 100644 index 74eff2002fc9..c935d10878bb 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -10,6 +10,8 @@ endif() @@ -419,7 +419,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
#===============================================================================
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)
set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) 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_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_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 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.") "Path where built libc++ libraries should be installed.")
- set(LIBCXX_INSTALL_RUNTIME_DIR bin CACHE PATH set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" 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
"Path where target-specific libc++ headers should be installed.") "Path where target-specific libc++ headers should be installed.")
if(LIBCXX_LIBDIR_SUBDIR) @@ -436,7 +436,7 @@ else()
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")
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_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
endif()
set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}") 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 lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${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.") "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 set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}" CACHE PATH
"Path where target-specific libc++ headers should be installed.") "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" cp -r ${monorepoSrc}/libcxx/src/include "$out/libcxx/src"
mkdir -p "$out/llvm" mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$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" ]; outputs = [ "out" "dev" ];
@ -30,14 +32,25 @@ stdenv.mkDerivation rec {
patch -p1 -d llvm -i ${./wasm.patch} patch -p1 -d llvm -i ${./wasm.patch}
''; '';
prePatch = ''
cd ../${pname}
chmod -R u+w .
'';
patches = [ patches = [
./gnu-install-dirs.patch ./gnu-install-dirs.patch
./skip-other-project-tests.patch
]; ];
postPatch = ''
cd ../runtimes
'';
nativeBuildInputs = [ cmake python3 ]; nativeBuildInputs = [ cmake python3 ];
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind; buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
cmakeFlags = [ cmakeFlags = [
"-DLLVM_ENABLE_RUNTIMES=libcxxabi"
"-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1" "-DLIBCXXABI_LIBCXX_INCLUDES=${cxx-headers}/include/c++/v1"
] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [ ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
"-DLLVM_ENABLE_LIBCXX=ON" "-DLLVM_ENABLE_LIBCXX=ON"
@ -49,8 +62,7 @@ stdenv.mkDerivation rec {
"-DLIBCXXABI_ENABLE_SHARED=OFF" "-DLIBCXXABI_ENABLE_SHARED=OFF"
]; ];
installPhase = if stdenv.isDarwin preInstall = lib.optionalString stdenv.isDarwin ''
then ''
for file in lib/*.dylib; do for file in lib/*.dylib; do
# this should be done in CMake, but having trouble figuring out # this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables # the magic combination of necessary CMake variables
@ -58,18 +70,11 @@ stdenv.mkDerivation rec {
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
install_name_tool -id $out/$file $file install_name_tool -id $out/$file $file
done done
make install '';
install -d 755 $out/include
install -m 644 ../include/*.h $out/include postInstall = ''
'' mkdir -p "$dev/include"
else '' install -m 644 ../../${pname}/include/${if stdenv.isDarwin then "*" else "cxxabi.h"} "$dev/include"
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
''; '';
meta = llvm_meta // { meta = llvm_meta // {

View File

@ -1,46 +1,22 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 858f5d5cfd7f..16c67d7062be 100644 index b8326d08d23a..a1e36f713161 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -10,6 +10,8 @@ endif() @@ -187,7 +187,7 @@ set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
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
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR}) set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) 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 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 + 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.") "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) if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR}) string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
@@ -224,16 +226,16 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) @@ -201,7 +201,7 @@ else()
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
- 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_HEADER_DIR ${CMAKE_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX}) 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 lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${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.") "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() 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 { lib, stdenv, llvm_meta, version
, monorepoSrc, runCommand , monorepoSrc, runCommand
, cmake , cmake
, python3
, enableShared ? !stdenv.hostPlatform.isStatic , enableShared ? !stdenv.hostPlatform.isStatic
}: }:
@ -19,19 +20,32 @@ stdenv.mkDerivation rec {
cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx" cp -r ${monorepoSrc}/libcxx/utils "$out/libcxx"
mkdir -p "$out/llvm" mkdir -p "$out/llvm"
cp -r ${monorepoSrc}/llvm/cmake "$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 = [ patches = [
./gnu-install-dirs.patch ./gnu-install-dirs.patch
]; ];
postPatch = ''
cd ../runtimes
'';
outputs = [ "out" "dev" ]; 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 // { meta = llvm_meta // {
# Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst # 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 diff --git a/CMakeLists.txt b/CMakeLists.txt
index e3cc66dd2226..1299b596ce0d 100644 index 5a06805f05f1..86a50329e6a8 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -8,6 +8,8 @@ endif() @@ -117,7 +117,7 @@ set(LIBUNWIND_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH
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
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) 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_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 + 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.") "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) if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR}) @@ -129,7 +129,7 @@ else()
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() else()
- set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX}) set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
endif()
- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH - 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 + set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
"Path where built libunwind libraries should be installed.") "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() 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 = [ patches = [
./gnu-install-dirs.patch ./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 ]; nativeBuildInputs = [ cmake ];
buildInputs = [ libllvm libxml2 ]; 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" "-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 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 --- a/cmake/modules/AddLLD.cmake
+++ b/cmake/modules/AddLLD.cmake +++ b/cmake/modules/AddLLD.cmake
@@ -18,8 +18,8 @@ macro(add_lld_library name) @@ -18,8 +18,8 @@ macro(add_lld_library name)
@ -13,10 +44,3 @@ index dd2898ce6236..ebbea040ff54 100644
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}") RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES) 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 diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
index 3291a7c808e1..b27d27ce6a87 100644 index 3291a7c808e1..b27d27ce6a87 100644
--- a/cmake/modules/AddLLDB.cmake --- a/cmake/modules/AddLLDB.cmake

View File

@ -1,11 +1,17 @@
--- a/source/Plugins/Process/Linux/Procfs.h --- a/source/Plugins/Process/Linux/Procfs.h
+++ b/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. // sys/procfs.h on Android/Linux for all supported architectures.
#include <sys/ptrace.h> #include <sys/ptrace.h>
+#include <asm/ptrace.h> +#include <asm/ptrace.h>
#include "lldb/lldb-types.h"
@@ -17,23 +18,13 @@
#include <vector>
-#ifdef __ANDROID__ -#ifdef __ANDROID__
-#if defined(__arm64__) || defined(__aarch64__) -#if defined(__arm64__) || defined(__aarch64__)
-typedef unsigned long elf_greg_t; -typedef unsigned long elf_greg_t;
@ -29,3 +35,6 @@
#include <sys/procfs.h> #include <sys/procfs.h>
-#endif // __ANDROID__ -#endif // __ANDROID__
+#endif +#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-inlined.ll
rm test/DebugInfo/X86/convert-linked.ll rm test/DebugInfo/X86/convert-linked.ll
rm test/tools/dsymutil/X86/op-convert.test 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") '' '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
# Seems to require certain floating point hardware (NEON?) # Seems to require certain floating point hardware (NEON?)
rm test/ExecutionEngine/frem.ll 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 # Some flags don't need to be repassed because LLVM already does so (like
# CMAKE_BUILD_TYPE), others are irrelevant to the result. # CMAKE_BUILD_TYPE), others are irrelevant to the result.
flagsForLlvmConfig = [ flagsForLlvmConfig = [
"-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/" "-DLLVM_INSTALL_PACKAGE_DIR=${placeholder "dev"}/lib/cmake/llvm"
"-DLLVM_ENABLE_RTTI=ON" "-DLLVM_ENABLE_RTTI=ON"
] ++ optionals enableSharedLibraries [ ] ++ optionals enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON" "-DLLVM_LINK_LLVM_DYLIB=ON"
@ -194,7 +197,7 @@ in stdenv.mkDerivation (rec {
--replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \ --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
--replace "$out/bin/llvm-config" "$dev/bin/llvm-config" --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \ 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) '' + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
@ -209,6 +212,9 @@ in stdenv.mkDerivation (rec {
checkTarget = "check-all"; checkTarget = "check-all";
# For the update script:
passthru.monorepoSrc = monorepoSrc;
requiredSystemFeatures = [ "big-parallel" ]; requiredSystemFeatures = [ "big-parallel" ];
meta = llvm_meta // { meta = llvm_meta // {
homepage = "https://llvm.org/"; homepage = "https://llvm.org/";

View File

@ -1,22 +1,21 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index fec956091cd5..5a766f5c5d7c 100644 index 45399dc0537e..5d946e9e6583 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -303,6 +303,9 @@ set(LLVM_EXAMPLES_INSTALL_DIR "examples" CACHE STRING @@ -942,7 +942,7 @@ if (NOT TENSORFLOW_AOT_PATH STREQUAL "")
"Path for examples subdirectory (enabled by LLVM_BUILD_EXAMPLES=ON) (defaults to 'examples')") add_subdirectory(${TENSORFLOW_AOT_PATH}/xla_aot_runtime_src
mark_as_advanced(LLVM_EXAMPLES_INSTALL_DIR) ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/tf_runtime)
install(TARGETS tf_xla_runtime EXPORT LLVMExports
+set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING - ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+ "Path for CMake subdirectory (defaults to lib/cmake/llvm)" ) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT tf_xla_runtime)
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS tf_xla_runtime)
# They are used as destination of target generators. # Once we add more modules, we should handle this more automatically.
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) if (DEFINED LLVM_OVERRIDE_MODEL_HEADER_INLINERSIZEMODEL)
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake 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 --- a/cmake/modules/AddLLVM.cmake
+++ b/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}) get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
install(TARGETS ${name} install(TARGETS ${name}
${export_to_llvmexports} ${export_to_llvmexports}
@ -27,58 +26,28 @@ index fed1fec7d72e..4baed19b9e98 100644
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name}) RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT ${name})
if (NOT LLVM_ENABLE_IDE) if (NOT LLVM_ENABLE_IDE)
@@ -1056,7 +1056,7 @@ function(process_llvm_pass_plugins) @@ -2007,7 +2007,7 @@ function(llvm_install_library_symlink name dest type)
"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)
set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX}) 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(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
- set(output_dir lib${LLVM_LIBDIR_SUFFIX}) - set(output_dir lib${LLVM_LIBDIR_SUFFIX})
+ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}) + set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
if(WIN32 AND "${type}" STREQUAL "SHARED") if(WIN32 AND "${type}" STREQUAL "SHARED")
set(output_dir bin) set(output_dir "${CMAKE_INSTALL_BINDIR}")
endif() endif()
@@ -1913,7 +1913,7 @@ function(llvm_install_library_symlink name dest type) @@ -2271,15 +2271,15 @@ function(llvm_setup_rpath name)
endfunction() if (APPLE)
set(_install_name_dir INSTALL_NAME_DIR "@rpath")
-function(llvm_install_symlink name dest) - set(_install_rpath "@loader_path/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+function(llvm_install_symlink name dest output_dir) + set(_install_rpath "@loader_path/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN}) elseif(${CMAKE_SYSTEM_NAME} MATCHES "AIX" AND BUILD_SHARED_LIBS)
foreach(path ${CMAKE_MODULE_PATH}) # $ORIGIN is not interpreted at link time by aix ld.
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)
# Since BUILD_SHARED_LIBS is only recommended for use by developers, # Since BUILD_SHARED_LIBS is only recommended for use by developers,
# hardcode the rpath to build/install lib dir first in this mode. # hardcode the rpath to build/install lib dir first in this mode.
# FIXME: update this when there is better solution. # 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}/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) elseif(UNIX)
- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir}) - set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${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}") list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt 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 --- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt +++ b/cmake/modules/CMakeLists.txt
@@ -2,7 +2,7 @@ include(ExtendPath) @@ -128,7 +128,7 @@ set(LLVM_CONFIG_INCLUDE_DIRS
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
) )
list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS) list(REMOVE_DUPLICATES LLVM_CONFIG_INCLUDE_DIRS)
@ -123,24 +83,11 @@ index cea0c1df0a14..eedcd9450312 100644
set(LLVM_CONFIG_LIBRARY_DIRS set(LLVM_CONFIG_LIBRARY_DIRS
"${LLVM_CONFIG_LIBRARY_DIR}" "${LLVM_CONFIG_LIBRARY_DIR}"
# FIXME: Should there be other entries here? # 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 diff --git a/docs/CMake.rst b/docs/CMake.rst
index 044ec8a4d39d..504d0eac3ade 100644 index 879b7b231d4c..9c31d14e8950 100644
--- a/docs/CMake.rst --- a/docs/CMake.rst
+++ b/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 **LLVM_LIBDIR_SUFFIX**:STRING
Extra suffix to append to the directory where libraries are to be 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`` 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 **LLVM_PARALLEL_{COMPILE,LINK}_JOBS**:STRING
Building the llvm toolchain can use a lot of resources, particularly 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. +**CMAKE_INSTALL_LIBDIR**:PATH
+ The path to install libraries, relative to the *CMAKE_INSTALL_PREFIX*.
-* ``<INSTALL_PREFIX>/lib/cmake/llvm/LLVMConfig.cmake`` where + Defaults to "lib".
- ``<INSTALL_PREFIX>`` is the install prefix of an installed version of LLVM. +
- On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``. **CMAKE_INSTALL_INCLUDEDIR**:PATH
+* ``<LLVM_INSTALL_PACKAGE_DIR>LLVMConfig.cmake`` where The path to install header files, relative to the *CMAKE_INSTALL_PREFIX*.
+ ``<LLVM_INSTALL_PACKAGE_DIR>`` is the location where LLVM CMake modules are Defaults to "include".
+ 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}")
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in 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 --- a/tools/llvm-config/BuildVariables.inc.in
+++ b/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_CXXFLAGS "@LLVM_CXXFLAGS@"
#define LLVM_BUILDMODE "@LLVM_BUILDMODE@" #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
#define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@" #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
+#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
+#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@" +#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@" #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_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 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 --- a/tools/llvm-config/llvm-config.cpp
+++ b/tools/llvm-config/llvm-config.cpp +++ b/tools/llvm-config/llvm-config.cpp
@@ -363,12 +363,20 @@ int main(int argc, char **argv) { @@ -369,7 +369,11 @@ int main(int argc, char **argv) {
ActiveIncludeDir = std::string(Path.str());
}
{
- SmallString<256> Path(LLVM_TOOLS_INSTALL_DIR);
+ SmallString<256> Path(LLVM_INSTALL_BINDIR);
sys::fs::make_absolute(ActivePrefix, Path); sys::fs::make_absolute(ActivePrefix, Path);
ActiveBinDir = std::string(Path.str()); ActiveBinDir = std::string(Path.str());
} }
- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX; - ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
- ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
+ { + {
+ SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX); + SmallString<256> Path(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX);
+ sys::fs::make_absolute(ActivePrefix, Path); + sys::fs::make_absolute(ActivePrefix, Path);
+ ActiveLibDir = std::string(Path.str()); + ActiveLibDir = std::string(Path.str());
+ } + }
+ { {
+ SmallString<256> Path(LLVM_INSTALL_CMAKEDIR); SmallString<256> Path(LLVM_INSTALL_PACKAGE_DIR);
+ sys::fs::make_absolute(ActivePrefix, Path); sys::fs::make_absolute(ActivePrefix, Path);
+ ActiveCMakeDir = std::string(Path.str());
+ }
ActiveIncludeOption = "-I" + ActiveIncludeDir;
}

View File

@ -5,6 +5,7 @@
, runCommand , runCommand
, cmake , cmake
, llvm , llvm
, lit
, clang-unwrapped , clang-unwrapped
, perl , perl
, pkg-config , pkg-config
@ -24,17 +25,29 @@ stdenv.mkDerivation rec {
sourceRoot = "${src.name}/${pname}"; sourceRoot = "${src.name}/${pname}";
patches = [ patches = [
./gnu-install-dirs.patch
./fix-find-tool.patch ./fix-find-tool.patch
./gnu-install-dirs.patch
./run-lit-directly.patch
]; ];
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
nativeBuildInputs = [ cmake perl pkg-config clang-unwrapped ]; nativeBuildInputs = [ cmake perl pkg-config lit ];
buildInputs = [ llvm ]; buildInputs = [ llvm ];
# Unsup:Pass:XFail:Fail
# 26:267:16:8
doCheck = false;
checkTarget = "check-openmp";
preCheck = ''
patchShebangs ../tools/archer/tests/deflake.bash
'';
cmakeFlags = [ 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 // { meta = llvm_meta // {

View File

@ -1,54 +1,18 @@
diff --git a/libomptarget/DeviceRTL/CMakeLists.txt b/libomptarget/DeviceRTL/CMakeLists.txt 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 --- a/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/libomptarget/DeviceRTL/CMakeLists.txt +++ b/libomptarget/DeviceRTL/CMakeLists.txt
@@ -25,16 +25,16 @@ endif() @@ -27,10 +27,10 @@ endif()
if (LLVM_DIR) if (LLVM_DIR)
# Builds that use pre-installed LLVM have LLVM_DIR set. # 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} 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} find_program(LINK_TOOL llvm-link PATHS ${LLVM_TOOLS_BINARY_DIR}
- NO_DEFAULT_PATH) - NO_DEFAULT_PATH)
- find_program(OPT_TOOL opt 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) + find_program(OPT_TOOL opt PATHS ${LLVM_TOOLS_BINARY_DIR})
libomptarget_say("Building DeviceRTL. Using clang: ${CLANG_TOOL}") if ((NOT CLANG_TOOL) OR (NOT LINK_TOOL) OR (NOT OPT_TOOL))
elseif (LLVM_TOOL_CLANG_BUILD AND NOT CMAKE_CROSSCOMPILING AND NOT OPENMP_STANDALONE_BUILD) libomptarget_say("Not building DeviceRTL. Missing clang: ${CLANG_TOOL}, llvm-link: ${LINK_TOOL} or opt: ${OPT_TOOL}")
# LLVM in-tree builds may use CMake target names to discover the tools. return()
- 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")

View File

@ -1,17 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f11a05f5622..fb90f8f6a49b 100644 index b6ddbe90516d..311ab1d50e7f 100644
--- a/CMakeLists.txt --- a/CMakeLists.txt
+++ b/CMakeLists.txt +++ b/CMakeLists.txt
@@ -8,6 +8,8 @@ if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_S @@ -29,7 +29,7 @@ if (OPENMP_STANDALONE_BUILD)
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
set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING set(OPENMP_LIBDIR_SUFFIX "" CACHE STRING
"Suffix of lib installation directory, e.g. 64 => lib64") "Suffix of lib installation directory, e.g. 64 => lib64")
# Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR. # Do not use OPENMP_LIBDIR_SUFFIX directly, use OPENMP_INSTALL_LIBDIR.
@ -20,7 +11,7 @@ index 7f11a05f5622..fb90f8f6a49b 100644
# Group test settings. # Group test settings.
set(OPENMP_TEST_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING 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() else()
set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR}) set(OPENMP_ENABLE_WERROR ${LLVM_ENABLE_WERROR})
# If building in tree, we honor the same install suffix LLVM uses. # If building in tree, we honor the same install suffix LLVM uses.
@ -29,61 +20,3 @@ index 7f11a05f5622..fb90f8f6a49b 100644
if (NOT MSVC) if (NOT MSVC)
set(OPENMP_TEST_C_COMPILER ${LLVM_RUNTIME_OUTPUT_INTDIR}/clang) 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,21 +1,21 @@
{ newScope, fetchFromGitHub }: { newScope, fetchFromGitHub }:
let let
callPackage = newScope self; callPackage = newScope self;
version = "6.0.2"; version = "6.1.4";
# pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964 # pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "platformio"; owner = "platformio";
repo = "platformio-core"; repo = "platformio-core";
rev = "v${version}"; rev = "v${version}";
sha256 = "sha256-yfUF9+M45ZSjmB275kTs8+/Q8Q5FMmr63e3Om8dPi2k="; sha256 = "sha256-PLVsXnaflEZdn12lWrpnm8+uNfwB+T7JXnvjQihfuSs=";
}; };
self = { self = {
platformio-chrootenv = callPackage ./chrootenv.nix { inherit version src; }; platformio-chrootenv = callPackage ./chrootenv.nix { inherit version src; };
}; };
in self in
self

View File

@ -1,17 +1,23 @@
diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py diff --git a/platformio/package/manifest/schema.py b/platformio/package/manifest/schema.py
index 416dccfd..896c3649 100644 index 1e5f935a..26d1ac6a 100644
--- a/platformio/package/manifest/schema.py --- a/platformio/package/manifest/schema.py
+++ b/platformio/package/manifest/schema.py +++ b/platformio/package/manifest/schema.py
@@ -253,9 +253,6 @@ class ManifestSchema(BaseSchema): @@ -276,9 +276,12 @@ class ManifestSchema(BaseSchema):
@staticmethod @staticmethod
@memoized(expire="1h") @memoized(expire="1h")
def load_spdx_licenses(): def load_spdx_licenses():
- version = "3.17" - version = "3.18"
- spdx_data_url = ( - spdx_data_url = (
- "https://raw.githubusercontent.com/spdx/license-list-data/" - "https://raw.githubusercontent.com/spdx/license-list-data/"
- "v%s/json/licenses.json" % version - "v%s/json/licenses.json" % version
- ) - )
- return json.loads(fetch_remote_content(spdx_data_url)) - return json.loads(fetch_remote_content(spdx_data_url))
+ # version = "3.18"
+ # spdx_data_url = (
+ # "https://raw.githubusercontent.com/spdx/license-list-data/"
+ # "v%s/json/licenses.json" % version
+ # )
+ # return json.loads(fetch_remote_content(spdx_data_url))
+ with open("@SPDX_LICENSE_LIST_DATA@/json/licenses.json") as f: + with open("@SPDX_LICENSE_LIST_DATA@/json/licenses.json") as f:
+ spdx = json.load(f) + spdx = json.load(f)
+ return spdx + return spdx

View File

@ -1,14 +1,14 @@
{ lib, stdenv, fetchFromGitHub, meson, ninja, python3Packages }: { lib, stdenv, fetchFromGitHub, meson, ninja, python3Packages }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "unstable-2019-10-09";
pname = "boxfort"; pname = "boxfort";
version = "0.1.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Snaipe"; owner = "Snaipe";
repo = "BoxFort"; repo = "BoxFort";
rev = "356f047db08b7344ea7980576b705e65b9fc8772"; rev = "v${version}";
sha256 = "1p0llz7n0p5gzpvqszmra9p88vnr0j88sp5ixhgbfz89bswg62ss"; sha256 = "jmtWTOkOlqVZ7tFya3IrQjr714Y8TzAVY5Cq+RzDuRs=";
}; };
nativeBuildInputs = [ meson ninja ]; nativeBuildInputs = [ meson ninja ];
@ -29,7 +29,5 @@ stdenv.mkDerivation rec {
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ thesola10 Yumasi ]; maintainers = with maintainers; [ thesola10 Yumasi ];
platforms = platforms.unix; 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 { lib, stdenv, fetchFromGitHub, boxfort, meson, libcsptr, pkg-config, gettext
, dyncall , nanomsg, python3Packages }: , cmake, ninja, protobuf, libffi, libgit2, dyncall, nanomsg, nanopbMalloc
, python3Packages }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "2.3.3";
pname = "criterion"; pname = "criterion";
version = "2.4.1";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Snaipe"; owner = "Snaipe";
repo = "Criterion"; repo = "Criterion";
rev = "v${version}"; rev = "v${version}";
sha256 = "0y1ay8is54k3y82vagdy0jsa3nfkczpvnqfcjm5n9iarayaxaq8p"; sha256 = "KT1XvhT9t07/ubsqzrVUp4iKcpVc1Z+saGF4pm2RsgQ=";
fetchSubmodules = true; fetchSubmodules = true;
}; };
nativeBuildInputs = [ cmake pkg-config ]; nativeBuildInputs = [ meson ninja cmake pkg-config protobuf ];
buildInputs = [ buildInputs = [
boxfort.dev boxfort.dev
@ -21,13 +22,19 @@ stdenv.mkDerivation rec {
gettext gettext
libcsptr libcsptr
nanomsg nanomsg
nanopbMalloc
libgit2
libffi
]; ];
checkInputs = with python3Packages; [ cram ]; checkInputs = with python3Packages; [ cram ];
cmakeFlags = [ "-DCTESTS=ON" ];
doCheck = true; doCheck = true;
checkTarget = "criterion_tests test"; checkTarget = "test";
postPatch = ''
patchShebangs ci/isdir.py src/protocol/gen-pb.py
'';
outputs = [ "dev" "out" ]; outputs = [ "dev" "out" ];

View File

@ -12,7 +12,7 @@ in rec {
getdns = stdenv.mkDerivation rec { getdns = stdenv.mkDerivation rec {
pname = "getdns"; pname = "getdns";
version = "1.7.0"; version = "1.7.2";
outputs = [ "out" "dev" "lib" "man" ]; outputs = [ "out" "dev" "lib" "man" ];
src = fetchurl { src = fetchurl {
@ -20,7 +20,9 @@ in rec {
with builtins; with builtins;
concatStringsSep "-" (splitVersion version) concatStringsSep "-" (splitVersion version)
}/${pname}-${version}.tar.gz"; }/${pname}-${version}.tar.gz";
sha256 = "sha256-6ocTzl4HesdrFBjOtq/SXm1OOelgD29egdOjoTpg9lI="; sha256 =
# upstream publishes hashes in hex format
"db89fd2a940000e03ecf48d0232b4532e5f0602e80b592be406fd57ad76fdd17";
}; };
nativeBuildInputs = [ cmake doxygen ]; nativeBuildInputs = [ cmake doxygen ];
@ -49,7 +51,7 @@ in rec {
stubby = stdenv.mkDerivation rec { stubby = stdenv.mkDerivation rec {
pname = "stubby"; pname = "stubby";
version = "0.4.0"; version = "0.4.2";
outputs = [ "out" "man" "stubbyExampleJson" ]; outputs = [ "out" "man" "stubbyExampleJson" ];
inherit (getdns) src; inherit (getdns) src;

View File

@ -4,7 +4,6 @@
, glib , glib
, meson , meson
, ninja , ninja
, nixosTests
, pkg-config , pkg-config
, gettext , gettext
, gobject-introspection , gobject-introspection
@ -18,18 +17,13 @@ stdenv.mkDerivation rec {
pname = "json-glib"; pname = "json-glib";
version = "1.6.6"; version = "1.6.6";
outputs = [ "out" "dev" "devdoc" "installedTests" ]; outputs = [ "out" "dev" "devdoc" ];
src = fetchurl { src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "luyYvnqR9t3jNjZyDj2i/27LuQ52zKpJSX8xpoVaSQ4="; sha256 = "luyYvnqR9t3jNjZyDj2i/27LuQ52zKpJSX8xpoVaSQ4=";
}; };
patches = [
# Add option for changing installation path of installed tests.
./meson-add-installed-tests-prefix-option.patch
];
strictDeps = true; strictDeps = true;
depsBuildBuild = [ depsBuildBuild = [
@ -55,9 +49,6 @@ stdenv.mkDerivation rec {
glib glib
]; ];
mesonFlags = [
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
];
# Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake) # Run-time dependency gi-docgen found: NO (tried pkgconfig and cmake)
# it should be a build-time dep for build # it should be a build-time dep for build
@ -82,10 +73,6 @@ stdenv.mkDerivation rec {
''; '';
passthru = { passthru = {
tests = {
installedTests = nixosTests.installed-tests.json-glib;
};
updateScript = gnome.updateScript { updateScript = gnome.updateScript {
packageName = pname; packageName = pname;
versionPolicy = "odd-unstable"; versionPolicy = "odd-unstable";

View File

@ -1,27 +0,0 @@
diff --git a/json-glib/tests/meson.build b/json-glib/tests/meson.build
index 1eb56c8..dca444e 100644
--- a/json-glib/tests/meson.build
+++ b/json-glib/tests/meson.build
@@ -21,8 +21,9 @@ test_data = [
'stream-load.json',
]
-installed_test_bindir = join_paths(json_libexecdir, 'installed-tests', json_api_name)
-installed_test_datadir = join_paths(json_datadir, 'installed-tests', json_api_name)
+installed_test_prefix = get_option('installed_test_prefix')
+installed_test_bindir = join_paths(installed_test_prefix, 'libexec', 'installed-tests', json_api_name)
+installed_test_datadir = join_paths(installed_test_prefix, 'share', 'installed-tests', json_api_name)
install_data(test_data, install_dir: installed_test_bindir)
diff --git a/meson_options.txt b/meson_options.txt
index 068a03f..03f398a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,3 +10,6 @@ option('man',
option('tests',
type: 'boolean', value: true,
description: 'Build the tests')
+option('installed_test_prefix',
+ description: 'Prefix for installed tests',
+ type: 'string')

View File

@ -17,13 +17,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "libdeltachat"; pname = "libdeltachat";
version = "1.87.0"; version = "1.93.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "deltachat"; owner = "deltachat";
repo = "deltachat-core-rust"; repo = "deltachat-core-rust";
rev = version; rev = version;
hash = "sha256-iRGLNMGs5WawzcqQb5AQTuD4NCJoBUSHfFUXXvm5+jE="; hash = "sha256-nAVZHCp28/ePYtBVSJNmR5728q5lCPGO5VP+6vKbAYo=";
}; };
patches = [ patches = [
@ -33,7 +33,7 @@ stdenv.mkDerivation rec {
cargoDeps = rustPlatform.fetchCargoTarball { cargoDeps = rustPlatform.fetchCargoTarball {
inherit src; inherit src;
name = "${pname}-${version}"; name = "${pname}-${version}";
hash = "sha256-bmtm+cvjBIlZVRq/vjHd5Sl4FXJHP3cPp4+bWY5SKus="; hash = "sha256-m6t/wkCRrILKdR5/NjGlACUuDJydjEKpm178BjPFDbk=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

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

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, boost, fastjet, hepmc, lhapdf, rsync, zlib }: { lib, stdenv, fetchurl, boost, fastjet, fixDarwinDylibNames, hepmc, lhapdf, rsync, zlib }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "pythia"; pname = "pythia";
@ -9,7 +9,8 @@ stdenv.mkDerivation rec {
sha256 = "sha256-5bFNRKpZQzMuMt1d2poY/dGgCFxxmOKNhA4EFn+mAT0="; sha256 = "sha256-5bFNRKpZQzMuMt1d2poY/dGgCFxxmOKNhA4EFn+mAT0=";
}; };
nativeBuildInputs = [ rsync ]; nativeBuildInputs = [ rsync ]
++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
buildInputs = [ boost fastjet hepmc zlib lhapdf ]; buildInputs = [ boost fastjet hepmc zlib lhapdf ];
preConfigure = '' preConfigure = ''

View File

@ -16,23 +16,23 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "adblock"; pname = "adblock";
version = "0.5.2"; version = "0.6.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.7";
# Pypi only has binary releases # Pypi only has binary releases
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "ArniDagur"; owner = "ArniDagur";
repo = "python-adblock"; repo = "python-adblock";
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
sha256 = "sha256-6FH+AVK7+Yg1a6oKbFV80TuGGE4Y7I3mMVzwVHdHYO4="; hash = "sha256-5g5xdUzH/RTVwu4Vfb5Cb1t0ruG0EXgiXjrogD/+JCU=";
}; };
cargoDeps = rustPlatform.fetchCargoTarball { cargoDeps = rustPlatform.fetchCargoTarball {
inherit src; inherit src;
name = "${pname}-${version}"; name = "${pname}-${version}";
hash = "sha256-JI/C+Woi/dJWUGUum8daecjFWiQgxY6BFYZ5MpTcRvU="; hash = "sha256-1xmYmF5P7a5O9MilxDy+CVhmWMGRetdM2fGvTPy7JmM=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -0,0 +1,41 @@
{ lib
, aiohttp
, buildPythonPackage
, fetchFromGitHub
, pycryptodome
, pythonOlder
}:
buildPythonPackage rec {
pname = "aioairq";
version = "0.1.1";
format = "setuptools";
disabled = pythonOlder "3.9";
src = fetchFromGitHub {
owner = "CorantGmbH";
repo = pname;
rev = "v${version}";
hash = "sha256-BvesFiXiVlgfaffWfNcP1K9XUOL2qU8F/sdvRKNcuS4=";
};
propagatedBuildInputs = [
aiohttp
pycryptodome
];
# Module has no tests
doCheck = false;
pythonImportsCheck = [
"aioairq"
];
meta = with lib; {
description = "Library to retrieve data from air-Q devices";
homepage = "https://github.com/CorantGmbH/aioairq";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -16,7 +16,7 @@
}: }:
buildPythonPackage rec { buildPythonPackage rec {
version = "5.3.3"; version = "5.4.2";
pname = "approvaltests"; pname = "approvaltests";
format = "setuptools"; format = "setuptools";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "approvals"; owner = "approvals";
repo = "ApprovalTests.Python"; repo = "ApprovalTests.Python";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
sha256 = "sha256-lFGwwe8L9hXlzaxcd9pxXin5/NPhCpvM4vFRbeQxZ9U="; sha256 = "sha256-ZXtIM3McpfDFCaedlbJ6SU+Er5NyfI8kGnrn7sb1V5M=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

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

View File

@ -0,0 +1,33 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "arnparse";
version = "0.0.2";
format = "setuptools";
src = fetchFromGitHub {
owner = "PokaInc";
repo = "arnparse";
rev = version;
sha256 = "sha256-2+wxzYoS/KJXjYM6lZguxbr2Oxobo0eFNnzWZHLi0WM=";
};
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"arnparse"
];
meta = with lib; {
description = "Parse ARNs using Python";
homepage = "https://github.com/PokaInc/arnparse";
license = licenses.mit;
maintainers = with maintainers; [ wolfangaukang ];
};
}

View File

@ -12,7 +12,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "atlassian-python-api"; pname = "atlassian-python-api";
version = "3.25.0"; version = "3.26.0";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "atlassian-api"; owner = "atlassian-api";
repo = pname; repo = pname;
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
sha256 = "sha256-O0hD8PCmUH38k2a0cnt4Ihb+8/wb9RIL27xc/LONBU0="; sha256 = "sha256-S1+QKSxoBSIebsqhx4OgQAOhNw3P674m/V203ylXB+c=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [

View File

@ -16,13 +16,13 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "basemap"; pname = "basemap";
version = "1.3.3"; version = "1.3.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "matplotlib"; owner = "matplotlib";
repo = "basemap"; repo = "basemap";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
sha256 = "sha256-ObRQ5GsYx3k7fLaaK5Z4Td54rW/Nnx5+2zm8KLCIZl8="; sha256 = "sha256-F/6xPmdXSJAuASyFaKOP+6Jz8U2JRZdqErEH7PFkr/w=";
}; };
sourceRoot = "source/packages/basemap"; sourceRoot = "source/packages/basemap";

View File

@ -11,7 +11,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "bleak-retry-connector"; pname = "bleak-retry-connector";
version = "1.10.1"; version = "1.11.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -20,7 +20,7 @@ buildPythonPackage rec {
owner = "Bluetooth-Devices"; owner = "Bluetooth-Devices";
repo = pname; repo = pname;
rev = "v${version}"; rev = "v${version}";
hash = "sha256-cdPFyuDRdZJZ/HQq9xO3TojnNS34F+2JiwTIcxQWONM="; hash = "sha256-I9nXLzy+OmfaQJBTeBSL/yhhrdNnldd42d5QwRDK9Q4=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

View File

@ -11,13 +11,13 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "blebox-uniapi"; pname = "blebox-uniapi";
version = "2.0.2"; version = "2.1.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "blebox"; owner = "blebox";
repo = "blebox_uniapi"; repo = "blebox_uniapi";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
sha256 = "sha256-0Yiooy7YSUFjqqcyH2fPQ6AWuR0EJxfRRZTw/6JGcMA="; sha256 = "sha256-mJaUB4kEm+eRh3Kc+SiTCSSmCmBEJBVZ5uah95MJX64=";
}; };
postPatch = '' postPatch = ''

View File

@ -6,14 +6,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "cement"; pname = "cement";
version = "3.0.6"; version = "3.0.8";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.5"; disabled = pythonOlder "3.5";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
sha256 = "fccec41eab3f15a03445b1ce24c8a7e106d4d5520f6507a7145698ce68923d31"; sha256 = "sha256-rRGmlGZeKtKEV8VgSU9PjDaiX8WOUA1gip2R4E4dMJM=";
}; };
# Disable test tests since they depend on a memcached server running on # Disable test tests since they depend on a memcached server running on

View File

@ -10,14 +10,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "chart-studio"; pname = "chart-studio";
version = "5.9.0"; version = "5.10.0";
# chart-studio was split from plotly # chart-studio was split from plotly
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "plotly"; owner = "plotly";
repo = "plotly.py"; repo = "plotly.py";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
sha256 = "sha256-o14uP7czY4DDTFDabOk7aTF3mMPmBrPg1/fkoIUlab8="; sha256 = "sha256-j1MiLUSIun0xnUFCcyZ5p8eGF5Q34jCwoVuQG5xSlkU=";
}; };
sourceRoot = "source/packages/python/chart-studio"; sourceRoot = "source/packages/python/chart-studio";

View File

@ -1,13 +1,14 @@
{ lib { lib
, bleak
, bleak-retry-connector
, buildPythonPackage , buildPythonPackage
, fetchFromGitHub , fetchFromGitHub
, bluepy
, pythonOlder , pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "cometblue-lite"; pname = "cometblue-lite";
version = "0.4.1"; version = "0.5.2";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
@ -16,11 +17,12 @@ buildPythonPackage rec {
owner = "neffs"; owner = "neffs";
repo = "python-cometblue_lite"; repo = "python-cometblue_lite";
rev = version; rev = version;
sha256 = "sha256-kK6P8almFQac/bt7we02Q96RIB/s9wAqb+dn09tFx7k="; hash = "sha256-23HspTZ0kN3+geDnqdH6Vj5NfmmbVku2vPTdsy0XvRU=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
bluepy bleak
bleak-retry-connector
]; ];
# Module has no tests # Module has no tests
@ -31,7 +33,7 @@ buildPythonPackage rec {
]; ];
meta = with lib; { meta = with lib; {
description = "Python module for Eurotronic Comet Blue thermostats"; description = "Module for Eurotronic Comet Blue thermostats";
homepage = "https://github.com/neffs/python-cometblue_lite"; homepage = "https://github.com/neffs/python-cometblue_lite";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ fab ]; maintainers = with maintainers; [ fab ];

View File

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

@ -0,0 +1,36 @@
{ buildPythonPackage
, cryptography
, django
, fetchPypi
, lib
, poetry-core
, pythonOlder }:
buildPythonPackage rec {
pname = "django-encrypted-model-fields";
version = "0.6.5";
disabled = pythonOlder "3.6";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-i9IcVWXA1k7E29N1rTT+potNotuHHew/px/nteQiHJk=";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
cryptography
django
];
pythonImportsCheck = [ "encrypted_model_fields" ];
meta = with lib; {
description = "A set of fields that wrap standard Django fields with encryption provided by the python cryptography library";
homepage = "https://gitlab.com/lansharkconsulting/django/django-encrypted-model-fields";
license = licenses.mit;
maintainers = with maintainers; [ centromere ];
};
}

View File

@ -13,7 +13,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "duckdb-engine"; pname = "duckdb-engine";
version = "0.2.0"; version = "0.5.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
@ -22,19 +22,31 @@ buildPythonPackage rec {
repo = "duckdb_engine"; repo = "duckdb_engine";
owner = "Mause"; owner = "Mause";
rev = "refs/tags/v${version}"; 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; { meta = with lib; {
description = "Very very very basic sqlalchemy driver for duckdb"; description = "SQLAlchemy driver for duckdb";
homepage = "https://github.com/Mause/duckdb_engine"; homepage = "https://github.com/Mause/duckdb_engine";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ cpcloud ]; maintainers = with maintainers; [ cpcloud ];

View File

@ -13,13 +13,13 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "enaml"; pname = "enaml";
version = "0.15.1"; version = "0.15.2";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "nucleic"; owner = "nucleic";
repo = pname; repo = pname;
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
sha256 = "sha256-kS15x7fZsHlARh1ILsQpJnwozutuoIysTCCKwkNCa7Y="; sha256 = "sha256-FNp/8Fs+06m4kiczkN5lx5Qly0ALLtSmxD4LkkJiqho=";
}; };
# qt bindings cannot be found during tests # qt bindings cannot be found during tests

View File

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

View File

@ -15,14 +15,14 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "fastavro"; pname = "fastavro";
version = "1.5.3"; version = "1.6.0";
disabled = pythonOlder "3.6"; disabled = pythonOlder "3.6";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = pname; owner = pname;
repo = pname; repo = pname;
rev = "refs/tags/${version}"; rev = "refs/tags/${version}";
sha256 = "sha256-6Zs4Whf/9c829D3tHvrhOzVRjYzqomcT9wzrBCklQmc="; sha256 = "sha256-n9/M/blE+fvknUvlIlTWLqOhxo2Su3lj548enUf1DUg=";
}; };
preBuild = '' preBuild = ''

View File

@ -3,26 +3,36 @@
, fetchFromGitHub , fetchFromGitHub
, click , click
, six , six
, pythonOlder
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "geomet"; pname = "geomet";
version = "0.3.0"; version = "0.3.1";
format = "setuptools";
disabled = pythonOlder "3.8";
# pypi tarball doesn't include tests
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "geomet"; owner = "geomet";
repo = "geomet"; repo = "geomet";
rev = version; rev = "refs/tags/${version}";
sha256 = "1lb0df78gkivsb7hy3ix0xccvcznvskip11hr5sgq5y76qnfc8p0"; hash = "sha256-7QfvGQlg4nTr1rwTyvTNm6n/jFptLtpBKMjjQj6OXCQ=";
}; };
propagatedBuildInputs = [ click six ]; propagatedBuildInputs = [
click
six
];
pythonImportsCheck = [
"geomet"
];
meta = with lib; { meta = with lib; {
description = "Convert GeoJSON to WKT/WKB (Well-Known Text/Binary) and vice versa";
homepage = "https://github.com/geomet/geomet"; homepage = "https://github.com/geomet/geomet";
license = licenses.asl20; license = licenses.asl20;
description = "Convert GeoJSON to WKT/WKB (Well-Known Text/Binary), and vice versa.";
maintainers = with maintainers; [ turion ris ]; maintainers = with maintainers; [ turion ris ];
}; };
} }

View File

@ -11,7 +11,7 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "glances-api"; pname = "glances-api";
version = "0.3.6"; version = "0.4.0";
format = "pyproject"; format = "pyproject";
disabled = pythonOlder "3.8"; disabled = pythonOlder "3.8";
@ -20,7 +20,7 @@ buildPythonPackage rec {
owner = "home-assistant-ecosystem"; owner = "home-assistant-ecosystem";
repo = "python-glances-api"; repo = "python-glances-api";
rev = version; rev = version;
sha256 = "sha256-2H8S08tntCNKwMw553/wuWLXmri7b2tLxFlgCDJWQNQ="; sha256 = "sha256-T7Z+xipTuE7IE9v+ZmiMvP5g8a/MU0ExnaE11DRjvpM=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [

Some files were not shown because too many files have changed in this diff Show More