diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix
index 4bcd621aa0d7..f3ca1bd65145 100644
--- a/maintainers/maintainer-list.nix
+++ b/maintainers/maintainer-list.nix
@@ -1911,6 +1911,12 @@
githubId = 811527;
name = "Christopher Jefferson";
};
+ chrispickard = {
+ email = "chrispickard9@gmail.com";
+ github = "chrispickard";
+ githubId = 1438690;
+ name = "Chris Pickard";
+ };
chrisrosset = {
email = "chris@rosset.org.uk";
github = "chrisrosset";
diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
index e3b94d005526..690cd0bd1bba 100644
--- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
+++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
@@ -799,6 +799,15 @@
this up.
+
+
+ Zfs: latestCompatibleLinuxPackages is now
+ exported on the zfs package. One can use
+ boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
+ to always track the latest compatible kernel with a given
+ version of zfs.
+
+
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md
index e34c3f4e0b9e..898f2d64f154 100644
--- a/nixos/doc/manual/release-notes/rl-2111.section.md
+++ b/nixos/doc/manual/release-notes/rl-2111.section.md
@@ -204,3 +204,5 @@ pt-services.clipcat.enable).
- The [networking.wireless.iwd](options.html#opt-networking.wireless.iwd.enable) module has a new [networking.wireless.iwd.settings](options.html#opt-networking.wireless.iwd.settings) option.
- The [services.syncoid.enable](options.html#opt-services.syncoid.enable) module now properly drops ZFS permissions after usage. Before it delegated permissions to whole pools instead of datasets and didn't clean up after execution. You can manually look this up for your pools by running `zfs allow your-pool-name` and use `zfs unallow syncoid your-pool-name` to clean this up.
+
+- Zfs: `latestCompatibleLinuxPackages` is now exported on the zfs package. One can use `boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;` to always track the latest compatible kernel with a given version of zfs.
diff --git a/nixos/modules/misc/documentation.nix b/nixos/modules/misc/documentation.nix
index c88cc6930614..7e04f0f16a99 100644
--- a/nixos/modules/misc/documentation.nix
+++ b/nixos/modules/misc/documentation.nix
@@ -258,8 +258,7 @@ in
environment.systemPackages = []
++ optional cfg.man.enable manual.manpages
- ++ optionals cfg.doc.enable ([ manual.manualHTML nixos-help ]
- ++ optionals config.services.xserver.enable [ pkgs.nixos-icons ]);
+ ++ optionals cfg.doc.enable [ manual.manualHTML nixos-help ];
services.getty.helpLine = mkIf cfg.doc.enable (
"\nRun 'nixos-help' for the NixOS manual."
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 64b0c83bbae9..a5314fdd83ce 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -536,6 +536,7 @@
./services/misc/mwlib.nix
./services/misc/mx-puppet-discord.nix
./services/misc/n8n.nix
+ ./services/misc/nitter.nix
./services/misc/nix-daemon.nix
./services/misc/nix-gc.nix
./services/misc/nix-optimise.nix
diff --git a/nixos/modules/services/audio/hqplayerd.nix b/nixos/modules/services/audio/hqplayerd.nix
index 3a703c97c0f7..6eeaffce1b15 100644
--- a/nixos/modules/services/audio/hqplayerd.nix
+++ b/nixos/modules/services/audio/hqplayerd.nix
@@ -56,22 +56,6 @@ in
Open TCP port 8088 in the firewall for the server.
'';
};
-
- user = mkOption {
- type = types.str;
- default = "hqplayer";
- description = ''
- User account under which hqplayerd runs.
- '';
- };
-
- group = mkOption {
- type = types.str;
- default = "hqplayer";
- description = ''
- Group account under which hqplayerd runs.
- '';
- };
};
};
@@ -100,65 +84,44 @@ in
systemd = {
tmpfiles.rules = [
- "d ${configDir} 0755 ${cfg.user} ${cfg.group} - -"
- "d ${stateDir} 0755 ${cfg.user} ${cfg.group} - -"
+ "d ${configDir} 0755 hqplayer hqplayer - -"
+ "d ${stateDir} 0755 hqplayer hqplayer - -"
+ "d ${stateDir}/home 0755 hqplayer hqplayer - -"
];
+ packages = [ pkg ];
+
services.hqplayerd = {
- description = "HQPlayer daemon";
wantedBy = [ "multi-user.target" ];
- requires = [ "network-online.target" "sound.target" "systemd-udev-settle.service" ];
- after = [ "network-online.target" "sound.target" "systemd-udev-settle.service" "local-fs.target" "remote-fs.target" "systemd-tmpfiles-setup.service" ];
+ after = [ "systemd-tmpfiles-setup.service" ];
+
+ environment.HOME = "${stateDir}/home";
unitConfig.ConditionPathExists = [ configDir stateDir ];
- preStart =
- let
- blankCfg = pkgs.writeText "hqplayerd.xml" ''
-
-
-
- '';
- in
- ''
- cp -r "${pkg}/var/lib/hqplayer/web" "${stateDir}"
- chmod -R u+wX "${stateDir}/web"
+ preStart = ''
+ cp -r "${pkg}/var/lib/hqplayer/web" "${stateDir}"
+ chmod -R u+wX "${stateDir}/web"
- if [ ! -f "${configDir}/hqplayerd.xml" ]; then
- echo "creating blank config file"
- install -m 0644 "${blankCfg}" "${configDir}/hqplayerd.xml"
- fi
- '' + optionalString (cfg.auth.username != null && cfg.auth.password != null) ''
- ${pkg}/bin/hqplayerd -s ${cfg.auth.username} ${cfg.auth.password}
- '';
-
- serviceConfig = {
- ExecStart = "${pkg}/bin/hqplayerd";
-
- User = cfg.user;
- Group = cfg.group;
-
- Restart = "on-failure";
- RestartSec = 5;
-
- Nice = -10;
- IOSchedulingClass = "realtime";
- LimitMEMLOCK = "1G";
- LimitNICE = -10;
- LimitRTPRIO = 98;
- };
+ if [ ! -f "${configDir}/hqplayerd.xml" ]; then
+ echo "creating initial config file"
+ install -m 0644 "${pkg}/etc/hqplayer/hqplayerd.xml" "${configDir}/hqplayerd.xml"
+ fi
+ '' + optionalString (cfg.auth.username != null && cfg.auth.password != null) ''
+ ${pkg}/bin/hqplayerd -s ${cfg.auth.username} ${cfg.auth.password}
+ '';
};
};
- users.groups = mkIf (cfg.group == "hqplayer") {
+ users.groups = {
hqplayer.gid = config.ids.gids.hqplayer;
};
- users.users = mkIf (cfg.user == "hqplayer") {
+ users.users = {
hqplayer = {
description = "hqplayer daemon user";
extraGroups = [ "audio" ];
- group = cfg.group;
+ group = "hqplayer";
uid = config.ids.uids.hqplayer;
};
};
diff --git a/nixos/modules/services/misc/nitter.nix b/nixos/modules/services/misc/nitter.nix
new file mode 100644
index 000000000000..095a15f21f6a
--- /dev/null
+++ b/nixos/modules/services/misc/nitter.nix
@@ -0,0 +1,326 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.nitter;
+ configFile = pkgs.writeText "nitter.conf" ''
+ ${generators.toINI {
+ # String values need to be quoted
+ mkKeyValue = generators.mkKeyValueDefault {
+ mkValueString = v:
+ if isString v then "\"" + (strings.escape ["\""] (toString v)) + "\""
+ else generators.mkValueStringDefault {} v;
+ } " = ";
+ } (lib.recursiveUpdate {
+ Server = cfg.server;
+ Cache = cfg.cache;
+ Config = cfg.config // { hmacKey = "@hmac@"; };
+ Preferences = cfg.preferences;
+ } cfg.settings)}
+ '';
+ # `hmac` is a secret used for cryptographic signing of video URLs.
+ # Generate it on first launch, then copy configuration and replace
+ # `@hmac@` with this value.
+ # We are not using sed as it would leak the value in the command line.
+ preStart = pkgs.writers.writePython3 "nitter-prestart" {} ''
+ import os
+ import secrets
+
+ state_dir = os.environ.get("STATE_DIRECTORY")
+ if not os.path.isfile(f"{state_dir}/hmac"):
+ # Generate hmac on first launch
+ hmac = secrets.token_hex(32)
+ with open(f"{state_dir}/hmac", "w") as f:
+ f.write(hmac)
+ else:
+ # Load previously generated hmac
+ with open(f"{state_dir}/hmac", "r") as f:
+ hmac = f.read()
+
+ configFile = "${configFile}"
+ with open(configFile, "r") as f_in:
+ with open(f"{state_dir}/nitter.conf", "w") as f_out:
+ f_out.write(f_in.read().replace("@hmac@", hmac))
+ '';
+in
+{
+ options = {
+ services.nitter = {
+ enable = mkEnableOption "If enabled, start Nitter.";
+
+ server = {
+ address = mkOption {
+ type = types.str;
+ default = "0.0.0.0";
+ example = "127.0.0.1";
+ description = "The address to listen on.";
+ };
+
+ port = mkOption {
+ type = types.port;
+ default = 8080;
+ example = 8000;
+ description = "The port to listen on.";
+ };
+
+ https = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Set secure attribute on cookies. Keep it disabled to enable cookies when not using HTTPS.";
+ };
+
+ httpMaxConnections = mkOption {
+ type = types.int;
+ default = 100;
+ description = "Maximum number of HTTP connections.";
+ };
+
+ staticDir = mkOption {
+ type = types.path;
+ default = "${pkgs.nitter}/share/nitter/public";
+ defaultText = "\${pkgs.nitter}/share/nitter/public";
+ description = "Path to the static files directory.";
+ };
+
+ title = mkOption {
+ type = types.str;
+ default = "nitter";
+ description = "Title of the instance.";
+ };
+
+ hostname = mkOption {
+ type = types.str;
+ default = "localhost";
+ example = "nitter.net";
+ description = "Hostname of the instance.";
+ };
+ };
+
+ cache = {
+ listMinutes = mkOption {
+ type = types.int;
+ default = 240;
+ description = "How long to cache list info (not the tweets, so keep it high).";
+ };
+
+ rssMinutes = mkOption {
+ type = types.int;
+ default = 10;
+ description = "How long to cache RSS queries.";
+ };
+
+ redisHost = mkOption {
+ type = types.str;
+ default = "localhost";
+ description = "Redis host.";
+ };
+
+ redisPort = mkOption {
+ type = types.port;
+ default = 6379;
+ description = "Redis port.";
+ };
+
+ redisConnections = mkOption {
+ type = types.int;
+ default = 20;
+ description = "Redis connection pool size.";
+ };
+
+ redisMaxConnections = mkOption {
+ type = types.int;
+ default = 30;
+ description = ''
+ Maximum number of connections to Redis.
+
+ New connections are opened when none are available, but if the
+ pool size goes above this, they are closed when released, do not
+ worry about this unless you receive tons of requests per second.
+ '';
+ };
+ };
+
+ config = {
+ base64Media = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Use base64 encoding for proxied media URLs.";
+ };
+
+ tokenCount = mkOption {
+ type = types.int;
+ default = 10;
+ description = ''
+ Minimum amount of usable tokens.
+
+ Tokens are used to authorize API requests, but they expire after
+ ~1 hour, and have a limit of 187 requests. The limit gets reset
+ every 15 minutes, and the pool is filled up so there is always at
+ least tokenCount usable tokens. Only increase this if you receive
+ major bursts all the time.
+ '';
+ };
+ };
+
+ preferences = {
+ replaceTwitter = mkOption {
+ type = types.str;
+ default = "";
+ example = "nitter.net";
+ description = "Replace Twitter links with links to this instance (blank to disable).";
+ };
+
+ replaceYouTube = mkOption {
+ type = types.str;
+ default = "";
+ example = "piped.kavin.rocks";
+ description = "Replace YouTube links with links to this instance (blank to disable).";
+ };
+
+ replaceInstagram = mkOption {
+ type = types.str;
+ default = "";
+ description = "Replace Instagram links with links to this instance (blank to disable).";
+ };
+
+ mp4Playback = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Enable MP4 video playback.";
+ };
+
+ hlsPlayback = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Enable HLS video streaming (requires JavaScript).";
+ };
+
+ proxyVideos = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Proxy video streaming through the server (might be slow).";
+ };
+
+ muteVideos = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Mute videos by default.";
+ };
+
+ autoplayGifs = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Autoplay GIFs.";
+ };
+
+ theme = mkOption {
+ type = types.str;
+ default = "Nitter";
+ description = "Instance theme.";
+ };
+
+ infiniteScroll = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Infinite scrolling (requires JavaScript, experimental!).";
+ };
+
+ stickyProfile = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Make profile sidebar stick to top.";
+ };
+
+ bidiSupport = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Support bidirectional text (makes clicking on tweets harder).";
+ };
+
+ hideTweetStats = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Hide tweet stats (replies, retweets, likes).";
+ };
+
+ hideBanner = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Hide profile banner.";
+ };
+
+ hidePins = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Hide pinned tweets.";
+ };
+
+ hideReplies = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Hide tweet replies.";
+ };
+ };
+
+ settings = mkOption {
+ type = types.attrs;
+ default = {};
+ description = ''
+ Add settings here to override NixOS module generated settings.
+
+ Check the official repository for the available settings:
+ https://github.com/zedeus/nitter/blob/master/nitter.conf
+ '';
+ };
+
+ redisCreateLocally = mkOption {
+ type = types.bool;
+ default = true;
+ description = "Configure local Redis server for Nitter.";
+ };
+
+ openFirewall = mkOption {
+ type = types.bool;
+ default = false;
+ description = "Open ports in the firewall for Nitter web interface.";
+ };
+ };
+ };
+
+ config = mkIf cfg.enable {
+ assertions = [
+ {
+ assertion = !cfg.redisCreateLocally || (cfg.cache.redisHost == "localhost" && cfg.cache.redisPort == 6379);
+ message = "When services.nitter.redisCreateLocally is enabled, you need to use localhost:6379 as a cache server.";
+ }
+ ];
+
+ systemd.services.nitter = {
+ description = "Nitter (An alternative Twitter front-end)";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "syslog.target" "network.target" ];
+ serviceConfig = {
+ DynamicUser = true;
+ StateDirectory = "nitter";
+ Environment = [ "NITTER_CONF_FILE=/var/lib/nitter/nitter.conf" ];
+ # Some parts of Nitter expect `public` folder in working directory,
+ # see https://github.com/zedeus/nitter/issues/414
+ WorkingDirectory = "${pkgs.nitter}/share/nitter";
+ ExecStart = "${pkgs.nitter}/bin/nitter";
+ ExecStartPre = "${preStart}";
+ AmbientCapabilities = lib.mkIf (cfg.server.port < 1024) [ "CAP_NET_BIND_SERVICE" ];
+ Restart = "on-failure";
+ RestartSec = "5s";
+ };
+ };
+
+ services.redis = lib.mkIf (cfg.redisCreateLocally) {
+ enable = true;
+ };
+
+ networking.firewall = mkIf cfg.openFirewall {
+ allowedTCPPorts = [ cfg.server.port ];
+ };
+ };
+}
diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix
index 37e004ae80a7..bb50aa1d35ca 100644
--- a/nixos/modules/services/x11/xserver.nix
+++ b/nixos/modules/services/x11/xserver.nix
@@ -657,6 +657,7 @@ in
pkgs.xterm
pkgs.xdg-utils
xorg.xf86inputevdev.out # get evdev.4 man page
+ pkgs.nixos-icons # needed for gnome and pantheon about dialog, nixos-manual and maybe more
]
++ optional (elem "virtualbox" cfg.videoDrivers) xorg.xrefresh;
diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix
index ce91d6518883..7e657878509c 100644
--- a/nixos/tests/all-tests.nix
+++ b/nixos/tests/all-tests.nix
@@ -301,6 +301,7 @@ in
nginx-sandbox = handleTestOn ["x86_64-linux"] ./nginx-sandbox.nix {};
nginx-sso = handleTest ./nginx-sso.nix {};
nginx-variants = handleTest ./nginx-variants.nix {};
+ nitter = handleTest ./nitter.nix {};
nix-serve = handleTest ./nix-ssh-serve.nix {};
nix-ssh-serve = handleTest ./nix-ssh-serve.nix {};
nixos-generate-config = handleTest ./nixos-generate-config.nix {};
diff --git a/nixos/tests/nitter.nix b/nixos/tests/nitter.nix
new file mode 100644
index 000000000000..e17f1c473436
--- /dev/null
+++ b/nixos/tests/nitter.nix
@@ -0,0 +1,16 @@
+import ./make-test-python.nix ({ pkgs, ... }:
+
+{
+ name = "nitter";
+ meta.maintainers = with pkgs.lib.maintainers; [ erdnaxe ];
+
+ nodes.machine = {
+ services.nitter.enable = true;
+ };
+
+ testScript = ''
+ machine.wait_for_unit("nitter.service")
+ machine.wait_for_open_port("8080")
+ machine.succeed("curl --fail http://localhost:8080/")
+ '';
+})
diff --git a/pkgs/applications/editors/android-studio/common.nix b/pkgs/applications/editors/android-studio/common.nix
index 42e3b7588afb..cc3f898a29bb 100644
--- a/pkgs/applications/editors/android-studio/common.nix
+++ b/pkgs/applications/editors/android-studio/common.nix
@@ -65,10 +65,14 @@ let
sha256 = sha256Hash;
};
- nativeBuildInputs = [ unzip ];
- buildInputs = [
+ nativeBuildInputs = [
+ unzip
makeWrapper
];
+
+ # Causes the shebangs in interpreter scripts deployed to mobile devices to be patched, which Android does not understand
+ dontPatchShebangs = true;
+
installPhase = ''
cp -r . $out
wrapProgram $out/bin/studio.sh \
@@ -152,9 +156,6 @@ let
'';
};
- # Causes the shebangs in interpreter scripts deployed to mobile devices to be patched, which Android does not understand
- dontPatchShebangs = true;
-
desktopItem = makeDesktopItem {
name = drvName;
exec = pname;
diff --git a/pkgs/applications/graphics/glimpse/default.nix b/pkgs/applications/graphics/glimpse/default.nix
index de85fb9bf174..01271f53b572 100644
--- a/pkgs/applications/graphics/glimpse/default.nix
+++ b/pkgs/applications/graphics/glimpse/default.nix
@@ -51,6 +51,7 @@
, makeWrapper
, autoreconfHook
, gtk-doc
+, graphviz
}:
let
python = python2.withPackages (pp: [ pp.pygtk ]);
@@ -154,7 +155,8 @@ stdenv.mkDerivation rec {
postFixup = ''
wrapProgram $out/bin/glimpse-${lib.versions.majorMinor version} \
- --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
+ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \
+ --prefix PATH ":" ${ lib.makeBinPath [ graphviz ] }
'';
passthru = rec {
diff --git a/pkgs/applications/graphics/shutter/default.nix b/pkgs/applications/graphics/shutter/default.nix
index bbcfcf03900d..a561b6f0d7cc 100644
--- a/pkgs/applications/graphics/shutter/default.nix
+++ b/pkgs/applications/graphics/shutter/default.nix
@@ -1,39 +1,103 @@
-{ lib, stdenv, fetchurl, perlPackages, makeWrapper, imagemagick, gdk-pixbuf, librsvg
-, hicolor-icon-theme, procps
+{ lib
+, stdenv
+, fetchFromGitHub
+, perlPackages
+, wrapGAppsHook
+, imagemagick
+, gdk-pixbuf
+, librsvg
+, hicolor-icon-theme
+, procps
+, libwnck
+, libappindicator-gtk3
}:
let
- perlModules = with perlPackages;
- [ Gnome2 Gnome2Canvas Gtk2 Glib Pango Gnome2VFS Gnome2Wnck Gtk2ImageView
- Gtk2Unique FileBaseDir FileWhich FileCopyRecursive XMLSimple NetDBus XMLTwig
- XMLParser HTTPMessage ProcSimple SortNaturally LocaleGettext
- ProcProcessTable URI ImageExifTool Gtk2AppIndicator LWP JSON
- ImageMagick WWWMechanize HTTPDate HTMLForm HTMLParser HTMLTagset JSONMaybeXS
- commonsense HTTPCookies NetOAuth PathClass GooCanvas X11Protocol Cairo
- EncodeLocale TryTiny TypesSerialiser LWPMediaTypes
+ perlModules = with perlPackages; [
+ # Not sure if these are needed
+ # Gnome2 Gnome2Canvas Gnome2VFS Gtk2AppIndicator Gtk2Unique
+ ImageMagick
+ Cairo
+ FileBaseDir
+ FileWhich
+ FileCopyRecursive
+ XMLSimple
+ XMLTwig
+ XMLParser
+ SortNaturally
+ LocaleGettext
+ ProcProcessTable
+ X11Protocol
+ ProcSimple
+ ImageExifTool
+ JSON
+ JSONMaybeXS
+ NetOAuth
+ PathClass
+ LWP
+ LWPProtocolHttps
+ NetDBus
+ TryTiny
+ WWWMechanize
+ HTTPMessage
+ HTTPDate
+ HTMLForm
+ HTMLParser
+ HTMLTagset
+ HTTPCookies
+ EncodeLocale
+ URI
+ CarpAlways
+ GlibObjectIntrospection
+ NumberBytesHuman
+ CairoGObject
+ Readonly
+ Gtk3ImageView
+ Gtk3
+ Glib
+ Pango
+ GooCanvas2
+ GooCanvas2CairoTypes
+ commonsense
+ TypesSerialiser
];
in
-stdenv.mkDerivation {
- name = "shutter-0.94.3";
+stdenv.mkDerivation rec {
+ pname = "shutter";
+ version = "0.97";
- src = fetchurl {
- url = "https://launchpad.net/shutter/0.9x/0.94.3/+download/shutter-0.94.3.tar.gz";
- sha256 = "01wv5k6zqfqa2rss461lpdpjxpfk4awzfdc6j2qk6bh4g4zgmgl5";
+ src = fetchFromGitHub {
+ owner = "shutter-project";
+ repo = "shutter";
+ rev = "v${version}";
+ sha256 = "sha256-/2eQLJJZP0ArQUrxcFdogv/4wy+O021hODkJYLQmLY8=";
};
- nativeBuildInputs = [ makeWrapper ];
- buildInputs = [ perlPackages.perl procps gdk-pixbuf librsvg ] ++ perlModules;
+ nativeBuildInputs = [ wrapGAppsHook ];
+ buildInputs = [
+ perlPackages.perl
+ procps
+ gdk-pixbuf
+ librsvg
+ libwnck
+ libappindicator-gtk3
+ ] ++ perlModules;
- installPhase = ''
- mkdir -p "$out"
- cp -a . "$out"
- (cd "$out" && mv CHANGES README COPYING "$out/share/doc/shutter")
+ makeFlags = [
+ "prefix=${placeholder "out"}"
+ ];
- wrapProgram $out/bin/shutter \
- --set PERL5LIB "${perlPackages.makePerlPath perlModules}" \
- --prefix PATH : "${imagemagick.out}/bin" \
- --suffix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
- --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
+ postPatch = ''
+ patchShebangs po2mo.sh
+ '';
+
+ preFixup = ''
+ gappsWrapperArgs+=(
+ --set PERL5LIB ${perlPackages.makePerlPath perlModules} \
+ --prefix PATH : ${lib.makeBinPath [ imagemagick ] } \
+ --suffix XDG_DATA_DIRS : ${hicolor-icon-theme}/share \
+ --set GDK_PIXBUF_MODULE_FILE $GDK_PIXBUF_MODULE_FILE
+ )
'';
meta = with lib; {
diff --git a/pkgs/applications/misc/gollum/Gemfile b/pkgs/applications/misc/gollum/Gemfile
index 525f54838b75..a15179970b3d 100644
--- a/pkgs/applications/misc/gollum/Gemfile
+++ b/pkgs/applications/misc/gollum/Gemfile
@@ -1,2 +1,8 @@
source 'https://rubygems.org'
gem 'gollum'
+
+gem 'asciidoctor'
+gem 'creole'
+gem 'wikicloth'
+gem 'org-ruby'
+gem 'RedCloth'
diff --git a/pkgs/applications/misc/gollum/Gemfile.lock b/pkgs/applications/misc/gollum/Gemfile.lock
index 73bc5d068d73..4d0d9adf7725 100644
--- a/pkgs/applications/misc/gollum/Gemfile.lock
+++ b/pkgs/applications/misc/gollum/Gemfile.lock
@@ -1,9 +1,14 @@
GEM
remote: https://rubygems.org/
specs:
+ RedCloth (4.3.2)
+ asciidoctor (2.0.15)
+ builder (3.2.4)
concurrent-ruby (1.1.8)
crass (1.0.6)
+ creole (0.5.0)
execjs (2.7.0)
+ expression_parser (0.9.0)
ffi (1.14.2)
gemojione (4.3.3)
json
@@ -36,6 +41,7 @@ GEM
gollum-rugged_adapter (1.0)
mime-types (>= 1.15)
rugged (~> 0.99)
+ htmlentities (4.3.4)
json (2.5.1)
kramdown (2.3.0)
rexml
@@ -59,6 +65,8 @@ GEM
racc (~> 1.4)
octicons (12.1.0)
nokogiri (>= 1.6.3.1)
+ org-ruby (0.9.12)
+ rubypants (~> 0.2)
racc (1.5.2)
rack (2.2.3)
rack-protection (2.1.0)
@@ -71,6 +79,7 @@ GEM
rss (0.2.9)
rexml
ruby2_keywords (0.0.4)
+ rubypants (0.7.1)
rugged (0.99.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
@@ -105,12 +114,23 @@ GEM
unf_ext
unf_ext (0.0.7.7)
useragent (0.16.10)
+ wikicloth (0.8.3)
+ builder
+ expression_parser
+ htmlentities
+ nokogiri
+ twitter-text
PLATFORMS
ruby
DEPENDENCIES
+ RedCloth
+ asciidoctor
+ creole
gollum
+ org-ruby
+ wikicloth
BUNDLED WITH
- 2.1.4
+ 2.2.20
diff --git a/pkgs/applications/misc/gollum/default.nix b/pkgs/applications/misc/gollum/default.nix
index 4a365b5a17ed..59bb05f85ced 100644
--- a/pkgs/applications/misc/gollum/default.nix
+++ b/pkgs/applications/misc/gollum/default.nix
@@ -1,5 +1,5 @@
{ lib, stdenv, bundlerEnv, ruby, makeWrapper, bundlerUpdateScript
-, git }:
+, git, docutils, perl }:
stdenv.mkDerivation rec {
pname = "gollum";
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
in ''
mkdir -p $out/bin
makeWrapper ${env}/bin/gollum $out/bin/gollum \
- --prefix PATH ":" ${lib.makeBinPath [ git ]}
+ --prefix PATH ":" ${lib.makeBinPath [ git docutils perl]}
makeWrapper ${env}/bin/gollum-migrate-tags $out/bin/gollum-migrate-tags \
--prefix PATH ":" ${lib.makeBinPath [ git ]}
'';
diff --git a/pkgs/applications/misc/gollum/gemset.nix b/pkgs/applications/misc/gollum/gemset.nix
index 690eba645dc1..8b0822d9a533 100644
--- a/pkgs/applications/misc/gollum/gemset.nix
+++ b/pkgs/applications/misc/gollum/gemset.nix
@@ -1,4 +1,24 @@
{
+ asciidoctor = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0k3lijm4dmiz977bfmpclk5glj5jwv7bidamwwwywm60ywb0n4n4";
+ type = "gem";
+ };
+ version = "2.0.15";
+ };
+ builder = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "045wzckxpwcqzrjr353cxnyaxgf0qg22jh00dcx7z38cys5g1jlr";
+ type = "gem";
+ };
+ version = "3.2.4";
+ };
concurrent-ruby = {
groups = ["default"];
platforms = [];
@@ -19,6 +39,16 @@
};
version = "1.0.6";
};
+ creole = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "00rcscz16idp6dx0dk5yi5i0fz593i3r6anbn5bg2q07v3i025wm";
+ type = "gem";
+ };
+ version = "0.5.0";
+ };
execjs = {
groups = ["default"];
platforms = [];
@@ -29,6 +59,16 @@
};
version = "2.7.0";
};
+ expression_parser = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "1938z3wmmdabqxlh5d5c56xfg1jc6z15p7zjyhvk7364zwydnmib";
+ type = "gem";
+ };
+ version = "0.9.0";
+ };
ffi = {
groups = ["default"];
platforms = [];
@@ -93,6 +133,16 @@
};
version = "1.0";
};
+ htmlentities = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj";
+ type = "gem";
+ };
+ version = "4.3.4";
+ };
json = {
groups = ["default"];
platforms = [];
@@ -231,6 +281,17 @@
};
version = "12.1.0";
};
+ org-ruby = {
+ dependencies = ["rubypants"];
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0x69s7aysfiwlcpd9hkvksfyld34d8kxr62adb59vjvh8hxfrjwk";
+ type = "gem";
+ };
+ version = "0.9.12";
+ };
racc = {
groups = ["default"];
platforms = [];
@@ -283,6 +344,16 @@
};
version = "0.10.1";
};
+ RedCloth = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0m9dv7ya9q93r8x1pg2gi15rxlbck8m178j1fz7r5v6wr1avrrqy";
+ type = "gem";
+ };
+ version = "4.3.2";
+ };
rexml = {
groups = ["default"];
platforms = [];
@@ -324,6 +395,16 @@
};
version = "0.0.4";
};
+ rubypants = {
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0kv2way45d2dz3h5b7wxyw36clvlwrz7ydf6699d0za5vm56gsrh";
+ type = "gem";
+ };
+ version = "0.7.1";
+ };
rugged = {
groups = ["default"];
platforms = [];
@@ -484,4 +565,15 @@
};
version = "0.16.10";
};
+ wikicloth = {
+ dependencies = ["builder" "expression_parser" "htmlentities" "nokogiri" "twitter-text"];
+ groups = ["default"];
+ platforms = [];
+ source = {
+ remotes = ["https://rubygems.org"];
+ sha256 = "0c78r1rg93mb5rcrfxl01b162ma9sh46dhjksc4c9dngg62nhbjh";
+ type = "gem";
+ };
+ version = "0.8.3";
+ };
}
diff --git a/pkgs/applications/misc/gramps/default.nix b/pkgs/applications/misc/gramps/default.nix
index 1628f0473fa6..b22a09691bb3 100644
--- a/pkgs/applications/misc/gramps/default.nix
+++ b/pkgs/applications/misc/gramps/default.nix
@@ -9,7 +9,7 @@
let
inherit (pythonPackages) python buildPythonApplication;
in buildPythonApplication rec {
- version = "5.1.3";
+ version = "5.1.4";
pname = "gramps";
nativeBuildInputs = [ wrapGAppsHook intltool gettext ];
@@ -26,7 +26,7 @@ in buildPythonApplication rec {
owner = "gramps-project";
repo = "gramps";
rev = "v${version}";
- sha256 = "109dwkswz2h2328xkqk2zj736d117s9pp7rz5cc1qg2vxn1lpm93";
+ sha256 = "00358nzyw686ypqv45imc5k9frcqnhla0hpx9ynna3iy6iz5006x";
};
pythonPath = with pythonPackages; [ bsddb3 PyICU pygobject3 pycairo ];
diff --git a/pkgs/applications/misc/kile-wl/default.nix b/pkgs/applications/misc/kile-wl/default.nix
index 9146f38df369..03786a629975 100644
--- a/pkgs/applications/misc/kile-wl/default.nix
+++ b/pkgs/applications/misc/kile-wl/default.nix
@@ -2,20 +2,20 @@
rustPlatform.buildRustPackage rec {
pname = "kile-wl";
- version = "unstable-2021-06-24";
+ version = "unstable-2021-08-03";
src = fetchFromGitLab {
owner = "snakedye";
repo = "kile";
- rev = "6a306b0b5af0f250135eb88e0e72a5038fccd6a8";
- sha256 = "sha256-DznIDzI5rNrlKJdXjpOpsLL8IO6tuIvW0pNdRN8N6Go=";
+ rev = "7f0b1578352d935084d3d56ef42487d2a8cfbfe8";
+ sha256 = "sha256-Ir9LNQt7/7TjhCJ69HYx1tBXeq/i7F3ydmenvchZgDI=";
};
passthru.updateScript = unstableGitUpdater {
url = "https://gitlab.com/snakedye/kile.git";
};
- cargoSha256 = "sha256-LFRqhgvziQ7a8OWRzXqNIfziP6bRHTe2oF55N09rFy8=";
+ cargoSha256 = "sha256-195rPxX3BTxJ0xLgye14aWuBd5OuJ30wyUa4wrbQ3Xo=";
nativeBuildInputs = [ scdoc ];
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix
index 777e5148e401..ee506b3faade 100644
--- a/pkgs/applications/networking/browsers/chromium/common.nix
+++ b/pkgs/applications/networking/browsers/chromium/common.nix
@@ -267,7 +267,6 @@ let
clang_use_chrome_plugins = false;
blink_symbol_level = 0;
symbol_level = 0;
- fieldtrial_testing_like_official_build = true;
# Google API key, see: https://www.chromium.org/developers/how-tos/api-keys
# Note: The API key is for NixOS/nixpkgs use ONLY.
@@ -288,6 +287,10 @@ let
enable_widevine = true;
# Provides the enable-webrtc-pipewire-capturer flag to support Wayland screen capture:
rtc_use_pipewire = true;
+ } // optionalAttrs (!chromiumVersionAtLeast "94") {
+ fieldtrial_testing_like_official_build = true;
+ } // optionalAttrs (chromiumVersionAtLeast "94") {
+ disable_fieldtrial_testing_config = true;
} // optionalAttrs proprietaryCodecs {
# enable support for the H.264 codec
proprietary_codecs = true;
diff --git a/pkgs/applications/networking/browsers/chromium/default.nix b/pkgs/applications/networking/browsers/chromium/default.nix
index c7be4663bbec..c157b64de648 100644
--- a/pkgs/applications/networking/browsers/chromium/default.nix
+++ b/pkgs/applications/networking/browsers/chromium/default.nix
@@ -1,5 +1,5 @@
{ newScope, config, stdenv, fetchurl, makeWrapper
-, llvmPackages_11, llvmPackages_12, ed, gnugrep, coreutils, xdg-utils
+, llvmPackages_12, llvmPackages_13, ed, gnugrep, coreutils, xdg-utils
, glib, gtk3, gnome, gsettings-desktop-schemas, gn, fetchgit
, libva, pipewire, wayland
, gcc, nspr, nss, runCommand
@@ -19,7 +19,7 @@
}:
let
- llvmPackages = llvmPackages_11;
+ llvmPackages = llvmPackages_12;
stdenv = llvmPackages.stdenv;
callPackage = newScope chromium;
@@ -38,9 +38,9 @@ let
inherit (upstream-info.deps.gn) url rev sha256;
};
});
- } // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "90") {
- llvmPackages = llvmPackages_12;
- stdenv = llvmPackages_12.stdenv;
+ } // lib.optionalAttrs (lib.versionAtLeast upstream-info.version "94") rec {
+ llvmPackages = llvmPackages_13;
+ stdenv = llvmPackages.stdenv;
});
browser = callPackage ./browser.nix { inherit channel enableWideVine ungoogled; };
diff --git a/pkgs/applications/networking/browsers/chromium/get-commit-message.py b/pkgs/applications/networking/browsers/chromium/get-commit-message.py
index 7a91b74c83d5..b0fbe20db8ef 100755
--- a/pkgs/applications/networking/browsers/chromium/get-commit-message.py
+++ b/pkgs/applications/networking/browsers/chromium/get-commit-message.py
@@ -2,8 +2,10 @@
#!nix-shell -i python3 -p python3Packages.feedparser python3Packages.requests
# This script prints the Git commit message for stable channel updates.
+# Usage: ./get-commit-message.py [version]
import re
+import sys
import textwrap
from collections import OrderedDict
@@ -13,19 +15,29 @@ import requests
feed = feedparser.parse('https://chromereleases.googleblog.com/feeds/posts/default')
html_tags = re.compile(r'<[^>]+>')
+target_version = sys.argv[1] if len(sys.argv) == 2 else None
for entry in feed.entries:
- if entry.title != 'Stable Channel Update for Desktop':
- continue
url = requests.get(entry.link).url.split('?')[0]
+ if entry.title != 'Stable Channel Update for Desktop':
+ if target_version and entry.title == '':
+ # Workaround for a special case (Chrome Releases bug?):
+ if not 'the-stable-channel-has-been-updated-to' in url:
+ continue
+ else:
+ continue
content = entry.content[0].value
content = html_tags.sub('', content) # Remove any HTML tags
if re.search(r'Linux', content) is None:
continue
#print(url) # For debugging purposes
version = re.search(r'\d+(\.\d+){3}', content).group(0)
- print('chromium: TODO -> ' + version)
- print('\n' + url)
+ if target_version:
+ if version != target_version:
+ continue
+ else:
+ print('chromium: TODO -> ' + version + '\n')
+ print(url)
if fixes := re.search(r'This update includes .+ security fixes\.', content).group(0):
zero_days = re.search(r'Google is aware( of reports)? that .+ in the wild\.', content)
if zero_days:
@@ -35,4 +47,7 @@ for entry in feed.entries:
cve_list = list(OrderedDict.fromkeys(cve_list)) # Remove duplicates but preserve the order
cve_string = ' '.join(cve_list)
print("\nCVEs:\n" + '\n'.join(textwrap.wrap(cve_string, width=72)))
- break # We only care about the most recent stable channel update
+ sys.exit(0) # We only care about the most recent stable channel update
+
+print("Error: No match.")
+sys.exit(1)
diff --git a/pkgs/applications/networking/browsers/chromium/update.py b/pkgs/applications/networking/browsers/chromium/update.py
index 4f9f53bd02ac..72d6df055b38 100755
--- a/pkgs/applications/networking/browsers/chromium/update.py
+++ b/pkgs/applications/networking/browsers/chromium/update.py
@@ -222,14 +222,8 @@ if len(sys.argv) == 2 and sys.argv[1] == '--commit':
attr_name = channel_name_to_attr_name(channel_name)
commit_message = f'{attr_name}: {version_old} -> {version_new}'
if channel_name == 'stable':
- body = subprocess.check_output([COMMIT_MESSAGE_SCRIPT]).decode('utf-8')
- prefix = f'chromium: TODO -> {version_new}'
- if not body.startswith(prefix):
- print("Error: Couldn't fetch the the release notes for the following update:")
- print(commit_message)
- sys.exit(1)
- body = body.removeprefix(prefix)
- commit_message += body
+ body = subprocess.check_output([COMMIT_MESSAGE_SCRIPT, version_new]).decode('utf-8')
+ commit_message += '\n\n' + body
subprocess.run(['git', 'add', JSON_PATH], check=True)
subprocess.run(['git', 'commit', '--file=-'], input=commit_message.encode(), check=True)
else:
diff --git a/pkgs/applications/networking/cluster/fluxctl/default.nix b/pkgs/applications/networking/cluster/fluxctl/default.nix
index bba0b74172a9..d8a6306a1f59 100644
--- a/pkgs/applications/networking/cluster/fluxctl/default.nix
+++ b/pkgs/applications/networking/cluster/fluxctl/default.nix
@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "fluxctl";
- version = "1.23.0";
+ version = "1.23.1";
src = fetchFromGitHub {
owner = "weaveworks";
repo = "flux";
rev = version;
- sha256 = "sha256-CJY7XjHJ6suJrjhnG+w5oM1FtVnegcbkCVGjyoBtBag=";
+ sha256 = "sha256-PcDipeW+ebGm6w/htjyx1/PXaanh2gp3EyHkcLY9peo=";
};
- vendorSha256 = "sha256-aC6E+PpuUqFhZKvQT5AuxpPmHfhjCwHzwFHDzk5wazw=";
+ vendorSha256 = "sha256-CxGa95x742vS+8WxK/I2ZbEn2mJPwpXa5zm3xBNbX4U=";
nativeBuildInputs = [ installShellFiles ];
diff --git a/pkgs/applications/networking/cluster/helmfile/default.nix b/pkgs/applications/networking/cluster/helmfile/default.nix
index 7fda9c74c9b9..1f32d5f1cd85 100644
--- a/pkgs/applications/networking/cluster/helmfile/default.nix
+++ b/pkgs/applications/networking/cluster/helmfile/default.nix
@@ -2,13 +2,13 @@
buildGoModule rec {
pname = "helmfile";
- version = "0.139.9";
+ version = "0.140.0";
src = fetchFromGitHub {
owner = "roboll";
repo = "helmfile";
rev = "v${version}";
- sha256 = "sha256-MHvfDeN4r9jwnXANHTpMEQUIoAZ+uXAmDtl8wdcpjHI=";
+ sha256 = "sha256-Y1BlvUudxEZ1G893dwYU+R6k2QAYohx4+0yysYaUM0E=";
};
vendorSha256 = "sha256-QYI5HxEUNrZKSjk0LlbhjvxXlWCbbLup51Ht3HJDNC8=";
diff --git a/pkgs/applications/networking/cluster/nomad/1.0.nix b/pkgs/applications/networking/cluster/nomad/1.0.nix
index ac6938e4ddc0..4966c42b9a42 100644
--- a/pkgs/applications/networking/cluster/nomad/1.0.nix
+++ b/pkgs/applications/networking/cluster/nomad/1.0.nix
@@ -6,6 +6,6 @@
callPackage ./generic.nix {
inherit buildGoPackage nvidia_x11 nvidiaGpuSupport;
- version = "1.0.8";
- sha256 = "1kjwa9lnxh5zfzijqgkp94wslkzn6kspwi42kf46vrn0qkiz39f2";
+ version = "1.0.9";
+ sha256 = "0ml6l5xq1310ib5zqfdwlxmsmhpc5ybd05z7pc6zgxbma1brxdv4";
}
diff --git a/pkgs/applications/networking/cluster/octant/default.nix b/pkgs/applications/networking/cluster/octant/default.nix
index dbbf65248713..fabdc7d5ab5e 100644
--- a/pkgs/applications/networking/cluster/octant/default.nix
+++ b/pkgs/applications/networking/cluster/octant/default.nix
@@ -2,7 +2,7 @@
stdenv.mkDerivation rec {
pname = "octant";
- version = "0.22.0";
+ version = "0.23.0";
src =
let
@@ -19,10 +19,10 @@ stdenv.mkDerivation rec {
};
in
fetchsrc version {
- x86_64-linux = "sha256-1/vyV6pUqovVpovTYFF4d75wJvtTNdrbLZyjw1lLacA=";
- aarch64-linux = "sha256-1duNW0Edj0jrpv/RMrebtZF4ph6j3PXCJ2RFejOopGQ=";
- x86_64-darwin = "sha256-Ur5jBPk5hA6cGg+pPf36Ijh94gWEdaWlJK3yCMBYyEU=";
- aarch64-darwin = "sha256-RaiXW+MUihk291UWmrf6gLpyrd5stIkhyWNFEQ0daCk=";
+ x86_64-linux = "sha256-wnm4Zprlao+zbWVJNY4BsAT1fFMft7luyDaW2HfNotg=";
+ aarch64-linux = "sha256-eYvfLUelSrmdY9dbgAlPm7en88hsdCnejJGq2Gz4DN0=";
+ x86_64-darwin = "sha256-NXMQ4mbYfIK+arGWZVhQk5iAw6AZM9PAGJ9CEC/rmgA=";
+ aarch64-darwin = "sha256-WqlbiDV2CuBYr6IXQ8vaESxKNZGp9vBj683igazcmwM=";
};
dontConfigure = true;
diff --git a/pkgs/applications/networking/cluster/octant/desktop.nix b/pkgs/applications/networking/cluster/octant/desktop.nix
index e793df71a585..1a86a66fa29b 100644
--- a/pkgs/applications/networking/cluster/octant/desktop.nix
+++ b/pkgs/applications/networking/cluster/octant/desktop.nix
@@ -2,7 +2,7 @@
let
pname = "octant-desktop";
- version = "0.22.0";
+ version = "0.23.0";
name = "${pname}-${version}";
inherit (stdenv.hostPlatform) system;
@@ -15,8 +15,8 @@ let
src = fetchurl {
url = "https://github.com/vmware-tanzu/octant/releases/download/v${version}/Octant-${version}.${suffix}";
sha256 = {
- x86_64-linux = "sha256-xMdNoH0UE/KLIQ0DjJfb+ZB/q2F+kyFEncrQ9YYJgE0=";
- x86_64-darwin = "sha256-y3fmxrsQ0hCa1wuMiRGHf79kpi25qXv/idKrVT87oc0=";
+ x86_64-linux = "sha256-K4z6SVCiuqy3xkWMWpm8KM7iYVXyKcnERljMG3NEFMw=";
+ x86_64-darwin = "sha256-WYra0yw/aPW/wUGrlIn5ud3kjFTkekYEi2LWZcYO5Nw=";
}.${system};
};
diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix
index 8d13fab793c9..9bc10753a852 100644
--- a/pkgs/applications/networking/cluster/terraform/default.nix
+++ b/pkgs/applications/networking/cluster/terraform/default.nix
@@ -195,8 +195,8 @@ rec {
};
terraform_1_0 = mkTerraform {
- version = "1.0.3";
- sha256 = "0m7r66nw0nppra90sjhbq5d0f4q525c73q6ncmy6w37j2nixz35z";
+ version = "1.0.4";
+ sha256 = "09g0ln247scv8mj40gxhkij0li62v0rjm2bsgmvl953aj7g3dlh1";
vendorSha256 = "07pzqvf9lwgc1fadmyam5hn7arlvzrjsplls445738jpn61854gg";
patches = [ ./provider-path-0_15.patch ];
passthru = { inherit plugins; };
diff --git a/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix b/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix
index ced0c77a96af..3266b36194f4 100644
--- a/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix
+++ b/pkgs/applications/networking/instant-messengers/kdeltachat/default.nix
@@ -1,25 +1,44 @@
{ lib
, mkDerivation
+, fetchFromGitHub
, fetchFromSourcehut
, cmake
, extra-cmake-modules
, pkg-config
, kirigami2
, libdeltachat
+, qtbase
, qtimageformats
, qtmultimedia
, qtwebengine
+, rustPlatform
}:
-mkDerivation rec {
+let
+ libdeltachat' = libdeltachat.overrideAttrs (old: rec {
+ inherit (old) pname;
+ version = "1.58.0";
+ src = fetchFromGitHub {
+ owner = "deltachat";
+ repo = "deltachat-core-rust";
+ rev = version;
+ sha256 = "03xc0jlfmvmdcipmzavbzkq010qlxzf3mj1zi7wcix7kpl8gwmy7";
+ };
+ cargoDeps = rustPlatform.fetchCargoTarball {
+ inherit src;
+ name = "${pname}-${version}";
+ sha256 = "1zijxyc1xjlbyh1gh2lyw44xjcrhz1msykrlqgfkw5w1w0yh78hd";
+ };
+ });
+in mkDerivation rec {
pname = "kdeltachat";
- version = "unstable-2021-07-17";
+ version = "unstable-2021-08-02";
src = fetchFromSourcehut {
owner = "~link2xt";
repo = "kdeltachat";
- rev = "9e5fe2dc856795d0d3d8b6a3adf3fdd3015d9158";
- sha256 = "12arcrnpacq2fbjbzs6a9yz6lfsj2dkga9chpld1ran3v6by58z9";
+ rev = "950f4f22c01ab75f613479ef831bdf38f395d1dd";
+ sha256 = "007gazqkzcc0w0rq2i8ysa9f50ldj7n9f5gp1mh8bi86bdvdkzsy";
};
nativeBuildInputs = [
@@ -30,12 +49,18 @@ mkDerivation rec {
buildInputs = [
kirigami2
- libdeltachat
+ libdeltachat'
qtimageformats
qtmultimedia
qtwebengine
];
+ # needed for qmlplugindump to work
+ QT_PLUGIN_PATH = "${qtbase.bin}/${qtbase.qtPluginPrefix}";
+ QML2_IMPORT_PATH = lib.concatMapStringsSep ":"
+ (lib: "${lib}/${qtbase.qtQmlPrefix}")
+ [ kirigami2 qtmultimedia ];
+
meta = with lib; {
description = "Delta Chat client using Kirigami framework";
homepage = "https://git.sr.ht/~link2xt/kdeltachat";
diff --git a/pkgs/applications/networking/instant-messengers/rambox/default.nix b/pkgs/applications/networking/instant-messengers/rambox/default.nix
index 8782a4bc5beb..418d490bbd5e 100644
--- a/pkgs/applications/networking/instant-messengers/rambox/default.nix
+++ b/pkgs/applications/networking/instant-messengers/rambox/default.nix
@@ -4,16 +4,16 @@ let
mkRambox = opts: callPackage (import ./rambox.nix opts) { };
in mkRambox rec {
pname = "rambox";
- version = "0.7.7";
+ version = "0.7.8";
src = {
x86_64-linux = fetchurl {
url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-x86_64.AppImage";
- sha256 = "0f82hq0dzcjicdz6lkzj8889y100yqciqrwh8wjjy9pxkhjcdini";
+ sha256 = "1y3c9xh8594ay95rj9vaqxxzibwpc38n7ixxi2wnsrdbrqrwlc63";
};
i686-linux = fetchurl {
url = "https://github.com/ramboxapp/community-edition/releases/download/${version}/Rambox-${version}-linux-i386.AppImage";
- sha256 = "1nhgqjha10jvyf9nsghvlkibg7byj8qz140639ygag9qlpd52rfs";
+ sha256 = "07sv384nd2i701fkjgsrlib8jfsa01bvj60gnqdwlnpphlknga3h";
};
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}");
@@ -24,8 +24,5 @@ in mkRambox rec {
maintainers = with maintainers; [ ];
platforms = ["i686-linux" "x86_64-linux"];
hydraPlatforms = [];
- knownVulnerabilities = [
- "Electron 7.2.4 is EOL and contains at least the following vulnerabilities: CVE-2020-6458, CVE-2020-6460 and more (https://www.electronjs.org/releases/stable?version=7). Consider using an alternative such as `ferdi'."
- ];
};
}
diff --git a/pkgs/applications/networking/instant-messengers/rambox/rambox.nix b/pkgs/applications/networking/instant-messengers/rambox/rambox.nix
index 56930f561c78..df038611c3b1 100644
--- a/pkgs/applications/networking/instant-messengers/rambox/rambox.nix
+++ b/pkgs/applications/networking/instant-messengers/rambox/rambox.nix
@@ -1,6 +1,6 @@
{ pname, version, src, meta, desktopName ? "Rambox" }:
-{ appimageTools, lib, fetchurl, makeDesktopItem }:
+{ appimageTools, lib, fetchurl, gsettings-desktop-schemas, gtk3, makeDesktopItem }:
let
name = "${pname}-${version}";
@@ -19,6 +19,9 @@ let
};
in appimageTools.wrapType2 rec {
inherit name src meta;
+ profile = ''
+ export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
+ '';
extraInstallCommands = ''
mkdir -p $out/share/applications $out/share/icons/hicolor/256x256/apps
diff --git a/pkgs/applications/networking/remote/putty/default.nix b/pkgs/applications/networking/remote/putty/default.nix
index aab30c24e207..6249cce973ef 100644
--- a/pkgs/applications/networking/remote/putty/default.nix
+++ b/pkgs/applications/networking/remote/putty/default.nix
@@ -3,7 +3,7 @@
}:
stdenv.mkDerivation rec {
- version = "0.75";
+ version = "0.76";
pname = "putty";
src = fetchurl {
@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
"https://the.earth.li/~sgtatham/putty/${version}/${pname}-${version}.tar.gz"
"ftp://ftp.wayne.edu/putty/putty-website-mirror/${version}/${pname}-${version}.tar.gz"
];
- sha256 = "1xgrr1fbirw79zafspg2b6crzfmlfw910y79md4r7gnxgq1kn5yk";
+ sha256 = "0gvi8phabszqksj2by5jrjmshm7bpirhgavz0dqyz1xaimxdjz2l";
};
# glib-2.62 deprecations
diff --git a/pkgs/applications/science/chemistry/ergoscf/default.nix b/pkgs/applications/science/chemistry/ergoscf/default.nix
new file mode 100644
index 000000000000..b7d61848134e
--- /dev/null
+++ b/pkgs/applications/science/chemistry/ergoscf/default.nix
@@ -0,0 +1,40 @@
+{ lib, stdenv, fetchurl, blas, lapack } :
+
+stdenv.mkDerivation rec {
+ pname = "ergoscf";
+ version = "3.8";
+
+ src = fetchurl {
+ url = "http://www.ergoscf.org/source/tarfiles/ergo-${version}.tar.gz";
+ sha256 = "1s50k2gfs3y6r5kddifn4p0wmj0yk85wm5vf9v3swm1c0h43riix";
+ };
+
+ buildInputs = [ blas lapack ];
+
+ patches = [ ./math-constants.patch ];
+
+ postPatch = ''
+ patchShebangs ./test
+ '';
+
+ configureFlags = [
+ "--enable-linalgebra-templates"
+ "--enable-performance"
+ ] ++ lib.optional stdenv.isx86_64 "--enable-sse-intrinsics";
+
+ LDFLAGS = "-lblas -llapack";
+
+ enableParallelBuilding = true;
+
+ OMP_NUM_THREADS = 2; # required for check phase
+
+ doCheck = true;
+
+ meta = with lib; {
+ description = "Quantum chemistry program for large-scale self-consistent field calculations";
+ homepage = "http://www.ergoscf.org";
+ license = licenses.gpl3Plus;
+ maintainers = [ maintainers.markuskowa ];
+ platforms = platforms.linux;
+ };
+}
diff --git a/pkgs/applications/science/chemistry/ergoscf/math-constants.patch b/pkgs/applications/science/chemistry/ergoscf/math-constants.patch
new file mode 100644
index 000000000000..62209f1a3d84
--- /dev/null
+++ b/pkgs/applications/science/chemistry/ergoscf/math-constants.patch
@@ -0,0 +1,19 @@
+diff --git a/source/dft/functionals.h b/source/dft/functionals.h
+index fde49ba..f7a61fc 100644
+--- a/source/dft/functionals.h
++++ b/source/dft/functionals.h
+@@ -59,6 +59,14 @@
+ #define EXTERN_C
+ #endif
+
++#ifndef M_PI
++#define M_PI 3.14159265358979323846
++#endif
++
++#ifndef M_SQRT2
++#define M_SQRT2 1.41421356237309504880
++#endif
++
+ typedef ergo_real real;
+
+ #if defined(FUNC_PRECISION) && FUNC_PRECISION == 1
diff --git a/pkgs/applications/version-management/cvs-fast-export/default.nix b/pkgs/applications/version-management/cvs-fast-export/default.nix
index a14af17c01c5..7c8d8ce11bce 100644
--- a/pkgs/applications/version-management/cvs-fast-export/default.nix
+++ b/pkgs/applications/version-management/cvs-fast-export/default.nix
@@ -4,11 +4,11 @@
stdenv.mkDerivation rec {
pname = "cvs-fast-export";
- version = "1.57";
+ version = "1.58";
src = fetchurl {
url = "http://www.catb.org/~esr/cvs-fast-export/cvs-fast-export-${version}.tar.gz";
- sha256 = "0y1fzsicga19nsarpmn2ms69sq26b2d3d8a1169qbqz1kzr0jji8";
+ sha256 = "sha256-jY/GURa6WzULwpnoqBmzVQdK4WH95tf59v07y8gHeWM=";
};
strictDeps = true;
diff --git a/pkgs/applications/version-management/git-and-tools/gh/default.nix b/pkgs/applications/version-management/git-and-tools/gh/default.nix
index a7ca5c4eaa6f..5086657a56e1 100644
--- a/pkgs/applications/version-management/git-and-tools/gh/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/gh/default.nix
@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "gh";
- version = "1.13.1";
+ version = "1.14.0";
src = fetchFromGitHub {
owner = "cli";
repo = "cli";
rev = "v${version}";
- sha256 = "sha256-6ur1ZIJRghkZk5tLMJUmKn+XfjVGFE0MRSQ/Uz+Eans=";
+ sha256 = "sha256-JCuJliBr1IPdwGG9T0Bx5DhtHw8tJ45mteRLxRbkyio=";
};
- vendorSha256 = "sha256-JJNyzMYAQT/pS1+eGYQsUpxDiwa6DP7JWhIBuTtnOiE=";
+ vendorSha256 = "sha256-6H56jf4QV+DdsiCetyhpXp6NHc86Hzo+CuqF06dL26A=";
nativeBuildInputs = [ installShellFiles ];
diff --git a/pkgs/applications/video/qarte/default.nix b/pkgs/applications/video/qarte/default.nix
index 9b80ddedcf3a..116cf39e3fb8 100644
--- a/pkgs/applications/video/qarte/default.nix
+++ b/pkgs/applications/video/qarte/default.nix
@@ -3,7 +3,9 @@
let
pythonEnv = python3.withPackages (ps: with ps; [ pyqt5_with_qtmultimedia ]);
in mkDerivation {
- name = "qarte-4.12.0";
+ pname = "qarte";
+ version = "4.12.0";
+
src = fetchbzr {
url = "http://bazaar.launchpad.net/~vincent-vandevyvre/qarte/qarte-4";
rev = "56";
@@ -14,6 +16,7 @@ in mkDerivation {
installPhase = ''
runHook preInstall
+
mkdir -p $out/bin
mv qarte $out/bin/
substituteInPlace $out/bin/qarte \
@@ -24,6 +27,7 @@ in mkDerivation {
mkdir -p $out/share/qarte
mv * $out/share/qarte/
+
runHook postInstall
'';
@@ -32,11 +36,11 @@ in mkDerivation {
--prefix PATH : ${rtmpdump}/bin
'';
- meta = {
+ meta = with lib; {
homepage = "https://launchpad.net/qarte";
description = "A recorder for Arte TV Guide and Arte Concert";
- license = lib.licenses.gpl3;
- maintainers = with lib.maintainers; [ vbgl ];
- platforms = lib.platforms.linux;
+ license = licenses.gpl3;
+ maintainers = with maintainers; [ vbgl ];
+ platforms = platforms.linux;
};
}
diff --git a/pkgs/applications/virtualization/cloud-hypervisor/default.nix b/pkgs/applications/virtualization/cloud-hypervisor/default.nix
index d04c0230c97f..3bcb27898cc3 100644
--- a/pkgs/applications/virtualization/cloud-hypervisor/default.nix
+++ b/pkgs/applications/virtualization/cloud-hypervisor/default.nix
@@ -2,19 +2,19 @@
rustPlatform.buildRustPackage rec {
pname = "cloud-hypervisor";
- version = "15.0";
+ version = "17.0";
src = fetchFromGitHub {
owner = "cloud-hypervisor";
repo = pname;
rev = "v${version}";
- sha256 = "14s80vs7j5fxzl2a6k44fjlbk8i13lln28i37xaa6yk1q3d9jwic";
+ sha256 = "1m4v12sjifd5mf1wzjwkndvxg53n7kwd35k6ql45hdpiz3f5ipig";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optional stdenv.isAarch64 dtc;
- cargoSha256 = "02q4k7j1hyibsiwsbqa5bd4vr3fs1vngnnhqa4kzvih73bkagvk7";
+ cargoSha256 = "11qspv061y75cyln60727x15gdn9rndi697zr9fmihnwn3dx4hvh";
meta = with lib; {
homepage = "https://github.com/cloud-hypervisor/cloud-hypervisor";
diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix
index 4df14e030aea..f3aecf300807 100644
--- a/pkgs/applications/virtualization/qemu/default.nix
+++ b/pkgs/applications/virtualization/qemu/default.nix
@@ -31,20 +31,19 @@
, nixosTestRunner ? false
}:
-with lib;
let
- audio = optionalString alsaSupport "alsa,"
- + optionalString pulseSupport "pa,"
- + optionalString sdlSupport "sdl,";
+ audio = lib.optionalString alsaSupport "alsa,"
+ + lib.optionalString pulseSupport "pa,"
+ + lib.optionalString sdlSupport "sdl,";
in
stdenv.mkDerivation rec {
- version = "6.0.0";
pname = "qemu"
+ lib.optionalString xenSupport "-xen"
+ lib.optionalString hostCpuOnly "-host-cpu-only"
+ lib.optionalString nixosTestRunner "-for-vm-tests";
+ version = "6.0.0";
src = fetchurl {
url= "https://download.qemu.org/qemu-${version}.tar.xz";
@@ -52,32 +51,32 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [ python python.pkgs.sphinx pkg-config flex bison meson ninja ]
- ++ optionals gtkSupport [ wrapGAppsHook ]
- ++ optionals stdenv.isLinux [ autoPatchelfHook ];
- buildInputs =
- [ zlib glib perl pixman
- vde2 texinfo makeWrapper lzo snappy
- gnutls nettle curl
- ]
- ++ optionals ncursesSupport [ ncurses ]
- ++ optionals stdenv.isDarwin [ CoreServices Cocoa Hypervisor rez setfile ]
- ++ optionals seccompSupport [ libseccomp ]
- ++ optionals numaSupport [ numactl ]
- ++ optionals pulseSupport [ libpulseaudio ]
- ++ optionals sdlSupport [ SDL2 SDL2_image ]
- ++ optionals gtkSupport [ gtk3 gettext vte ]
- ++ optionals vncSupport [ libjpeg libpng ]
- ++ optionals smartcardSupport [ libcacard ]
- ++ optionals spiceSupport [ spice-protocol spice ]
- ++ optionals usbredirSupport [ usbredir ]
- ++ optionals stdenv.isLinux [ alsa-lib libaio libcap_ng libcap attr ]
- ++ optionals xenSupport [ xen ]
- ++ optionals cephSupport [ ceph ]
- ++ optionals glusterfsSupport [ glusterfs libuuid ]
- ++ optionals openGLSupport [ mesa epoxy libdrm ]
- ++ optionals virglSupport [ virglrenderer ]
- ++ optionals libiscsiSupport [ libiscsi ]
- ++ optionals smbdSupport [ samba ];
+ ++ lib.optionals gtkSupport [ wrapGAppsHook ]
+ ++ lib.optionals stdenv.isLinux [ autoPatchelfHook ];
+
+ buildInputs = [ zlib glib perl pixman
+ vde2 texinfo makeWrapper lzo snappy
+ gnutls nettle curl
+ ]
+ ++ lib.optionals ncursesSupport [ ncurses ]
+ ++ lib.optionals stdenv.isDarwin [ CoreServices Cocoa Hypervisor rez setfile ]
+ ++ lib.optionals seccompSupport [ libseccomp ]
+ ++ lib.optionals numaSupport [ numactl ]
+ ++ lib.optionals pulseSupport [ libpulseaudio ]
+ ++ lib.optionals sdlSupport [ SDL2 SDL2_image ]
+ ++ lib.optionals gtkSupport [ gtk3 gettext vte ]
+ ++ lib.optionals vncSupport [ libjpeg libpng ]
+ ++ lib.optionals smartcardSupport [ libcacard ]
+ ++ lib.optionals spiceSupport [ spice-protocol spice ]
+ ++ lib.optionals usbredirSupport [ usbredir ]
+ ++ lib.optionals stdenv.isLinux [ alsa-lib libaio libcap_ng libcap attr ]
+ ++ lib.optionals xenSupport [ xen ]
+ ++ lib.optionals cephSupport [ ceph ]
+ ++ lib.optionals glusterfsSupport [ glusterfs libuuid ]
+ ++ lib.optionals openGLSupport [ mesa epoxy libdrm ]
+ ++ lib.optionals virglSupport [ virglrenderer ]
+ ++ lib.optionals libiscsiSupport [ libiscsi ]
+ ++ lib.optionals smbdSupport [ samba ];
dontUseMesonConfigure = true; # meson's configurePhase isn't compatible with qemu build
@@ -96,8 +95,8 @@ stdenv.mkDerivation rec {
url = "https://gitlab.com/qemu-project/qemu/-/commit/9f22893adcb02580aee5968f32baa2cd109b3ec2.patch";
sha256 = "1vkhm9vl671y4cra60b6704339qk1h5dyyb3dfvmvpsvfyh2pm7n";
})
- ] ++ optional nixosTestRunner ./force-uid0-on-9p.patch
- ++ optionals stdenv.hostPlatform.isMusl [
+ ] ++ lib.optional nixosTestRunner ./force-uid0-on-9p.patch
+ ++ lib.optionals stdenv.hostPlatform.isMusl [
(fetchpatch {
url = "https://raw.githubusercontent.com/alpinelinux/aports/2bb133986e8fa90e2e76d53369f03861a87a74ef/main/qemu/xattr_size_max.patch";
sha256 = "1xfdjs1jlvs99hpf670yianb8c3qz2ars8syzyz8f2c2cp5y4bxb";
@@ -149,36 +148,35 @@ stdenv.mkDerivation rec {
--replace '$source_path/VERSION' '$source_path/QEMU_VERSION'
substituteInPlace meson.build \
--replace "'VERSION'" "'QEMU_VERSION'"
- '' + optionalString stdenv.hostPlatform.isMusl ''
+ '' + lib.optionalString stdenv.hostPlatform.isMusl ''
NIX_CFLAGS_COMPILE+=" -D_LINUX_SYSINFO_H"
'';
- configureFlags =
- [ "--audio-drv-list=${audio}"
- "--enable-docs"
- "--enable-tools"
- "--enable-guest-agent"
- "--localstatedir=/var"
- "--sysconfdir=/etc"
- ]
- ++ optional numaSupport "--enable-numa"
- ++ optional seccompSupport "--enable-seccomp"
- ++ optional smartcardSupport "--enable-smartcard"
- ++ optional spiceSupport "--enable-spice"
- ++ optional usbredirSupport "--enable-usb-redir"
- ++ optional (hostCpuTargets != null) "--target-list=${lib.concatStringsSep "," hostCpuTargets}"
- ++ optional stdenv.isDarwin "--enable-cocoa"
- ++ optional stdenv.isDarwin "--enable-hvf"
- ++ optional stdenv.isLinux "--enable-linux-aio"
- ++ optional gtkSupport "--enable-gtk"
- ++ optional xenSupport "--enable-xen"
- ++ optional cephSupport "--enable-rbd"
- ++ optional glusterfsSupport "--enable-glusterfs"
- ++ optional openGLSupport "--enable-opengl"
- ++ optional virglSupport "--enable-virglrenderer"
- ++ optional tpmSupport "--enable-tpm"
- ++ optional libiscsiSupport "--enable-libiscsi"
- ++ optional smbdSupport "--smbd=${samba}/bin/smbd";
+ configureFlags = [
+ "--audio-drv-list=${audio}"
+ "--enable-docs"
+ "--enable-tools"
+ "--enable-guest-agent"
+ "--localstatedir=/var"
+ "--sysconfdir=/etc"
+ ] ++ lib.optional numaSupport "--enable-numa"
+ ++ lib.optional seccompSupport "--enable-seccomp"
+ ++ lib.optional smartcardSupport "--enable-smartcard"
+ ++ lib.optional spiceSupport "--enable-spice"
+ ++ lib.optional usbredirSupport "--enable-usb-redir"
+ ++ lib.optional (hostCpuTargets != null) "--target-list=${lib.concatStringsSep "," hostCpuTargets}"
+ ++ lib.optional stdenv.isDarwin "--enable-cocoa"
+ ++ lib.optional stdenv.isDarwin "--enable-hvf"
+ ++ lib.optional stdenv.isLinux "--enable-linux-aio"
+ ++ lib.optional gtkSupport "--enable-gtk"
+ ++ lib.optional xenSupport "--enable-xen"
+ ++ lib.optional cephSupport "--enable-rbd"
+ ++ lib.optional glusterfsSupport "--enable-glusterfs"
+ ++ lib.optional openGLSupport "--enable-opengl"
+ ++ lib.optional virglSupport "--enable-virglrenderer"
+ ++ lib.optional tpmSupport "--enable-tpm"
+ ++ lib.optional libiscsiSupport "--enable-libiscsi"
+ ++ lib.optional smbdSupport "--smbd=${samba}/bin/smbd";
doCheck = false; # tries to access /dev
dontWrapGApps = true;
@@ -190,7 +188,7 @@ stdenv.mkDerivation rec {
# copy qemu-ga (guest agent) to separate output
mkdir -p $ga/bin
cp $out/bin/qemu-ga $ga/bin/
- '' + optionalString gtkSupport ''
+ '' + lib.optionalString gtkSupport ''
# wrap GTK Binaries
for f in $out/bin/qemu-system-*; do
wrapGApp $f
diff --git a/pkgs/applications/window-managers/river/default.nix b/pkgs/applications/window-managers/river/default.nix
index 317c08c5d894..5c809097ee17 100644
--- a/pkgs/applications/window-managers/river/default.nix
+++ b/pkgs/applications/window-managers/river/default.nix
@@ -19,13 +19,13 @@
stdenv.mkDerivation rec {
pname = "river";
- version = "unstable-2021-06-27";
+ version = "unstable-2021-08-03";
src = fetchFromGitHub {
owner = "ifreund";
repo = pname;
- rev = "39578db1344ca298f2bb2fe2278a35108d5f2b66";
- sha256 = "sha256-DQroN+FV7sq0PyczERZgnW73YKAVvj2JJQjfzidlBI8=";
+ rev = "2fc0875a3e17a0328d14d0c6323bd8022d5b15de";
+ sha256 = "sha256-Cs9RRubxy0DY6ILRZY36HtcoqBvzbN7NEfpREq1KBBQ=";
fetchSubmodules = true;
};
diff --git a/pkgs/data/icons/papirus-icon-theme/default.nix b/pkgs/data/icons/papirus-icon-theme/default.nix
index adc2c5fb197c..0709441d41bc 100644
--- a/pkgs/data/icons/papirus-icon-theme/default.nix
+++ b/pkgs/data/icons/papirus-icon-theme/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "papirus-icon-theme";
- version = "20210701";
+ version = "20210802";
src = fetchFromGitHub {
owner = "PapirusDevelopmentTeam";
repo = pname;
rev = version;
- sha256 = "sha256-eqSZBcypwnNX92SGG17MWlnsVzk0jOTdjtEaWMbQsMs=";
+ sha256 = "sha256-run7F1iGq1h7o06zS/RNpCMhK5WDH++knLN+MvMcSy8=";
};
nativeBuildInputs = [ gtk3 ];
diff --git a/pkgs/data/themes/whitesur/default.nix b/pkgs/data/themes/whitesur/default.nix
index e9691eaad7d6..c158cc8a00ce 100644
--- a/pkgs/data/themes/whitesur/default.nix
+++ b/pkgs/data/themes/whitesur/default.nix
@@ -2,6 +2,7 @@
, stdenv
, fetchFromGitHub
, glib
+, gnome-shell
, gnome-themes-extra
, libxml2
, sassc
@@ -10,17 +11,18 @@
stdenv.mkDerivation rec {
pname = "whitesur-gtk-theme";
- version = "2021-06-23";
+ version = "2021-07-27";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = pname;
rev = version;
- sha256 = "075fw57mv6zadq4dryn8bg2b3vq8inmisq18s758cv53pprxh9hw";
+ sha256 = "17x4lqlv6whx8vg0c1nm89j7671l033apn4alqyhjb9qx5w2fa43";
};
nativeBuildInputs = [
glib
+ gnome-shell
libxml2
sassc
util-linux
@@ -35,6 +37,9 @@ stdenv.mkDerivation rec {
# Do not provide `sudo`, as it is not needed in our use case of the install script
substituteInPlace lib-core.sh --replace '$(which sudo)' false
+
+ # Provides a dummy home directory
+ substituteInPlace lib-core.sh --replace 'MY_HOME=$(getent passwd "''${MY_USERNAME}" | cut -d: -f6)' 'MY_HOME=/tmp'
'';
dontBuild = true;
diff --git a/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch b/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch
new file mode 100644
index 000000000000..8de4c9f57f6a
--- /dev/null
+++ b/pkgs/development/compilers/dictu/0001-force-sqlite-to-be-found.patch
@@ -0,0 +1,46 @@
+From bb4767f8fc413ca4cb42879a9a226fd26f10e094 Mon Sep 17 00:00:00 2001
+From: Lucas Ransan
+Date: Tue, 3 Aug 2021 20:39:11 +0200
+Subject: [PATCH] force sqlite to be found
+
+---
+ src/CMakeLists.txt | 16 +++++-----------
+ 1 file changed, 5 insertions(+), 11 deletions(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index a0f3fee..58b4d0b 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -9,7 +9,7 @@ set(INCLUDE_DIR include/)
+ list(FILTER sources EXCLUDE REGEX "(main|linenoise|utf8).c")
+ list(FILTER headers EXCLUDE REGEX "(linenoise|utf8).h")
+
+-find_library(SQLITE_LIB SQLite3)
++find_package(SQLite3 REQUIRED)
+ set(THREADS)
+
+ if(DISABLE_HTTP)
+@@ -20,16 +20,10 @@ else()
+ list(APPEND libraries curl)
+ endif()
+
+-if(NOT SQLITE_LIB)
+- set(THREADS_PREFER_PTHREAD_FLAG ON)
+- find_package(Threads REQUIRED)
+- set(THREADS Threads::Threads)
+-else()
+- list(FILTER sources EXCLUDE REGEX "sqlite3.c")
+- list(FILTER headers EXCLUDE REGEX "sqlite3.h")
+- list(APPEND libraries ${SQLITE_LIB})
+- add_compile_definitions(INCLUDE_SQLITE_LIB)
+-endif()
++list(FILTER sources EXCLUDE REGEX "sqlite3.c")
++list(FILTER headers EXCLUDE REGEX "sqlite3.h")
++list(APPEND libraries ${SQLite3_LIBRARIES})
++add_compile_definitions(SQLite3_INCLUDE_DIR)
+
+ if(WIN32)
+ # ws2_32 is required for winsock2.h to work correctly
+--
+2.32.0
+
diff --git a/pkgs/development/compilers/dictu/default.nix b/pkgs/development/compilers/dictu/default.nix
new file mode 100644
index 000000000000..c67afee81dbe
--- /dev/null
+++ b/pkgs/development/compilers/dictu/default.nix
@@ -0,0 +1,84 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, cmake
+, sqlite
+, httpSupport ? true, curl
+, cliSupport ? true
+, linenoiseSupport ? cliSupport, linenoise
+, enableLTO ? stdenv.cc.isGNU
+}:
+
+assert enableLTO -> stdenv.cc.isGNU;
+
+stdenv.mkDerivation rec {
+ pname = "dictu";
+ version = "0.19.0";
+
+ src = fetchFromGitHub {
+ owner = "dictu-lang";
+ repo = pname;
+ rev = "v${version}";
+ sha256 = "5Sfmzz4I0dhcbz14LmXx5cHELRFENunLbZmU93uSEJo=";
+ };
+
+ nativeBuildInputs = [ cmake ];
+
+ buildInputs = [
+ sqlite
+ ] ++ lib.optional httpSupport curl
+ ++ lib.optional linenoiseSupport linenoise;
+
+ patches = [
+ ./0001-force-sqlite-to-be-found.patch
+ ];
+
+ postPatch = lib.optionalString (!enableLTO) ''
+ sed -i src/CMakeLists.txt \
+ -e 's/-flto/${lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"}/'
+ '';
+
+ cmakeFlags = [
+ "-DBUILD_CLI=${if cliSupport then "ON" else "OFF"}"
+ "-DDISABLE_HTTP=${if httpSupport then "OFF" else "ON"}"
+ "-DDISABLE_LINENOISE=${if linenoiseSupport then "OFF" else "ON"}"
+ ] ++ lib.optionals enableLTO [ # TODO: LTO with LLVM
+ "-DCMAKE_AR=${stdenv.cc.cc}/bin/gcc-ar"
+ "-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
+ ];
+
+ doCheck = cliSupport;
+
+ preCheck = ''
+ cd ..
+ sed -i tests/runTests.du \
+ -e '/http/d'
+ sed -i tests/path/realpath.du \
+ -e 's/usr/build/g'
+ sed -i tests/path/isDir.du \
+ -e 's,/usr/bin,/build/source,' \
+ -e '/home/d'
+ '';
+
+ checkPhase = ''
+ runHook preCheck
+ ./dictu tests/runTests.du
+ '';
+
+ installPhase = ''
+ mkdir -p $out
+ cp -r /build/source/src/include $out/include
+ mkdir -p $out/lib
+ cp /build/source/build/src/libdictu_api* $out/lib
+ '' + lib.optionalString cliSupport ''
+ install -Dm755 /build/source/dictu $out/bin/dictu
+ '';
+
+ meta = with lib; {
+ description = "High-level dynamically typed, multi-paradigm, interpreted programming language";
+ homepage = "https://dictu-lang.com";
+ license = licenses.mit;
+ maintainers = with maintainers; [ luc65r ];
+ platforms = platforms.all;
+ };
+}
diff --git a/pkgs/development/compilers/graalvm/community-edition.nix b/pkgs/development/compilers/graalvm/community-edition.nix
deleted file mode 100644
index ef35ce9d0c42..000000000000
--- a/pkgs/development/compilers/graalvm/community-edition.nix
+++ /dev/null
@@ -1,288 +0,0 @@
-{ stdenv
-, lib
-, fetchurl
-, autoPatchelfHook
-, setJavaClassPath
-, makeWrapper
-# minimum dependencies
-, Foundation
-, alsa-lib
-, fontconfig
-, freetype
-, glibc
-, openssl
-, perl
-, unzip
-, xorg
-, zlib
-# runtime dependencies
-, cups
-# runtime dependencies for GTK+ Look and Feel
-, gtkSupport ? true
-, cairo
-, glib
-, gtk3
-}:
-
-let
- platform = if stdenv.isDarwin then "darwin-amd64" else "linux-amd64";
- runtimeDependencies = [
- cups
- ] ++ lib.optionals gtkSupport [
- cairo glib gtk3
- ];
- runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
- common = javaVersion:
- let
- javaVersionPlatform = "${javaVersion}-${platform}";
- graalvmXXX-ce = stdenv.mkDerivation rec {
- pname = "graalvm${javaVersion}-ce";
- version = "21.0.0";
- srcs = [
- (fetchurl {
- sha256 = { "8-linux-amd64" = "18q1plrpclp02rlwn3vvv2fcyspvqv2gkzn14f0b59pnladmlv1j";
- "11-linux-amd64" = "1g1xjbr693rimdy2cy6jvz4vgnbnw76wa87xcmaszka206fmpnsc";
- "8-darwin-amd64" = "0giv8f7ybdykadzmxjy91i6njbdx6dclyx7g6vyhwk2l1cvxi4li";
- "11-darwin-amd64" = "1a8gjp6fp11ms05pd62h1x1ifkkr3wv0hrxic670v90bbps9lsqf";
- }.${javaVersionPlatform};
- url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/graalvm-ce-java${javaVersionPlatform}-${version}.tar.gz";
- })
- (fetchurl {
- sha256 = { "8-linux-amd64" = "0hpq2g9hc8b7j4d8a08kq1mnl6pl7a4kwaj0a3gka3d4m6r7cscg";
- "11-linux-amd64" = "0z3hb2bf0lqzw760civ3h1wvx22a75n7baxc0l2i9h5wxas002y7";
- "8-darwin-amd64" = "1izbgl4hjg5jyi422xnkx006qnw163r1i1djf76q1plms40y01ph";
- "11-darwin-amd64" = "1d9z75gil0if74ndla9yw3xx9i2bfbcs32qa0z6wi5if66cmknb8";
- }.${javaVersionPlatform};
- url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/native-image-installable-svm-java${javaVersionPlatform}-${version}.jar";
- })
- (fetchurl {
- sha256 = { "8-linux-amd64" = "122p8psgmzhqnjb2fy1lwghg0kw5qa8xkzgyjp682lwg4j8brz43";
- "11-linux-amd64" = "1vdc90m6s013cbhmj58nb4vyxllbxirw0idlgv0iv9cyhx90hzgz";
- "8-darwin-amd64" = "04q0s9xsaskqn9kbhz0mgdk28j2qnxrzqfmw6jn2znr8s8jsc6yp";
- "11-darwin-amd64" = "1pw4xd8g5cc9bm52awmm1zxs96ijws43vws7y10wxa6a0nhv7z5f";
- }.${javaVersionPlatform};
- url = "https://github.com/oracle/truffleruby/releases/download/vm-${version}/ruby-installable-svm-java${javaVersionPlatform}-${version}.jar";
- })
- (fetchurl {
- sha256 = { "8-linux-amd64" = "19m7n4f5jrmsfvgv903sarkcjh55l0nlnw99lvjlcafw5hqzyb91";
- "11-linux-amd64" = "18ibb7l7b4hmbnvyr8j7mrs11mvlsf2j0c8rdd2s93x2114f26ba";
- "8-darwin-amd64" = "1zlzi00339kvg4ym2j75ypfkzn8zbwdpriqmkaz4fh28qjmc1dwq";
- "11-darwin-amd64" = "0x301i1fimakhi2x29ldr0fsqkb3qs0g9jsmjv27d62dpqx8kgc8";
- }.${javaVersionPlatform};
- url = "https://github.com/graalvm/graalpython/releases/download/vm-${version}/python-installable-svm-java${javaVersionPlatform}-${version}.jar";
- })
- (fetchurl {
- sha256 = { "8-linux-amd64" = "0dlgbg6kri89r9zbk6n0ch3g8356j1g35bwjng87c2y5y0vcw0b5";
- "11-linux-amd64" = "1yby65hww6zmd2g5pjwbq5pv3iv4gfv060b8fq75fjhwrisyj5gd";
- "8-darwin-amd64" = "1smdj491g23i3z7p5rybid18nnz8bphrqjkv0lg2ffyrpn8k6g93";
- "11-darwin-amd64" = "056zyn0lpd7741k1szzjwwacka0g7rn0j4ypfmav4h1245mjg8lx";
- }.${javaVersionPlatform};
- url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/wasm-installable-svm-java${javaVersionPlatform}-${version}.jar";
- })
- ];
-
- buildInputs = lib.optionals stdenv.isLinux [
- alsa-lib # libasound.so wanted by lib/libjsound.so
- fontconfig
- freetype
- openssl # libssl.so wanted by languages/ruby/lib/mri/openssl.so
- stdenv.cc.cc.lib # libstdc++.so.6
- xorg.libX11
- xorg.libXext
- xorg.libXi
- xorg.libXrender
- xorg.libXtst
- zlib
- ];
-
- # Workaround for libssl.so.10 wanted by TruffleRuby
- # Resulting TruffleRuby cannot use `openssl` library.
- autoPatchelfIgnoreMissingDeps = true;
-
- nativeBuildInputs = [ unzip perl autoPatchelfHook makeWrapper ];
-
- unpackPhase = ''
- unpack_jar() {
- jar=$1
- unzip -q -o $jar -d $out
- perl -ne 'use File::Path qw(make_path);
- use File::Basename qw(dirname);
- if (/^(.+) = (.+)$/) {
- make_path dirname("$ENV{out}/$1");
- system "ln -s $2 $ENV{out}/$1";
- }' $out/META-INF/symlinks
- perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) {
- my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) +
- ($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) +
- ($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0);
- chmod $mode, "$ENV{out}/$1";
- }' $out/META-INF/permissions
- rm -rf $out/META-INF
- }
-
- mkdir -p $out
- arr=($srcs)
-
- # The tarball on Linux has the following directory structure:
- #
- # graalvm-ce-java11-20.3.0/*
- #
- # while on Darwin it looks like this:
- #
- # graalvm-ce-java11-20.3.0/Contents/Home/*
- #
- # We therefor use --strip-components=1 vs 3 depending on the platform.
- tar xf ''${arr[0]} -C $out --strip-components=${if stdenv.isLinux then "1" else "3"}
-
- # Sanity check
- if [ ! -d $out/bin ]; then
- echo "The `bin` is directory missing after extracting the graalvm"
- echo "tarball, please compare the directory structure of the"
- echo "tarball with what happens in the unpackPhase (in particular"
- echo "with regards to the `--strip-components` flag)."
- exit 1
- fi
-
- unpack_jar ''${arr[1]}
- unpack_jar ''${arr[2]}
- unpack_jar ''${arr[3]}
- unpack_jar ''${arr[4]}
- '';
-
- installPhase = {
- "8-linux-amd64" = ''
- # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
- substituteInPlace $out/jre/lib/security/java.security \
- --replace file:/dev/random file:/dev/./urandom \
- --replace NativePRNGBlocking SHA1PRNG
-
- # provide libraries needed for static compilation
- for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
- ln -s $f $out/jre/lib/svm/clibraries/${platform}/$(basename $f)
- done
-
- # allow using external truffle-api.jar and languages not included in the distrubution
- rm $out/jre/lib/jvmci/parentClassLoader.classpath
- '';
- "11-linux-amd64" = ''
- # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
- substituteInPlace $out/conf/security/java.security \
- --replace file:/dev/random file:/dev/./urandom \
- --replace NativePRNGBlocking SHA1PRNG
-
- # provide libraries needed for static compilation
- for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
- ln -s $f $out/lib/svm/clibraries/${platform}/$(basename $f)
- done
- '';
- "8-darwin-amd64" = ''
- # allow using external truffle-api.jar and languages not included in the distrubution
- rm $out/jre/lib/jvmci/parentClassLoader.classpath
- '';
- "11-darwin-amd64" = ''
- # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
- substituteInPlace $out/conf/security/java.security \
- --replace file:/dev/random file:/dev/./urandom \
- --replace NativePRNGBlocking SHA1PRNG
- '';
- }.${javaVersionPlatform} + ''
- # jni.h expects jni_md.h to be in the header search path.
- ln -s $out/include/linux/*_md.h $out/include/
- '';
-
- dontStrip = true;
-
- preFixup = ''
- # We cannot use -exec since wrapProgram is a function but not a
- # command.
- #
- # jspawnhelper is executed from JVM, so it doesn't need to wrap it,
- # and it breaks building OpenJDK (#114495).
- for bin in $( find "$out" -executable -type f -not -path '*/languages/ruby/lib/gems/*' -not -name jspawnhelper ); do
- if patchelf --print-interpreter "$bin" &> /dev/null || head -n 1 "$bin" | grep '^#!' -q; then
- wrapProgram "$bin" \
- --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
- fi
- done
-
- # copy-paste openjdk's preFixup
- # Set JAVA_HOME automatically.
- mkdir -p $out/nix-support
- cat < $out/nix-support/setup-hook
- if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
- EOF
-
- find "$out" -name libfontmanager.so -exec \
- patchelf --add-needed libfontconfig.so {} \;
- '';
-
- # $out/bin/native-image needs zlib to build native executables.
- propagatedBuildInputs = [ setJavaClassPath zlib ] ++
- # On Darwin native-image calls clang and it
- # tries to include ,
- # and Interactive Ruby (irb) requires OpenSSL
- # headers.
- lib.optionals stdenv.hostPlatform.isDarwin [ Foundation openssl ];
-
- doInstallCheck = true;
- installCheckPhase = ''
- echo ${lib.escapeShellArg ''
- public class HelloWorld {
- public static void main(String[] args) {
- System.out.println("Hello World");
- }
- }
- ''} > HelloWorld.java
- $out/bin/javac HelloWorld.java
-
- # run on JVM with Graal Compiler
- $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World'
-
- # Ahead-Of-Time compilation
- $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces --no-server HelloWorld
- ./helloworld | fgrep 'Hello World'
-
- ${lib.optionalString stdenv.isLinux ''
- # Ahead-Of-Time compilation with --static
- # --static flag doesn't work for darwin
- $out/bin/native-image --no-server --static HelloWorld
- ./helloworld | fgrep 'Hello World'
- ''}
-
- echo "Testing interpreted languages"
- $out/bin/graalpython -c 'print(1 + 1)'
- $out/bin/ruby -e 'puts(1 + 1)'
- $out/bin/node -e 'console.log(1 + 1)'
-
- echo '1 + 1' | $out/bin/graalpython
-
- ${lib.optionalString stdenv.isLinux ''
- # TODO: `irb` on MacOS gives an error saying "Could not find OpenSSL
- # headers, install via Homebrew or MacPorts or set OPENSSL_PREFIX", even
- # though `openssl` is in `propagatedBuildInputs`. For more details see:
- # https://github.com/NixOS/nixpkgs/pull/105815
- echo '1 + 1' | $out/bin/irb
- ''}
-
- echo '1 + 1' | $out/bin/node -i
- ${lib.optionalString (javaVersion == "11" && stdenv.isLinux) ''
- # Doesn't work on MacOS, we have this error: "Launching JShell execution engine threw: Operation not permitted (Bind failed)"
- echo '1 + 1' | $out/bin/jshell
- ''}'';
-
- passthru.home = graalvmXXX-ce;
-
- meta = with lib; {
- homepage = "https://www.graalvm.org/";
- description = "High-Performance Polyglot VM";
- license = with licenses; [ upl gpl2Classpath bsd3 ];
- maintainers = with maintainers; [ bandresen volth hlolli glittershark babariviere ];
- platforms = [ "x86_64-linux" "x86_64-darwin" ];
- };
- };
- in
- graalvmXXX-ce;
-in {
- graalvm8-ce = common "8";
- graalvm11-ce = common "11";
-}
diff --git a/pkgs/development/compilers/graalvm/community-edition/default.nix b/pkgs/development/compilers/graalvm/community-edition/default.nix
new file mode 100644
index 000000000000..54cc917a5be0
--- /dev/null
+++ b/pkgs/development/compilers/graalvm/community-edition/default.nix
@@ -0,0 +1,21 @@
+{ callPackage, Foundation }:
+
+let
+ mkGraal = opts: callPackage (import ./repository.nix opts) {
+ inherit Foundation;
+ };
+in {
+ inherit mkGraal;
+
+ graalvm8-ce = mkGraal rec {
+ version = "21.2.0";
+ javaVersion = "8";
+ platforms = ["x86_64-linux"];
+ };
+
+ graalvm11-ce = mkGraal rec {
+ version = "21.2.0";
+ javaVersion = "11";
+ platforms = ["x86_64-linux" "x86_64-darwin"];
+ };
+}
diff --git a/pkgs/development/compilers/graalvm/community-edition/repository.nix b/pkgs/development/compilers/graalvm/community-edition/repository.nix
new file mode 100644
index 000000000000..50a3b53c579c
--- /dev/null
+++ b/pkgs/development/compilers/graalvm/community-edition/repository.nix
@@ -0,0 +1,271 @@
+{ version, javaVersion, platforms }:
+
+{ stdenv, lib, fetchurl, autoPatchelfHook, setJavaClassPath, makeWrapper
+# minimum dependencies
+, Foundation, alsa-lib, fontconfig, freetype, glibc, openssl, perl, unzip, xorg
+, zlib
+# runtime dependencies
+, cups
+# runtime dependencies for GTK+ Look and Feel
+, gtkSupport ? true, cairo, glib, gtk3 }:
+
+let
+ platform = if stdenv.isDarwin then "darwin-amd64" else "linux-amd64";
+ runtimeDependencies = [ cups ]
+ ++ lib.optionals gtkSupport [ cairo glib gtk3 ];
+ runtimeLibraryPath = lib.makeLibraryPath runtimeDependencies;
+ javaVersionPlatform = "${javaVersion}-${platform}";
+ graalvmXXX-ce = stdenv.mkDerivation rec {
+ name = "graalvm${javaVersion}-ce";
+ srcs = [
+ (fetchurl {
+ sha256 = {
+ "8-linux-amd64" = "01gyxjmfp7wpcyn7x8b184fn0lp3xryfw619bqch120pzvr6z88f";
+ "11-linux-amd64" = "0w7lhvxm4nggqdcl4xrhdd3y6dqw9jhyca9adjkp508n4lqf1lxv";
+ "11-darwin-amd64" = "0dnahicdl0vhrbiml9z9nbb7k75hbsjj8rs246i1lwril12dqb7n";
+ }.${javaVersionPlatform};
+ url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/graalvm-ce-java${javaVersionPlatform}-${version}.tar.gz";
+ })
+ (fetchurl {
+ sha256 = {
+ "8-linux-amd64" = "1jlvrxdlbsmlk3ia43h9m29kmmdn83h6zdlnf8qb7bm38c84nhsc";
+ "11-linux-amd64" = "1ybd7a6ii6582skr0nkxx7bccsa7gkg0yriql2h1lcz0rfzcdi3g";
+ "11-darwin-amd64" = "1jdy845vanmz05zx5b9227gb1msh9wdrz2kf3fx9z54ssd9qgdhm";
+ }.${javaVersionPlatform};
+ url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/native-image-installable-svm-java${javaVersionPlatform}-${version}.jar";
+ })
+ (fetchurl {
+ sha256 = {
+ "8-linux-amd64" = "18ip0ay06q1pryqs8ja988mvk9vw475c0nfjcznnsd1zp296p6jc";
+ "11-linux-amd64" = "1jszz97mkqavxzyhx5jxhi43kqjxk9c36j5l5hy3kn8sdfmbplm4";
+ "11-darwin-amd64" = "1767ryhv2cn5anlys63ysax1p8ag79bykac1xfrjfan8yv6d8ybl";
+ }.${javaVersionPlatform};
+ url = "https://github.com/oracle/truffleruby/releases/download/vm-${version}/ruby-installable-svm-java${javaVersionPlatform}-${version}.jar";
+ })
+ (fetchurl {
+ sha256 = {
+ "8-linux-amd64" = "0il15438qnikqsxdsl7fcdg0c8zs3cbm4ry7pys7fxxr1ckd8szq";
+ "11-linux-amd64" = "07759sr8nijvqm8aqn69x9vq7lyppns7a6l6xribv43jvfmwpfkl";
+ "11-darwin-amd64" = "01l3as8dihc7xqy5sdkrpxmpzrqbcvvg84m2s6j1j8y2db1khf2s";
+ }.${javaVersionPlatform};
+ url = "https://github.com/graalvm/graalpython/releases/download/vm-${version}/python-installable-svm-java${javaVersionPlatform}-${version}.jar";
+ })
+ (fetchurl {
+ sha256 = {
+ "8-linux-amd64" = "08s36rjy5irg25b7lqx0m4v2wpywin3cqyhdrywhvq14f7zshsd5";
+ "11-linux-amd64" = "1ybjaknmbsdg8qzb986x39fq0h7fyiymdcigc7y86swk8dd916hv";
+ "11-darwin-amd64" = "02dwlb62kqr4rjjmvkhn2xk9l1p47ahg9xyyfkw7im1jwlqmqnzf";
+ }.${javaVersionPlatform};
+ url = "https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${version}/wasm-installable-svm-java${javaVersionPlatform}-${version}.jar";
+ })
+ ];
+
+ buildInputs = lib.optionals stdenv.isLinux [
+ alsa-lib # libasound.so wanted by lib/libjsound.so
+ fontconfig
+ freetype
+ openssl # libssl.so wanted by languages/ruby/lib/mri/openssl.so
+ stdenv.cc.cc.lib # libstdc++.so.6
+ xorg.libX11
+ xorg.libXext
+ xorg.libXi
+ xorg.libXrender
+ xorg.libXtst
+ zlib
+ ];
+
+ # Workaround for libssl.so.10 wanted by TruffleRuby
+ # Resulting TruffleRuby cannot use `openssl` library.
+ autoPatchelfIgnoreMissingDeps = true;
+
+ nativeBuildInputs = [ unzip perl autoPatchelfHook makeWrapper ];
+
+ unpackPhase = ''
+ unpack_jar() {
+ jar=$1
+ unzip -q -o $jar -d $out
+ perl -ne 'use File::Path qw(make_path);
+ use File::Basename qw(dirname);
+ if (/^(.+) = (.+)$/) {
+ make_path dirname("$ENV{out}/$1");
+ system "ln -s $2 $ENV{out}/$1";
+ }' $out/META-INF/symlinks
+ perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) {
+ my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) +
+ ($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) +
+ ($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0);
+ chmod $mode, "$ENV{out}/$1";
+ }' $out/META-INF/permissions
+ rm -rf $out/META-INF
+ }
+
+ mkdir -p $out
+ arr=($srcs)
+
+ # The tarball on Linux has the following directory structure:
+ #
+ # graalvm-ce-java11-20.3.0/*
+ #
+ # while on Darwin it looks like this:
+ #
+ # graalvm-ce-java11-20.3.0/Contents/Home/*
+ #
+ # We therefor use --strip-components=1 vs 3 depending on the platform.
+ tar xf ''${arr[0]} -C $out --strip-components=${
+ if stdenv.isLinux then "1" else "3"
+ }
+
+ # Sanity check
+ if [ ! -d $out/bin ]; then
+ echo "The `bin` is directory missing after extracting the graalvm"
+ echo "tarball, please compare the directory structure of the"
+ echo "tarball with what happens in the unpackPhase (in particular"
+ echo "with regards to the `--strip-components` flag)."
+ exit 1
+ fi
+
+ unpack_jar ''${arr[1]}
+ unpack_jar ''${arr[2]}
+ unpack_jar ''${arr[3]}
+ unpack_jar ''${arr[4]}
+ '';
+
+ installPhase = {
+ "8-linux-amd64" = ''
+ # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
+ substituteInPlace $out/jre/lib/security/java.security \
+ --replace file:/dev/random file:/dev/./urandom \
+ --replace NativePRNGBlocking SHA1PRNG
+
+ # provide libraries needed for static compilation
+ for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
+ ln -s $f $out/jre/lib/svm/clibraries/${platform}/$(basename $f)
+ done
+
+ # allow using external truffle-api.jar and languages not included in the distrubution
+ rm $out/jre/lib/jvmci/parentClassLoader.classpath
+ '';
+ "11-linux-amd64" = ''
+ # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
+ substituteInPlace $out/conf/security/java.security \
+ --replace file:/dev/random file:/dev/./urandom \
+ --replace NativePRNGBlocking SHA1PRNG
+
+ # provide libraries needed for static compilation
+ for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
+ ln -s $f $out/lib/svm/clibraries/${platform}/$(basename $f)
+ done
+ '';
+ "11-darwin-amd64" = ''
+ # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
+ substituteInPlace $out/conf/security/java.security \
+ --replace file:/dev/random file:/dev/./urandom \
+ --replace NativePRNGBlocking SHA1PRNG
+ '';
+ }.${javaVersionPlatform} + ''
+ # jni.h expects jni_md.h to be in the header search path.
+ ln -s $out/include/linux/*_md.h $out/include/
+ '';
+
+ dontStrip = true;
+
+ preFixup = ''
+ # We cannot use -exec since wrapProgram is a function but not a
+ # command.
+ #
+ # jspawnhelper is executed from JVM, so it doesn't need to wrap it,
+ # and it breaks building OpenJDK (#114495).
+ for bin in $( find "$out" -executable -type f -not -path '*/languages/ruby/lib/gems/*' -not -name jspawnhelper ); do
+ if patchelf --print-interpreter "$bin" &> /dev/null || head -n 1 "$bin" | grep '^#!' -q; then
+ wrapProgram "$bin" \
+ --prefix LD_LIBRARY_PATH : "${runtimeLibraryPath}"
+ fi
+ done
+
+ # copy-paste openjdk's preFixup
+ # Set JAVA_HOME automatically.
+ mkdir -p $out/nix-support
+ cat < $out/nix-support/setup-hook
+ if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+ EOF
+
+ find "$out" -name libfontmanager.so -exec \
+ patchelf --add-needed libfontconfig.so {} \;
+ '';
+
+ # $out/bin/native-image needs zlib to build native executables.
+ propagatedBuildInputs = [ setJavaClassPath zlib ] ++
+ # On Darwin native-image calls clang and it
+ # tries to include ,
+ # and Interactive Ruby (irb) requires OpenSSL
+ # headers.
+ lib.optionals stdenv.hostPlatform.isDarwin [ Foundation openssl ];
+
+ doInstallCheck = true;
+ installCheckPhase = ''
+ echo ${
+ lib.escapeShellArg ''
+ public class HelloWorld {
+ public static void main(String[] args) {
+ System.out.println("Hello World");
+ }
+ }
+ ''
+ } > HelloWorld.java
+ $out/bin/javac HelloWorld.java
+
+ # run on JVM with Graal Compiler
+ $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World'
+
+ # Ahead-Of-Time compilation
+ $out/bin/native-image -H:-CheckToolchain -H:+ReportExceptionStackTraces --no-server HelloWorld
+ ./helloworld | fgrep 'Hello World'
+
+ ${
+ lib.optionalString stdenv.isLinux ''
+ # Ahead-Of-Time compilation with --static
+ # --static flag doesn't work for darwin
+ $out/bin/native-image --no-server --static HelloWorld
+ ./helloworld | fgrep 'Hello World'
+ ''
+ }
+
+ echo "Testing interpreted languages"
+ $out/bin/graalpython -c 'print(1 + 1)'
+ $out/bin/ruby -e 'puts(1 + 1)'
+
+ echo '1 + 1' | $out/bin/graalpython
+
+ ${
+ lib.optionalString stdenv.isLinux ''
+ # TODO: `irb` on MacOS gives an error saying "Could not find OpenSSL
+ # headers, install via Homebrew or MacPorts or set OPENSSL_PREFIX", even
+ # though `openssl` is in `propagatedBuildInputs`. For more details see:
+ # https://github.com/NixOS/nixpkgs/pull/105815
+ echo '1 + 1' | $out/bin/irb
+ ''
+ }
+
+ ${lib.optionalString (javaVersion == "11" && stdenv.isLinux) ''
+ # Doesn't work on MacOS, we have this error: "Launching JShell execution engine threw: Operation not permitted (Bind failed)"
+ echo '1 + 1' | $out/bin/jshell
+ ''}'';
+
+ passthru.home = graalvmXXX-ce;
+
+ meta = with lib; {
+ homepage = "https://www.graalvm.org/";
+ description = "High-Performance Polyglot VM";
+ license = with licenses; [ upl gpl2Classpath bsd3 ];
+ maintainers = with maintainers; [
+ bandresen
+ volth
+ hlolli
+ glittershark
+ babariviere
+ ericdallo
+ ];
+ platforms = platforms;
+ };
+ };
+in graalvmXXX-ce
diff --git a/pkgs/development/compilers/llvm/13/bintools/default.nix b/pkgs/development/compilers/llvm/13/bintools/default.nix
new file mode 100644
index 000000000000..53f7941e3369
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/bintools/default.nix
@@ -0,0 +1,29 @@
+{ runCommand, stdenv, llvm, lld, version }:
+
+let
+ prefix =
+ if stdenv.hostPlatform != stdenv.targetPlatform
+ then "${stdenv.targetPlatform.config}-"
+ else "";
+in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
+ mkdir -p $out/bin
+ for prog in ${lld}/bin/*; do
+ ln -s $prog $out/bin/${prefix}$(basename $prog)
+ done
+ for prog in ${llvm}/bin/*; do
+ ln -sf $prog $out/bin/${prefix}$(basename $prog)
+ done
+
+ ln -s ${llvm}/bin/llvm-ar $out/bin/${prefix}ar
+ ln -s ${llvm}/bin/llvm-as $out/bin/${prefix}as
+ ln -s ${llvm}/bin/llvm-dwp $out/bin/${prefix}dwp
+ ln -s ${llvm}/bin/llvm-nm $out/bin/${prefix}nm
+ ln -s ${llvm}/bin/llvm-objcopy $out/bin/${prefix}objcopy
+ ln -s ${llvm}/bin/llvm-objdump $out/bin/${prefix}objdump
+ ln -s ${llvm}/bin/llvm-ranlib $out/bin/${prefix}ranlib
+ ln -s ${llvm}/bin/llvm-readelf $out/bin/${prefix}readelf
+ ln -s ${llvm}/bin/llvm-size $out/bin/${prefix}size
+ ln -s ${llvm}/bin/llvm-strip $out/bin/${prefix}strip
+
+ ln -s ${lld}/bin/lld $out/bin/${prefix}ld
+''
diff --git a/pkgs/development/compilers/llvm/13/clang/default.nix b/pkgs/development/compilers/llvm/13/clang/default.nix
new file mode 100644
index 000000000000..cfafe43c3a5f
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/clang/default.nix
@@ -0,0 +1,123 @@
+{ lib, stdenv, llvm_meta, src, cmake, libxml2, libllvm, version, python3
+, buildLlvmTools
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+ self = stdenv.mkDerivation ({
+ pname = "clang";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/clang";
+
+ nativeBuildInputs = [ cmake python3 ]
+ ++ lib.optional enableManpages python3.pkgs.sphinx
+ ++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
+
+ buildInputs = [ libxml2 libllvm ];
+
+ cmakeFlags = [
+ "-DCMAKE_CXX_FLAGS=-std=c++14"
+ "-DCLANGD_BUILD_XPC=OFF"
+ "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
+ ] ++ lib.optionals enableManpages [
+ "-DCLANG_INCLUDE_DOCS=ON"
+ "-DLLVM_ENABLE_SPHINX=ON"
+ "-DSPHINX_OUTPUT_MAN=ON"
+ "-DSPHINX_OUTPUT_HTML=OFF"
+ "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+ ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+ "-DCLANG_TABLEGEN=${buildLlvmTools.libclang.dev}/bin/clang-tblgen"
+ ];
+
+ patches = [
+ ./purity.patch
+ # https://reviews.llvm.org/D51899
+ ./gnu-install-dirs.patch
+ ];
+
+ postPatch = ''
+ sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+ -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+ lib/Driver/ToolChains/*.cpp
+
+ # Patch for standalone doc building
+ sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+ '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+ sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+ '';
+
+ outputs = [ "out" "lib" "dev" "python" ];
+
+ # Clang expects to find LLVMgold in its own prefix
+ postInstall = ''
+ if [ -e ${libllvm.lib}/lib/LLVMgold.so ]; then
+ ln -sv ${libllvm.lib}/lib/LLVMgold.so $lib/lib
+ fi
+
+ ln -sv $out/bin/clang $out/bin/cpp
+
+ # Move libclang to 'lib' output
+ moveToOutput "lib/libclang.*" "$lib"
+ moveToOutput "lib/libclang-cpp.*" "$lib"
+ substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
+ --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
+ --replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
+
+ mkdir -p $python/bin $python/share/clang/
+ mv $out/bin/{git-clang-format,scan-view} $python/bin
+ if [ -e $out/bin/set-xcode-analyzer ]; then
+ mv $out/bin/set-xcode-analyzer $python/bin
+ fi
+ mv $out/share/clang/*.py $python/share/clang
+ rm $out/bin/c-index-test
+
+ mkdir -p $dev/bin
+ cp bin/clang-tblgen $dev/bin
+ '';
+
+ passthru = {
+ isClang = true;
+ inherit libllvm;
+ };
+
+ meta = llvm_meta // {
+ homepage = "https://clang.llvm.org/";
+ description = "A C language family frontend for LLVM";
+ longDescription = ''
+ The Clang project provides a language front-end and tooling
+ infrastructure for languages in the C language family (C, C++, Objective
+ C/C++, OpenCL, CUDA, and RenderScript) for the LLVM project.
+ It aims to deliver amazingly fast compiles, extremely useful error and
+ warning messages and to provide a platform for building great source
+ level tools. The Clang Static Analyzer and clang-tidy are tools that
+ automatically find bugs in your code, and are great examples of the sort
+ of tools that can be built using the Clang frontend as a library to
+ parse C/C++ code.
+ '';
+ };
+ } // lib.optionalAttrs enableManpages {
+ pname = "clang-manpages";
+
+ buildPhase = ''
+ make docs-clang-man
+ '';
+
+ installPhase = ''
+ mkdir -p $out/share/man/man1
+ # Manually install clang manpage
+ cp docs/man/*.1 $out/share/man/man1/
+ '';
+
+ outputs = [ "out" ];
+
+ doCheck = false;
+
+ meta = llvm_meta // {
+ description = "man page for Clang ${version}";
+ };
+ });
+in self
diff --git a/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch
new file mode 100644
index 000000000000..b834d386b4eb
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/clang/gnu-install-dirs.patch
@@ -0,0 +1,235 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9e74014134a0..976e6a1757fd 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 3.13.4)
+ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
+ project(Clang)
+
++ include(GNUInstallDirs)
++
+ set(CMAKE_CXX_STANDARD 14 CACHE STRING "C++ standard to conform to")
+ set(CMAKE_CXX_STANDARD_REQUIRED YES)
+ set(CMAKE_CXX_EXTENSIONS NO)
+@@ -416,7 +418,7 @@ include_directories(BEFORE
+
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ install(DIRECTORY include/clang include/clang-c
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ COMPONENT clang-headers
+ FILES_MATCHING
+ PATTERN "*.def"
+@@ -425,7 +427,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ )
+
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/clang
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ COMPONENT clang-headers
+ FILES_MATCHING
+ PATTERN "CMakeFiles" EXCLUDE
+@@ -445,7 +447,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
+index 704278a0e93b..d25c8d325c71 100644
+--- a/cmake/modules/AddClang.cmake
++++ b/cmake/modules/AddClang.cmake
+@@ -123,9 +123,9 @@ macro(add_clang_library name)
+ install(TARGETS ${lib}
+ COMPONENT ${lib}
+ ${export_to_clangtargets}
+- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+- RUNTIME DESTINATION bin)
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ if (NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets(install-${lib}
+@@ -170,7 +170,7 @@ macro(add_clang_tool name)
+
+ install(TARGETS ${name}
+ ${export_to_clangtargets}
+- RUNTIME DESTINATION bin
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT ${name})
+
+ if(NOT LLVM_ENABLE_IDE)
+@@ -185,7 +185,7 @@ endmacro()
+ macro(add_clang_symlink name dest)
+ add_llvm_tool_symlink(${name} ${dest} ALWAYS_GENERATE)
+ # Always generate install targets
+- llvm_install_symlink(${name} ${dest} ALWAYS_GENERATE)
++ llvm_install_symlink(${name} ${dest} ${CMAKE_INSTALL_FULL_BINDIR} ALWAYS_GENERATE)
+ endmacro()
+
+ function(clang_target_link_libraries target type)
+diff --git a/lib/Headers/CMakeLists.txt b/lib/Headers/CMakeLists.txt
+index b2c0ce8dd4a0..19e5443d8c25 100644
+--- a/lib/Headers/CMakeLists.txt
++++ b/lib/Headers/CMakeLists.txt
+@@ -215,7 +215,7 @@ set_target_properties(clang-resource-headers PROPERTIES
+ FOLDER "Misc"
+ RUNTIME_OUTPUT_DIRECTORY "${output_dir}")
+
+-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
++set(header_install_dir ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include)
+
+ install(
+ FILES ${files} ${generated_files}
+diff --git a/tools/c-index-test/CMakeLists.txt b/tools/c-index-test/CMakeLists.txt
+index ceef4b08637c..8efad5520ca4 100644
+--- a/tools/c-index-test/CMakeLists.txt
++++ b/tools/c-index-test/CMakeLists.txt
+@@ -54,7 +54,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
+index 51ff2e7e1565..1ed5f8a079a1 100644
+--- a/tools/libclang/CMakeLists.txt
++++ b/tools/libclang/CMakeLists.txt
+@@ -166,7 +166,7 @@ endif()
+ if(INTERNAL_INSTALL_PREFIX)
+ set(LIBCLANG_HEADERS_INSTALL_DESTINATION "${INTERNAL_INSTALL_PREFIX}/include")
+ else()
+- set(LIBCLANG_HEADERS_INSTALL_DESTINATION include)
++ set(LIBCLANG_HEADERS_INSTALL_DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+ endif()
+
+ install(DIRECTORY ../../include/clang-c
+@@ -196,7 +196,7 @@ foreach(PythonVersion ${CLANG_PYTHON_BINDINGS_VERSIONS})
+ COMPONENT
+ libclang-python-bindings
+ DESTINATION
+- "lib${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
++ "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/python${PythonVersion}/site-packages")
+ endforeach()
+ if(NOT LLVM_ENABLE_IDE)
+ add_custom_target(libclang-python-bindings)
+diff --git a/tools/scan-build/CMakeLists.txt b/tools/scan-build/CMakeLists.txt
+index ec0702d76f18..d25d982f51da 100644
+--- a/tools/scan-build/CMakeLists.txt
++++ b/tools/scan-build/CMakeLists.txt
+@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD)
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile})
+ list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile})
+ install(PROGRAMS bin/${BinFile}
+- DESTINATION bin
++ DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT scan-build)
+ endforeach()
+
+@@ -61,7 +61,7 @@ if(CLANG_INSTALL_SCANBUILD)
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/libexec/${LibexecFile})
+ list(APPEND Depends ${CMAKE_BINARY_DIR}/libexec/${LibexecFile})
+ install(PROGRAMS libexec/${LibexecFile}
+- DESTINATION libexec
++ DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}
+ COMPONENT scan-build)
+ endforeach()
+
+@@ -89,7 +89,7 @@ if(CLANG_INSTALL_SCANBUILD)
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/share/scan-build/${ShareFile})
+ list(APPEND Depends ${CMAKE_BINARY_DIR}/share/scan-build/${ShareFile})
+ install(FILES share/scan-build/${ShareFile}
+- DESTINATION share/scan-build
++ DESTINATION ${CMAKE_INSTALL_DATADIR}/scan-build
+ COMPONENT scan-build)
+ endforeach()
+
+diff --git a/tools/scan-view/CMakeLists.txt b/tools/scan-view/CMakeLists.txt
+index dd3d33439299..fea19c12ce70 100644
+--- a/tools/scan-view/CMakeLists.txt
++++ b/tools/scan-view/CMakeLists.txt
+@@ -19,7 +19,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()
+
+@@ -33,7 +33,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})
diff --git a/pkgs/development/compilers/llvm/13/clang/purity.patch b/pkgs/development/compilers/llvm/13/clang/purity.patch
new file mode 100644
index 000000000000..deb230a36c5b
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/clang/purity.patch
@@ -0,0 +1,28 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -487,12 +487,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+ if (!IsStatic) {
+ if (Args.hasArg(options::OPT_rdynamic))
+ CmdArgs.push_back("-export-dynamic");
+-
+- if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) {
+- CmdArgs.push_back("-dynamic-linker");
+- CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+- ToolChain.getDynamicLinker(Args)));
+- }
+ }
+
+ CmdArgs.push_back("-o");
+--
+2.11.0
diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch b/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch
new file mode 100644
index 000000000000..f6f9336ad5ad
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/compiler-rt/X86-support-extension.patch
@@ -0,0 +1,23 @@
+diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt
+index 3a66dd9c3fb..7efc85d9f9f 100644
+--- a/lib/builtins/CMakeLists.txt
++++ b/lib/builtins/CMakeLists.txt
+@@ -301,6 +301,10 @@ if (NOT MSVC)
+ i386/umoddi3.S
+ )
+
++ set(i486_SOURCES ${i386_SOURCES})
++ set(i586_SOURCES ${i386_SOURCES})
++ set(i686_SOURCES ${i386_SOURCES})
++
+ if (WIN32)
+ set(i386_SOURCES
+ ${i386_SOURCES}
+@@ -608,6 +612,7 @@ else ()
+ endif()
+
+ foreach (arch ${BUILTIN_SUPPORTED_ARCH})
++ message("arch: ${arch}")
+ if (CAN_TARGET_${arch})
+ # For ARM archs, exclude any VFP builtins if VFP is not supported
+ if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch b/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch
new file mode 100644
index 000000000000..120cfe6feb2a
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/compiler-rt/armv7l.patch
@@ -0,0 +1,32 @@
+diff -ur compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake
+--- compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake 2020-03-24 00:01:02.000000000 +0900
++++ compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2020-05-10 03:42:00.883450706 +0900
+@@ -24,7 +24,7 @@
+
+
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l)
+ set(HEXAGON hexagon)
+ set(X86 i386)
+ set(X86_64 x86_64)
+diff -ur compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt
+--- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt 2020-03-24 00:01:02.000000000 +0900
++++ compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 2020-05-10 03:44:49.468579650 +0900
+@@ -474,6 +474,7 @@
+ set(armv7_SOURCES ${arm_SOURCES})
+ set(armv7s_SOURCES ${arm_SOURCES})
+ set(armv7k_SOURCES ${arm_SOURCES})
++set(armv7l_SOURCES ${arm_SOURCES})
+ set(arm64_SOURCES ${aarch64_SOURCES})
+
+ # macho_embedded archs
+@@ -595,7 +596,7 @@
+ foreach (arch ${BUILTIN_SUPPORTED_ARCH})
+ if (CAN_TARGET_${arch})
+ # For ARM archs, exclude any VFP builtins if VFP is not supported
+- if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++ if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+ string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
+ check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
+ if(NOT COMPILER_RT_HAS_${arch}_VFP)
diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch b/pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch
new file mode 100644
index 000000000000..065959d14d46
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/compiler-rt/codesign.patch
@@ -0,0 +1,33 @@
+From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
+From: Will Dietz
+Date: Tue, 19 Sep 2017 13:13:06 -0500
+Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
+ needs it
+
+---
+ cmake/Modules/AddCompilerRT.cmake | 8 ------
+ test/asan/CMakeLists.txt | 52 ---------------------------------------
+ test/tsan/CMakeLists.txt | 47 -----------------------------------
+ 3 files changed, 107 deletions(-)
+
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index bc69ec95c419..9f100fdcec2f 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -366,14 +366,6 @@ function(add_compiler_rt_runtime name type)
+ set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
+ set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
+ endif()
+- if(APPLE)
+- # Ad-hoc sign the dylibs
+- add_custom_command(TARGET ${libname}
+- POST_BUILD
+- COMMAND codesign --sign - $
+- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR}
+- )
+- endif()
+ endif()
+
+ set(parent_target_arg)
+2.14.1
+
diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/default.nix b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix
new file mode 100644
index 000000000000..8e258e349b9d
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/compiler-rt/default.nix
@@ -0,0 +1,112 @@
+{ lib, stdenv, llvm_meta, version, src, cmake, python3, llvm, libcxxabi }:
+
+let
+
+ useLLVM = stdenv.hostPlatform.useLLVM or false;
+ bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+ haveLibc = stdenv.cc.libc != null;
+ inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation {
+ pname = "compiler-rt" + lib.optionalString (haveLibc) "-libc";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/compiler-rt";
+
+ nativeBuildInputs = [ cmake python3 llvm.dev ];
+ buildInputs = lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+ NIX_CFLAGS_COMPILE = [
+ "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+ ];
+
+ cmakeFlags = [
+ "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+ "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+ "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+ ] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
+ "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+ "-DCOMPILER_RT_BUILD_XRAY=OFF"
+ "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+ "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+ ] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
+ "-DCMAKE_C_COMPILER_WORKS=ON"
+ "-DCMAKE_CXX_COMPILER_WORKS=ON"
+ "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+ "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+ ] ++ lib.optionals (useLLVM && !haveLibc) [
+ "-DCMAKE_C_FLAGS=-nodefaultlibs"
+ ] ++ lib.optionals (useLLVM) [
+ "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+ #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+ "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
+ ] ++ lib.optionals (bareMetal) [
+ "-DCOMPILER_RT_OS_DIR=baremetal"
+ ] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
+ "-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
+ "-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.darwinArch}"
+ "-DDARWIN_osx_BUILTIN_ARCHS=${stdenv.hostPlatform.darwinArch}"
+ ];
+
+ outputs = [ "out" "dev" ];
+
+ patches = [
+ ./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+ ./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
+ # ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
+ # extra `/`.
+ ./normalize-var.patch
+ ]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+ ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
+
+ # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
+ # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
+ # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
+ # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
+ # a flag and turn the flag off during the stdenv build.
+ postPatch = lib.optionalString (!stdenv.isDarwin) ''
+ substituteInPlace cmake/builtin-config-ix.cmake \
+ --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+ '' + lib.optionalString stdenv.isDarwin ''
+ substituteInPlace cmake/builtin-config-ix.cmake \
+ --replace 'set(ARM64 arm64 arm64e)' 'set(ARM64)'
+ substituteInPlace cmake/config-ix.cmake \
+ --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+ '' + lib.optionalString (useLLVM) ''
+ substituteInPlace lib/builtins/int_util.c \
+ --replace "#include " ""
+ substituteInPlace lib/builtins/clear_cache.c \
+ --replace "#include " ""
+ substituteInPlace lib/builtins/cpu_model.c \
+ --replace "#include " ""
+ '';
+
+ # Hack around weird upsream RPATH bug
+ postInstall = lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+ ln -s "$out/lib"/*/* "$out/lib"
+ '' + lib.optionalString (useLLVM) ''
+ ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+ ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
+ ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
+ ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
+ '';
+
+ meta = llvm_meta // {
+ homepage = "https://compiler-rt.llvm.org/";
+ description = "Compiler runtime libraries";
+ longDescription = ''
+ The compiler-rt project provides highly tuned implementations of the
+ low-level code generator support routines like "__fixunsdfdi" and other
+ calls generated when a target doesn't have a short sequence of native
+ instructions to implement a core IR operation. It also provides
+ implementations of run-time libraries for dynamic testing tools such as
+ AddressSanitizer, ThreadSanitizer, MemorySanitizer, and DataFlowSanitizer.
+ '';
+ # "All of the code in the compiler-rt project is dual licensed under the MIT
+ # license and the UIUC License (a BSD-like license)":
+ license = with lib.licenses; [ mit ncsa ];
+ };
+}
diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch b/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch
new file mode 100644
index 000000000000..135cf625ef78
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/compiler-rt/normalize-var.patch
@@ -0,0 +1,16 @@
+diff --git a/compiler-rt/cmake/Modules/CompilerRTUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTUtils.cmake
+index f1f46fb9599c..6f19e69507ba 100644
+--- a/cmake/Modules/CompilerRTUtils.cmake
++++ b/cmake/Modules/CompilerRTUtils.cmake
+@@ -302,8 +302,9 @@ macro(load_llvm_config)
+ # Get some LLVM variables from LLVMConfig.
+ include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
+
+- set(LLVM_LIBRARY_OUTPUT_INTDIR
+- ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
++ get_filename_component(LLVM_LIBRARY_OUTPUT_INTDIR
++ ${LLVM_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}
++ REALPATH)
+ endif()
+ endmacro()
+
diff --git a/pkgs/development/compilers/llvm/13/compiler-rt/sanitizers-nongnu.patch b/pkgs/development/compilers/llvm/13/compiler-rt/sanitizers-nongnu.patch
new file mode 100644
index 000000000000..1f2ac97818eb
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/compiler-rt/sanitizers-nongnu.patch
@@ -0,0 +1,412 @@
+From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001
+From: Will Dietz
+Date: Mon, 24 Sep 2018 11:17:25 -0500
+Subject: [PATCH] Ported to 7.0, taken from gentoo-musl project.
+
+------
+Ported to compiler-rt-sanitizers-5.0.0. Taken from
+
+https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch
+Signed-off-by: Jory A. Pratt
+
+Taken from gentoo-musl project, with a few additional minor fixes.
+---
+ lib/asan/asan_linux.cc | 4 +-
+ lib/interception/interception_linux.cc | 2 +-
+ lib/interception/interception_linux.h | 2 +-
+ lib/msan/msan_linux.cc | 2 +-
+ lib/sanitizer_common/sanitizer_allocator.cc | 2 +-
+ .../sanitizer_common_interceptors_ioctl.inc | 4 +-
+ .../sanitizer_common_syscalls.inc | 2 +-
+ lib/sanitizer_common/sanitizer_linux.cc | 8 +++-
+ .../sanitizer_linux_libcdep.cc | 10 ++---
+ lib/sanitizer_common/sanitizer_platform.h | 6 +++
+ .../sanitizer_platform_interceptors.h | 4 +-
+ .../sanitizer_platform_limits_posix.cc | 37 +++++++++++--------
+ lib/tsan/rtl/tsan_platform_linux.cc | 2 +-
+ 13 files changed, 51 insertions(+), 34 deletions(-)
+
+diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
+index 625f32d40..73cf77aca 100644
+--- a/lib/asan/asan_linux.cc
++++ b/lib/asan/asan_linux.cc
+@@ -46,7 +46,7 @@
+ #include
+ #endif
+
+-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+ #include
+ extern "C" void* _DYNAMIC;
+ #elif SANITIZER_NETBSD
+@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) {
+ UNIMPLEMENTED();
+ }
+
+-#if SANITIZER_ANDROID
++#if SANITIZER_ANDROID || SANITIZER_NONGNU
+ // FIXME: should we do anything for Android?
+ void AsanCheckDynamicRTPrereqs() {}
+ void AsanCheckIncompatibleRT() {}
+diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
+index 26bfcd8f6..529b234f7 100644
+--- a/lib/interception/interception_linux.cc
++++ b/lib/interception/interception_linux.cc
+@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
+ }
+
+ // Android and Solaris do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ void *GetFuncAddrVer(const char *func_name, const char *ver) {
+ return dlvsym(RTLD_NEXT, func_name, ver);
+ }
+diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h
+index 942c25609..24a4d5080 100644
+--- a/lib/interception/interception_linux.h
++++ b/lib/interception/interception_linux.h
+@@ -36,7 +36,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver);
+ (::__interception::uptr) & WRAP(func))
+
+ // Android, Solaris and OpenBSD do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
+ (::__interception::real_##func = (func##_f)( \
+ unsigned long)::__interception::GetFuncAddrVer(#func, symver))
+diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc
+index 385a650c4..6e30a8ce9 100644
+--- a/lib/msan/msan_linux.cc
++++ b/lib/msan/msan_linux.cc
+@@ -13,7 +13,7 @@
+ //===----------------------------------------------------------------------===//
+
+ #include "sanitizer_common/sanitizer_platform.h"
+-#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
++#if SANITIZER_FREEBSD || (SANITIZER_LINUX && !SANITIZER_NONGNU) || SANITIZER_NETBSD
+
+ #include "msan.h"
+ #include "msan_report.h"
+diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc
+index 6bfd5e5ee..048f6154f 100644
+--- a/lib/sanitizer_common/sanitizer_allocator.cc
++++ b/lib/sanitizer_common/sanitizer_allocator.cc
+@@ -27,7 +27,7 @@ const char *SecondaryAllocatorName = "LargeMmapAllocator";
+
+ // ThreadSanitizer for Go uses libc malloc/free.
+ #if SANITIZER_GO || defined(SANITIZER_USE_MALLOC)
+-# if SANITIZER_LINUX && !SANITIZER_ANDROID
++# if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ extern "C" void *__libc_malloc(uptr size);
+ # if !SANITIZER_GO
+ extern "C" void *__libc_memalign(uptr alignment, uptr size);
+diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 2d633c173..b6eb23116 100644
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -104,7 +104,7 @@ static void ioctl_table_fill() {
+ _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
+ #endif
+
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ // Conflicting request ids.
+ // _(CDROMAUDIOBUFSIZ, NONE, 0);
+ // _(SNDCTL_TMR_CONTINUE, NONE, 0);
+@@ -365,7 +365,7 @@ static void ioctl_table_fill() {
+ _(VT_WAITACTIVE, NONE, 0);
+ #endif
+
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+ _(CYGETDEFTHRESH, WRITE, sizeof(int));
+ _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+index 469c8eb7e..24f87867d 100644
+--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
+ }
+ }
+
+-#if !SANITIZER_ANDROID
++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
+ void *old_rlim) {
+ if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
+diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc
+index 96d6c1eff..9e2b7fb9d 100644
+--- a/lib/sanitizer_common/sanitizer_linux.cc
++++ b/lib/sanitizer_common/sanitizer_linux.cc
+@@ -541,13 +541,13 @@ const char *GetEnv(const char *name) {
+ #endif
+ }
+
+-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD
++#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ extern "C" {
+ SANITIZER_WEAK_ATTRIBUTE extern void *__libc_stack_end;
+ }
+ #endif
+
+-#if !SANITIZER_GO && !SANITIZER_FREEBSD && !SANITIZER_NETBSD && \
++#if (!SANITIZER_GO || SANITIZER_NONGNU) && !SANITIZER_FREEBSD && !SANITIZER_NETBSD && \
+ !SANITIZER_OPENBSD
+ static void ReadNullSepFileToArray(const char *path, char ***arr,
+ int arr_size) {
+@@ -590,6 +590,10 @@ static void GetArgsAndEnv(char ***argv, char ***envp) {
+ #elif SANITIZER_NETBSD
+ *argv = __ps_strings->ps_argvstr;
+ *envp = __ps_strings->ps_envstr;
++#elif SANITIZER_NONGNU
++ static const int kMaxArgv = 2000, kMaxEnvp = 2000;
++ ReadNullSepFileToArray("/proc/self/cmdline", argv, kMaxArgv);
++ ReadNullSepFileToArray("/proc/self/environ", envp, kMaxEnvp);
+ #else // SANITIZER_FREEBSD
+ #if !SANITIZER_GO
+ if (&__libc_stack_end) {
+diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+index 4962ff832..438f94dbe 100644
+--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc
++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+@@ -179,7 +179,7 @@ __attribute__((unused)) static bool GetLibcVersion(int *major, int *minor,
+ }
+
+ #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && \
+- !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS
++ !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS && !SANITIZER_NONGNU
+ static uptr g_tls_size;
+
+ #ifdef __i386__
+@@ -261,7 +261,7 @@ void InitTlsSize() { }
+ #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) || \
+ defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) || \
+ defined(__arm__)) && \
+- SANITIZER_LINUX && !SANITIZER_ANDROID
++ SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // sizeof(struct pthread) from glibc.
+ static atomic_uintptr_t thread_descriptor_size;
+
+@@ -426,7 +426,7 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) {
+
+ #if !SANITIZER_GO
+ static void GetTls(uptr *addr, uptr *size) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
+ *addr = ThreadSelf();
+ *size = GetTlsSize();
+@@ -470,7 +470,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #elif SANITIZER_OPENBSD
+ *addr = 0;
+ *size = 0;
+-#elif SANITIZER_ANDROID
++#elif SANITIZER_ANDROID || SANITIZER_NONGNU
+ *addr = 0;
+ *size = 0;
+ #elif SANITIZER_SOLARIS
+@@ -486,7 +486,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #if !SANITIZER_GO
+ uptr GetTlsSize() {
+ #if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NETBSD || \
+- SANITIZER_OPENBSD || SANITIZER_SOLARIS
++ SANITIZER_OPENBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+ uptr addr, size;
+ GetTls(&addr, &size);
+ return size;
+diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
+index d81e25580..e10680ac8 100644
+--- a/lib/sanitizer_common/sanitizer_platform.h
++++ b/lib/sanitizer_common/sanitizer_platform.h
+@@ -208,6 +208,12 @@
+ # define SANITIZER_SOLARIS32 0
+ #endif
+
++#if defined(__linux__) && !defined(__GLIBC__)
++# define SANITIZER_NONGNU 1
++#else
++# define SANITIZER_NONGNU 0
++#endif
++
+ #if defined(__myriad2__)
+ # define SANITIZER_MYRIAD2 1
+ #else
+diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+index f95539a73..6c53b3415 100644
+--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+@@ -39,7 +39,7 @@
+ # include "sanitizer_platform_limits_solaris.h"
+ #endif
+
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # define SI_LINUX_NOT_ANDROID 1
+ #else
+ # define SI_LINUX_NOT_ANDROID 0
+@@ -322,7 +322,7 @@
+ #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID)
+ #define SANITIZER_INTERCEPT_SHMCTL \
+ (SI_NETBSD || SI_OPENBSD || SI_SOLARIS || \
+- ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \
++ ((SI_FREEBSD || SI_LINUX_NOT_ANDROID || SANITIZER_NONGNU) && \
+ SANITIZER_WORDSIZE == 64)) // NOLINT
+ #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID
+ #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 54da635d7..2f6ff69c3 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -14,6 +14,9 @@
+
+ #include "sanitizer_platform.h"
+
++// Workaround musl <--> linux conflicting definition of 'struct sysinfo'
++#define _LINUX_SYSINFO_H
++
+ #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
+ // Tests in this file assume that off_t-dependent data structures match the
+ // libc ABI. For example, struct dirent here is what readdir() function (as
+@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t;
+
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include
+-#include
++# if !SANITIZER_NONGNU
++# include
++# endif
+ #include
+-#include
+-#include
+-#include
+-#include
++#include
++#include
++#include
++#include
+ #if HAVE_RPC_XDR_H
+ # include
+ #elif HAVE_TIRPC_RPC_XDR_H
+@@ -251,7 +256,7 @@ namespace __sanitizer {
+ unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // Use pre-computed size of struct ustat to avoid which
+ // has been removed from glibc 2.28.
+ #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+@@ -322,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
+ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif
+
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ int glob_nomatch = GLOB_NOMATCH;
+ int glob_altdirfunc = GLOB_ALTDIRFUNC;
+ #endif
+@@ -416,7 +421,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ unsigned struct_termios_sz = sizeof(struct termios);
+ unsigned struct_winsize_sz = sizeof(struct winsize);
+
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ unsigned struct_arpreq_sz = sizeof(struct arpreq);
+ unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
+ unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
+@@ -466,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+ unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+@@ -834,7 +839,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+ unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+ unsigned IOCTL_CYGETMON = CYGETMON;
+@@ -989,7 +994,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
+ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(glob_t);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
+@@ -1023,6 +1028,7 @@ CHECK_TYPE_SIZE(iovec);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_base);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_len);
+
++#if !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(msghdr);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
+@@ -1036,6 +1042,7 @@ CHECK_TYPE_SIZE(cmsghdr);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
++#endif
+
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(x, y) 0
+@@ -1145,7 +1152,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno);
+
+ CHECK_TYPE_SIZE(ether_addr);
+
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(ipc_perm);
+ # if SANITIZER_FREEBSD
+ CHECK_SIZE_AND_OFFSET(ipc_perm, key);
+@@ -1206,7 +1213,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
+ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
+ #endif
+
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
+ #endif
+
+@@ -1256,7 +1263,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
+ COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
+ #endif
+
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
+ CHECK_SIZE_AND_OFFSET(FILE, _flags);
+ CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
+@@ -1275,7 +1282,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain);
+ CHECK_SIZE_AND_OFFSET(FILE, _fileno);
+ #endif
+
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
+diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc
+index de989b780..51a97b554 100644
+--- a/lib/tsan/rtl/tsan_platform_linux.cc
++++ b/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -294,7 +294,7 @@ void InitializePlatform() {
+ // This is required to properly "close" the fds, because we do not see internal
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ int cnt = 0;
+ struct __res_state *statp = (struct __res_state*)state;
+ for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+--
+2.19.0
+
diff --git a/pkgs/development/compilers/llvm/13/default.nix b/pkgs/development/compilers/llvm/13/default.nix
new file mode 100644
index 000000000000..4b73e78c13fa
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/default.nix
@@ -0,0 +1,267 @@
+{ lowPrio, newScope, pkgs, lib, stdenv, cmake
+, gccForLibs, preLibcCrossHeaders
+, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+# This is the default binutils, but with *this* version of LLD rather
+# than the default LLVM verion's, if LLD is the choice. We use these for
+# the `useLLVM` bootstrapping below.
+, bootBintoolsNoLibc ?
+ if stdenv.targetPlatform.linker == "lld"
+ then null
+ else pkgs.bintoolsNoLibc
+, bootBintools ?
+ if stdenv.targetPlatform.linker == "lld"
+ then null
+ else pkgs.bintools
+, darwin
+}:
+
+let
+ release_version = "13.0.0";
+ candidate = "rc1"; # empty or "rcN"
+ dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
+ rev = ""; # When using a Git commit
+ rev-version = ""; # When using a Git commit
+ version = if rev != "" then rev-version else "${release_version}${dash-candidate}";
+ targetConfig = stdenv.targetPlatform.config;
+
+ src = fetchFromGitHub {
+ owner = "llvm";
+ repo = "llvm-project";
+ rev = if rev != "" then rev else "llvmorg-${version}";
+ sha256 = "19x8yk9zkpdmn08r1jn3bk1l5ab7kgj9fi5v7lmkyahc19wxszy4";
+ };
+
+ llvm_meta = {
+ license = lib.licenses.ncsa;
+ maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
+ platforms = lib.platforms.all;
+ };
+
+ tools = lib.makeExtensible (tools: let
+ callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version src buildLlvmTools; });
+ mkExtraBuildCommands0 = cc: ''
+ rsrc="$out/resource-root"
+ mkdir "$rsrc"
+ ln -s "${cc.lib}/lib/clang/${release_version}/include" "$rsrc"
+ echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+ '';
+ mkExtraBuildCommands = cc: mkExtraBuildCommands0 cc + ''
+ ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+ ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
+ '';
+
+ bintoolsNoLibc' =
+ if bootBintoolsNoLibc == null
+ then tools.bintoolsNoLibc
+ else bootBintoolsNoLibc;
+ bintools' =
+ if bootBintools == null
+ then tools.bintools
+ else bootBintools;
+
+ in {
+
+ libllvm = callPackage ./llvm {
+ inherit llvm_meta;
+ };
+
+ # `llvm` historically had the binaries. When choosing an output explicitly,
+ # we need to reintroduce `outputUnspecified` to get the expected behavior e.g. of lib.get*
+ llvm = tools.libllvm.out // { outputUnspecified = true; };
+
+ libclang = callPackage ./clang {
+ inherit llvm_meta;
+ };
+
+ clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
+
+ llvm-manpages = lowPrio (tools.libllvm.override {
+ enableManpages = true;
+ python3 = pkgs.python3; # don't use python-boot
+ });
+
+ clang-manpages = lowPrio (tools.libclang.override {
+ enableManpages = true;
+ python3 = pkgs.python3; # don't use python-boot
+ });
+
+ # TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins'
+ # lldb-manpages = lowPrio (tools.lldb.override {
+ # enableManpages = true;
+ # python3 = pkgs.python3; # don't use python-boot
+ # });
+
+ clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
+
+ libstdcxxClang = wrapCCWith rec {
+ cc = tools.clang-unwrapped;
+ # libstdcxx is taken from gcc in an ad-hoc way in cc-wrapper.
+ libcxx = null;
+ extraPackages = [
+ targetLlvmLibraries.compiler-rt
+ ];
+ extraBuildCommands = mkExtraBuildCommands cc;
+ };
+
+ libcxxClang = wrapCCWith rec {
+ cc = tools.clang-unwrapped;
+ libcxx = targetLlvmLibraries.libcxx;
+ extraPackages = [
+ targetLlvmLibraries.libcxxabi
+ targetLlvmLibraries.compiler-rt
+ ];
+ extraBuildCommands = mkExtraBuildCommands cc;
+ };
+
+ lld = callPackage ./lld {
+ inherit llvm_meta;
+ };
+
+ lldb = callPackage ./lldb {
+ inherit llvm_meta;
+ inherit (darwin) libobjc bootstrap_cmds;
+ inherit (darwin.apple_sdk.libs) xpc;
+ inherit (darwin.apple_sdk.frameworks) Foundation Carbon Cocoa;
+ };
+
+ # Below, is the LLVM bootstrapping logic. It handles building a
+ # fully LLVM toolchain from scratch. No GCC toolchain should be
+ # pulled in. As a consequence, it is very quick to build different
+ # targets provided by LLVM and we can also build for what GCC
+ # doesn’t support like LLVM. Probably we should move to some other
+ # file.
+
+ bintools-unwrapped = callPackage ./bintools {};
+
+ bintoolsNoLibc = wrapBintoolsWith {
+ bintools = tools.bintools-unwrapped;
+ libc = preLibcCrossHeaders;
+ };
+
+ bintools = wrapBintoolsWith {
+ bintools = tools.bintools-unwrapped;
+ };
+
+ clangUseLLVM = wrapCCWith rec {
+ cc = tools.clang-unwrapped;
+ libcxx = targetLlvmLibraries.libcxx;
+ bintools = bintools';
+ extraPackages = [
+ targetLlvmLibraries.libcxxabi
+ targetLlvmLibraries.compiler-rt
+ ] ++ lib.optionals (!stdenv.targetPlatform.isWasm) [
+ targetLlvmLibraries.libunwind
+ ];
+ extraBuildCommands = ''
+ echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
+ echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+ '' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
+ echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+ '' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
+ echo "-lunwind" >> $out/nix-support/cc-ldflags
+ '' + lib.optionalString stdenv.targetPlatform.isWasm ''
+ echo "-fno-exceptions" >> $out/nix-support/cc-cflags
+ '' + mkExtraBuildCommands cc;
+ };
+
+ clangNoLibcxx = wrapCCWith rec {
+ cc = tools.clang-unwrapped;
+ libcxx = null;
+ bintools = bintools';
+ extraPackages = [
+ targetLlvmLibraries.compiler-rt
+ ];
+ extraBuildCommands = ''
+ echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+ echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+ echo "-nostdlib++" >> $out/nix-support/cc-cflags
+ '' + mkExtraBuildCommands cc;
+ };
+
+ clangNoLibc = wrapCCWith rec {
+ cc = tools.clang-unwrapped;
+ libcxx = null;
+ bintools = bintoolsNoLibc';
+ extraPackages = [
+ targetLlvmLibraries.compiler-rt
+ ];
+ extraBuildCommands = ''
+ echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+ echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+ '' + mkExtraBuildCommands cc;
+ };
+
+ clangNoCompilerRt = wrapCCWith rec {
+ cc = tools.clang-unwrapped;
+ libcxx = null;
+ bintools = bintoolsNoLibc';
+ extraPackages = [ ];
+ extraBuildCommands = ''
+ echo "-nostartfiles" >> $out/nix-support/cc-cflags
+ '' + mkExtraBuildCommands0 cc;
+ };
+
+ clangNoCompilerRtWithLibc = wrapCCWith rec {
+ cc = tools.clang-unwrapped;
+ libcxx = null;
+ bintools = bintools';
+ extraPackages = [ ];
+ extraBuildCommands = mkExtraBuildCommands0 cc;
+ };
+
+ });
+
+ libraries = lib.makeExtensible (libraries: let
+ callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version src; });
+ in {
+
+ compiler-rt-libc = callPackage ./compiler-rt {
+ inherit llvm_meta;
+ stdenv = if stdenv.hostPlatform.useLLVM or false
+ then overrideCC stdenv buildLlvmTools.clangNoCompilerRtWithLibc
+ else stdenv;
+ };
+
+ compiler-rt-no-libc = callPackage ./compiler-rt {
+ inherit llvm_meta;
+ stdenv = if stdenv.hostPlatform.useLLVM or false
+ then overrideCC stdenv buildLlvmTools.clangNoCompilerRt
+ else stdenv;
+ };
+
+ # N.B. condition is safe because without useLLVM both are the same.
+ compiler-rt = if stdenv.hostPlatform.isAndroid
+ then libraries.compiler-rt-libc
+ else libraries.compiler-rt-no-libc;
+
+ stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+ libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+ libcxx = callPackage ./libcxx {
+ inherit llvm_meta;
+ stdenv = if stdenv.hostPlatform.useLLVM or false
+ then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+ else stdenv;
+ };
+
+ libcxxabi = callPackage ./libcxxabi {
+ inherit llvm_meta;
+ stdenv = if stdenv.hostPlatform.useLLVM or false
+ then overrideCC stdenv buildLlvmTools.clangNoLibcxx
+ else stdenv;
+ };
+
+ libunwind = callPackage ./libunwind {
+ inherit llvm_meta;
+ stdenv = overrideCC stdenv buildLlvmTools.clangNoLibcxx;
+ };
+
+ openmp = callPackage ./openmp {
+ inherit llvm_meta;
+ };
+ });
+
+in { inherit tools libraries; } // libraries // tools
diff --git a/pkgs/development/compilers/llvm/13/libcxx/default.nix b/pkgs/development/compilers/llvm/13/libcxx/default.nix
new file mode 100644
index 000000000000..f511eba81dc5
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/libcxx/default.nix
@@ -0,0 +1,51 @@
+{ lib, stdenv, llvm_meta, src, cmake, python3, fixDarwinDylibNames, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+ pname = "libcxx";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/${pname}";
+
+ outputs = [ "out" "dev" ];
+
+ patches = [
+ ./gnu-install-dirs.patch
+ ] ++ lib.optionals stdenv.hostPlatform.isMusl [
+ ../../libcxx-0001-musl-hacks.patch
+ ];
+
+ preConfigure = lib.optionalString stdenv.hostPlatform.isMusl ''
+ patchShebangs utils/cat_files.py
+ '';
+
+ nativeBuildInputs = [ cmake python3 ]
+ ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+ cmakeFlags = [
+ ] ++ 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.isWasm [
+ "-DLIBCXX_ENABLE_THREADS=OFF"
+ "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+ "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+ ] ++ lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+
+ passthru = {
+ isLLVM = true;
+ };
+
+ meta = llvm_meta // {
+ homepage = "https://libcxx.llvm.org/";
+ description = "C++ standard library";
+ longDescription = ''
+ libc++ is an implementation of the C++ standard library, targeting C++11,
+ C++14 and above.
+ '';
+ # "All of the code in libc++ is dual licensed under the MIT license and the
+ # UIUC License (a BSD-like license)":
+ license = with lib.licenses; [ mit ncsa ];
+ };
+}
diff --git a/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch
new file mode 100644
index 000000000000..744967a6ee0b
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/libcxx/gnu-install-dirs.patch
@@ -0,0 +1,82 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b1e25358d41a..7fe1f4d85401 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -26,6 +26,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
+ project(libcxx CXX C)
+
++ include(GNUInstallDirs)
++
+ set(PACKAGE_NAME libcxx)
+ set(PACKAGE_VERSION 13.0.0git)
+ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -412,7 +414,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+ set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
+ set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
+- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ "Path where built libc++ libraries should be installed.")
+ set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ "Path where target-agnostic libc++ headers should be installed.")
+@@ -426,7 +428,7 @@ 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_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ "Path where target-agnostic libc++ headers should be installed.")
+@@ -436,7 +438,7 @@ else()
+ set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
+ set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
+ set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
+- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
++ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX} CACHE PATH
+ "Path where built libc++ libraries should be installed.")
+ set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ "Path where target-agnostic libc++ headers should be installed.")
+diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
+index 5a8a4a270a1a..c06bae0001aa 100644
+--- a/cmake/Modules/HandleLibCXXABI.cmake
++++ b/cmake/Modules/HandleLibCXXABI.cmake
+@@ -63,7 +63,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
+ )
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 496429f3841e..1a0c9c0a3159 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -376,21 +376,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY)
+ install(TARGETS cxx_shared
+ ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+ LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+- RUNTIME DESTINATION bin COMPONENT cxx)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+
+ if (LIBCXX_INSTALL_STATIC_LIBRARY)
+ install(TARGETS cxx_static
+ ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+ LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+- RUNTIME DESTINATION bin COMPONENT cxx)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+
+ if(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY)
+ install(TARGETS cxx_experimental
+ LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+ ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
+- RUNTIME DESTINATION bin COMPONENT cxx)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT cxx)
+ endif()
+
+ # NOTE: This install command must go after the cxx install command otherwise
diff --git a/pkgs/development/compilers/llvm/13/libcxxabi/default.nix b/pkgs/development/compilers/llvm/13/libcxxabi/default.nix
new file mode 100644
index 000000000000..7fadc6d6dcac
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/libcxxabi/default.nix
@@ -0,0 +1,76 @@
+{ lib, stdenv, llvm_meta, cmake, python3, src, libunwind, version
+, enableShared ? !stdenv.hostPlatform.isStatic
+, libcxx
+}:
+
+stdenv.mkDerivation rec {
+ pname = "libcxxabi";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/${pname}";
+
+ outputs = [ "out" "dev" ];
+
+ postUnpack = lib.optionalString stdenv.isDarwin ''
+ export TRIPLE=x86_64-apple-darwin
+ '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+ patch -p1 -d libcxx -i ${../../libcxx-0001-musl-hacks.patch}
+ '' + lib.optionalString stdenv.hostPlatform.isWasm ''
+ patch -p1 -d llvm -i ${./wasm.patch}
+ '';
+
+ patches = [
+ ./gnu-install-dirs.patch
+ ];
+
+ nativeBuildInputs = [ cmake python3 ];
+ buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
+
+ cmakeFlags = [
+ "-DLIBCXXABI_LIBCXX_INCLUDES=${libcxx.dev}/include/c++/v1"
+ ] ++ lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+ "-DLLVM_ENABLE_LIBCXX=ON"
+ "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+ ] ++ lib.optionals stdenv.hostPlatform.isWasm [
+ "-DLIBCXXABI_ENABLE_THREADS=OFF"
+ "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+ ] ++ lib.optionals (!enableShared) [
+ "-DLIBCXXABI_ENABLE_SHARED=OFF"
+ ];
+
+ installPhase = if stdenv.isDarwin
+ then ''
+ for file in lib/*.dylib; do
+ # this should be done in CMake, but having trouble figuring out
+ # the magic combination of necessary CMake variables
+ # if you fancy a try, take a look at
+ # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
+ install_name_tool -id $out/$file $file
+ done
+ make install
+ install -d 755 $out/include
+ install -m 644 ../include/*.h $out/include
+ ''
+ else ''
+ install -d -m 755 $out/include $out/lib
+ install -m 644 lib/libc++abi.a $out/lib
+ install -m 644 ../include/cxxabi.h $out/include
+ '' + lib.optionalString enableShared ''
+ install -m 644 lib/libc++abi.so.1.0 $out/lib
+ ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
+ ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+ '';
+
+ meta = llvm_meta // {
+ homepage = "https://libcxxabi.llvm.org/";
+ description = "Provides C++ standard library support";
+ longDescription = ''
+ libc++abi is a new implementation of low level support for a standard C++ library.
+ '';
+ # "All of the code in libc++abi is dual licensed under the MIT license and
+ # the UIUC License (a BSD-like license)":
+ license = with lib.licenses; [ mit ncsa ];
+ maintainers = llvm_meta.maintainers ++ [ lib.maintainers.vlstill ];
+ };
+}
diff --git a/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch
new file mode 100644
index 000000000000..5d562dd59a99
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/libcxxabi/gnu-install-dirs.patch
@@ -0,0 +1,37 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 9fb35860d483..5739d9e8af62 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -27,6 +27,8 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXXABI_STANDALONE_BUILD)
+ project(libcxxabi CXX C)
+
++ include(GNUInstallDirs)
++
+ set(PACKAGE_NAME libcxxabi)
+ set(PACKAGE_VERSION 11.0.0git)
+ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -195,7 +197,7 @@ set(CMAKE_MODULE_PATH
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+ set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ "Path where built libc++abi libraries should be installed.")
+ if(LIBCXX_LIBDIR_SUBDIR)
+ string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
+@@ -204,12 +206,12 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+ set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
+ set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
+- 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.")
+ else()
+ set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
+ set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
+- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+ "Path where built libc++abi libraries should be installed.")
+ endif()
+
diff --git a/pkgs/development/compilers/llvm/13/libcxxabi/wasm.patch b/pkgs/development/compilers/llvm/13/libcxxabi/wasm.patch
new file mode 100644
index 000000000000..4ebfe46aa813
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/libcxxabi/wasm.patch
@@ -0,0 +1,16 @@
+diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
+index 15497d405e0..33f7f18193a 100644
+--- a/cmake/modules/HandleLLVMOptions.cmake
++++ b/cmake/modules/HandleLLVMOptions.cmake
+@@ -127,7 +127,10 @@ else(WIN32)
+ set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
+ endif()
+ else(FUCHSIA OR UNIX)
+- MESSAGE(SEND_ERROR "Unable to determine platform")
++ if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi")
++ else()
++ MESSAGE(SEND_ERROR "Unable to determine platform")
++ endif()
+ endif(FUCHSIA OR UNIX)
+ endif(WIN32)
+
diff --git a/pkgs/development/compilers/llvm/13/libunwind/default.nix b/pkgs/development/compilers/llvm/13/libunwind/default.nix
new file mode 100644
index 000000000000..b6017e741728
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/libunwind/default.nix
@@ -0,0 +1,33 @@
+{ lib, stdenv, llvm_meta, version, src, cmake
+, enableShared ? !stdenv.hostPlatform.isStatic
+}:
+
+stdenv.mkDerivation rec {
+ pname = "libunwind";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/${pname}";
+
+ patches = [
+ ./gnu-install-dirs.patch
+ ];
+
+ outputs = [ "out" "dev" ];
+
+ nativeBuildInputs = [ cmake ];
+
+ cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+
+ meta = llvm_meta // {
+ # Details: https://github.com/llvm/llvm-project/blob/main/libunwind/docs/index.rst
+ homepage = "https://clang.llvm.org/docs/Toolchain.html#unwind-library";
+ description = "LLVM's unwinder library";
+ longDescription = ''
+ The unwind library provides a family of _Unwind_* functions implementing
+ the language-neutral stack unwinding portion of the Itanium C++ ABI (Level
+ I). It is a dependency of the C++ ABI library, and sometimes is a
+ dependency of other runtimes.
+ '';
+ };
+}
diff --git a/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch
new file mode 100644
index 000000000000..8cd25c56f8cc
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/libunwind/gnu-install-dirs.patch
@@ -0,0 +1,36 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 81eddbc24879..e2afb2002150 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBUNWIND_STANDALONE_BUILD)
+ project(libunwind LANGUAGES C CXX ASM)
+
++ include(GNUInstallDirs)
++
+ set(PACKAGE_NAME libunwind)
+ set(PACKAGE_VERSION 13.0.0git)
+ set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+@@ -116,7 +118,7 @@ set(CMAKE_MODULE_PATH
+
+ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
+- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ "Path where built libunwind libraries should be installed.")
+ if(LIBCXX_LIBDIR_SUBDIR)
+ string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+@@ -124,11 +126,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+ 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
++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH
+ "Path where built libunwind libraries should be installed.")
+ else()
+ set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
+- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH
+ "Path where built libunwind libraries should be installed.")
+ endif()
+
diff --git a/pkgs/development/compilers/llvm/13/lld/default.nix b/pkgs/development/compilers/llvm/13/lld/default.nix
new file mode 100644
index 000000000000..34ac265f4bfd
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/lld/default.nix
@@ -0,0 +1,44 @@
+{ lib, stdenv, llvm_meta
+, buildLlvmTools
+, src
+, cmake
+, libxml2
+, libllvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+ pname = "lld";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/${pname}";
+
+ patches = [
+ ./gnu-install-dirs.patch
+ ];
+
+ nativeBuildInputs = [ cmake ];
+ buildInputs = [ libllvm libxml2 ];
+
+ cmakeFlags = [
+ "-DLLVM_CONFIG_PATH=${libllvm.dev}/bin/llvm-config${lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-native"}"
+ ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+ "-DLLVM_TABLEGEN_EXE=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+ ];
+
+ outputs = [ "out" "lib" "dev" ];
+
+ meta = llvm_meta // {
+ homepage = "https://lld.llvm.org/";
+ description = "The LLVM linker";
+ longDescription = ''
+ LLD is a linker from the LLVM project that is a drop-in replacement for
+ system linkers and runs much faster than them. It also provides features
+ that are useful for toolchain developers.
+ The linker supports ELF (Unix), PE/COFF (Windows), Mach-O (macOS), and
+ WebAssembly in descending order of completeness. Internally, LLD consists
+ of several different linkers.
+ '';
+ };
+}
diff --git a/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch
new file mode 100644
index 000000000000..61e2f0e48653
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/lld/gnu-install-dirs.patch
@@ -0,0 +1,68 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index d4e561b50d8f..cfa5bdd79c2a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,8 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ set(LLD_BUILT_STANDALONE TRUE)
+
++ include(GNUInstallDirs)
++
+ find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary")
+ if(NOT LLVM_CONFIG_PATH)
+ message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
+@@ -179,7 +181,7 @@ include_directories(BEFORE
+
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ install(DIRECTORY include/
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+diff --git a/cmake/modules/AddLLD.cmake b/cmake/modules/AddLLD.cmake
+index 23df41312403..d62372c88de7 100644
+--- a/cmake/modules/AddLLD.cmake
++++ b/cmake/modules/AddLLD.cmake
+@@ -20,9 +20,9 @@ macro(add_lld_library name)
+ install(TARGETS ${name}
+ COMPONENT ${name}
+ ${export_to_lldtargets}
+- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+- RUNTIME DESTINATION bin)
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ if (${ARG_SHARED} AND NOT CMAKE_CONFIGURATION_TYPES)
+ add_llvm_install_targets(install-${name}
+@@ -54,7 +54,7 @@ macro(add_lld_tool name)
+
+ install(TARGETS ${name}
+ ${export_to_lldtargets}
+- RUNTIME DESTINATION bin
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ COMPONENT ${name})
+
+ if(NOT CMAKE_CONFIGURATION_TYPES)
+@@ -69,5 +69,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()
+diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt
+index 5cff736ff57f..64e775c771b9 100644
+--- a/tools/lld/CMakeLists.txt
++++ b/tools/lld/CMakeLists.txt
+@@ -21,7 +21,7 @@ target_link_libraries(lld
+ )
+
+ install(TARGETS lld
+- RUNTIME DESTINATION bin)
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+ if(NOT LLD_SYMLINKS_TO_CREATE)
+ set(LLD_SYMLINKS_TO_CREATE
diff --git a/pkgs/development/compilers/llvm/13/lldb/default.nix b/pkgs/development/compilers/llvm/13/lldb/default.nix
new file mode 100644
index 000000000000..2dd6c46eb82c
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/lldb/default.nix
@@ -0,0 +1,130 @@
+{ lib, stdenv, llvm_meta
+, runCommand
+, src
+, cmake
+, zlib
+, ncurses
+, swig
+, which
+, libedit
+, libxml2
+, libllvm
+, libclang
+, python3
+, version
+, libobjc
+, xpc
+, Foundation
+, bootstrap_cmds
+, Carbon
+, Cocoa
+, lit
+, enableManpages ? false
+}:
+
+stdenv.mkDerivation (rec {
+ pname = "lldb";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/${pname}";
+
+ patches = [
+ ./procfs.patch
+ (runCommand "resource-dir.patch" {
+ clangLibDir = "${libclang.lib}/lib";
+ } ''
+ substitute '${./resource-dir.patch}' "$out" --subst-var clangLibDir
+ '')
+ ./gnu-install-dirs.patch
+ ];
+
+ outputs = [ "out" "lib" "dev" ];
+
+ nativeBuildInputs = [
+ cmake python3 which swig lit
+ ] ++ lib.optionals enableManpages [
+ python3.pkgs.sphinx python3.pkgs.recommonmark
+ ];
+
+ buildInputs = [
+ ncurses
+ zlib
+ libedit
+ libxml2
+ libllvm
+ ] ++ lib.optionals stdenv.isDarwin [
+ libobjc
+ xpc
+ Foundation
+ bootstrap_cmds
+ Carbon
+ Cocoa
+ ];
+
+ hardeningDisable = [ "format" ];
+
+ cmakeFlags = [
+ "-DLLDB_INCLUDE_TESTS=${if doCheck then "YES" else "NO"}"
+ "-DLLVM_ENABLE_RTTI=OFF"
+ "-DClang_DIR=${libclang.dev}/lib/cmake"
+ "-DLLVM_EXTERNAL_LIT=${lit}/bin/lit"
+ ] ++ lib.optionals stdenv.isDarwin [
+ "-DLLDB_USE_SYSTEM_DEBUGSERVER=ON"
+ ] ++ lib.optionals (!stdenv.isDarwin) [
+ "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+ ] ++ lib.optionals enableManpages [
+ "-DLLVM_ENABLE_SPHINX=ON"
+ "-DSPHINX_OUTPUT_MAN=ON"
+ "-DSPHINX_OUTPUT_HTML=OFF"
+ ] ++ lib.optionals doCheck [
+ "-DLLDB_TEST_C_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
+ "-DLLDB_TEST_CXX_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++"
+ ];
+
+ doCheck = false;
+
+ postInstall = ''
+ # Editor support
+ # vscode:
+ install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json
+ mkdir -p $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+ ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+ '';
+
+ meta = llvm_meta // {
+ homepage = "https://lldb.llvm.org/";
+ description = "A next-generation high-performance debugger";
+ longDescription = ''
+ LLDB is a next generation, high-performance debugger. It is built as a set
+ of reusable components which highly leverage existing libraries in the
+ larger LLVM Project, such as the Clang expression parser and LLVM
+ disassembler.
+ '';
+ };
+} // lib.optionalAttrs enableManpages {
+ pname = "lldb-manpages";
+
+ buildPhase = ''
+ make docs-lldb-man
+ '';
+
+ propagatedBuildInputs = [];
+
+ # manually install lldb man page
+ installPhase = ''
+ mkdir -p $out/share/man/man1
+ install docs/man/lldb.1 -t $out/share/man/man1/
+ '';
+
+ postPatch = null;
+ postInstall = null;
+
+ outputs = [ "out" ];
+
+ doCheck = false;
+
+ meta = llvm_meta // {
+ description = "man pages for LLDB ${version}";
+ };
+})
diff --git a/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch
new file mode 100644
index 000000000000..98321f4479e6
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/lldb/gnu-install-dirs.patch
@@ -0,0 +1,65 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b5633e21c56a..f2f1035e9238 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -10,6 +10,8 @@ set(CMAKE_MODULE_PATH
+ # If we are not building as part of LLVM, build LLDB as a standalone project,
+ # using LLVM as an external library.
+ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
++ include(GNUInstallDirs)
++
+ project(lldb)
+ include(LLDBStandalone)
+
+diff --git a/cmake/modules/AddLLDB.cmake b/cmake/modules/AddLLDB.cmake
+index 4ed5c647c5d2..89f96e710d55 100644
+--- a/cmake/modules/AddLLDB.cmake
++++ b/cmake/modules/AddLLDB.cmake
+@@ -107,13 +107,13 @@ function(add_lldb_library name)
+ endif()
+
+ if(PARAM_SHARED)
+- set(install_dest lib${LLVM_LIBDIR_SUFFIX})
++ set(install_dest ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+ if(PARAM_INSTALL_PREFIX)
+ set(install_dest ${PARAM_INSTALL_PREFIX})
+ endif()
+ # RUNTIME is relevant for DLL platforms, FRAMEWORK for macOS
+ install(TARGETS ${name} COMPONENT ${name}
+- RUNTIME DESTINATION bin
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${install_dest}
+ ARCHIVE DESTINATION ${install_dest}
+ FRAMEWORK DESTINATION ${install_dest})
+diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
+index 2fdf1502d055..37364341ff8b 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -225,7 +225,7 @@ include_directories(BEFORE
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ install(DIRECTORY include/
+ COMPONENT lldb-headers
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN ".cmake" EXCLUDE
+@@ -233,7 +233,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/include/
+ COMPONENT lldb-headers
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN ".cmake" EXCLUDE
+diff --git a/tools/intel-features/CMakeLists.txt b/tools/intel-features/CMakeLists.txt
+index 734167e51bc5..f95761b5df58 100644
+--- a/tools/intel-features/CMakeLists.txt
++++ b/tools/intel-features/CMakeLists.txt
+@@ -65,4 +65,4 @@ if (LLDB_ENABLE_PYTHON AND LLDB_BUILD_INTEL_PT)
+ endif()
+
+ install(TARGETS lldbIntelFeatures
+- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
diff --git a/pkgs/development/compilers/llvm/13/lldb/procfs.patch b/pkgs/development/compilers/llvm/13/lldb/procfs.patch
new file mode 100644
index 000000000000..b075dbaeee0a
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/lldb/procfs.patch
@@ -0,0 +1,31 @@
+--- a/source/Plugins/Process/Linux/Procfs.h
++++ b/source/Plugins/Process/Linux/Procfs.h
+@@ -11,21 +11,12 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+
+ #include
++#include
+
+-#ifdef __ANDROID__
+-#if defined(__arm64__) || defined(__aarch64__)
+-typedef unsigned long elf_greg_t;
+-typedef elf_greg_t
+- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
+-typedef struct user_fpsimd_state elf_fpregset_t;
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#elif defined(__mips__)
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#endif
+-#else // __ANDROID__
++#if !defined(__GLIBC__) && defined(__powerpc__)
++#define pt_regs musl_pt_regs
++#include
++#undef pt_regs
++#else
+ #include
+-#endif // __ANDROID__
++#endif
diff --git a/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch b/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch
new file mode 100644
index 000000000000..e0db80afeb9f
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/lldb/resource-dir.patch
@@ -0,0 +1,13 @@
+diff --git a/lldb/cmake/modules/LLDBConfig.cmake b/lldb/cmake/modules/LLDBConfig.cmake
+index 37364341ff8b..7f74c1a3e257 100644
+--- a/cmake/modules/LLDBConfig.cmake
++++ b/cmake/modules/LLDBConfig.cmake
+@@ -257,7 +257,7 @@ if (NOT TARGET clang-resource-headers)
+ # Iterate over the possible places where the external resource directory
+ # could be and pick the first that exists.
+ foreach(CANDIDATE "${Clang_DIR}/../.." "${LLVM_DIR}" "${LLVM_LIBRARY_DIRS}"
+- "${LLVM_BUILD_LIBRARY_DIR}"
++ "${LLVM_BUILD_LIBRARY_DIR}" "@clangLibDir@"
+ "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}")
+ # Build the resource directory path by appending 'clang/'.
+ set(CANDIDATE_RESOURCE_DIR "${CANDIDATE}/clang/${LLDB_CLANG_RESOURCE_DIR_NAME}")
diff --git a/pkgs/development/compilers/llvm/13/llvm/default.nix b/pkgs/development/compilers/llvm/13/llvm/default.nix
new file mode 100644
index 000000000000..daf4cfe808b6
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/llvm/default.nix
@@ -0,0 +1,217 @@
+{ lib, stdenv, llvm_meta
+, pkgsBuildBuild
+, src
+, fetchpatch
+, cmake
+, python3
+, libffi
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, which
+, buildLlvmTools
+, debugVersion ? false
+, enableManpages ? false
+, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
+, enablePFM ? !(stdenv.isDarwin
+ || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+ || stdenv.isAarch32 # broken for the armv7l builder
+)
+, enablePolly ? false
+}:
+
+let
+ inherit (lib) optional optionals optionalString;
+
+ # Used when creating a version-suffixed symlink of libLLVM.dylib
+ shortVersion = with lib;
+ concatStringsSep "." (take 1 (splitString "." release_version));
+
+in stdenv.mkDerivation (rec {
+ pname = "llvm";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/${pname}";
+
+ outputs = [ "out" "lib" "dev" "python" ];
+
+ nativeBuildInputs = [ cmake python3 ]
+ ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+ buildInputs = [ libxml2 libffi ]
+ ++ optional enablePFM libpfm; # exegesis
+
+ propagatedBuildInputs = [ ncurses zlib ];
+
+ checkInputs = [ which ];
+
+ patches = [
+ ./gnu-install-dirs.patch
+ ] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
+
+ postPatch = optionalString stdenv.isDarwin ''
+ substituteInPlace cmake/modules/AddLLVM.cmake \
+ --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
+ --replace 'set(_install_rpath "@loader_path/../''${CMAKE_INSTALL_LIBDIR}''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+ ''
+ # Patch llvm-config to return correct library path based on --link-{shared,static}.
+ + optionalString (enableSharedLibraries) ''
+ substitute '${./outputs.patch}' ./outputs.patch --subst-var lib
+ patch -p1 < ./outputs.patch
+ '' + ''
+ # FileSystem permissions tests fail with various special bits
+ substituteInPlace unittests/Support/CMakeLists.txt \
+ --replace "Path.cpp" ""
+ rm unittests/Support/Path.cpp
+ substituteInPlace unittests/IR/CMakeLists.txt \
+ --replace "PassBuilderCallbacksTest.cpp" ""
+ rm unittests/IR/PassBuilderCallbacksTest.cpp
+ rm test/tools/llvm-objcopy/ELF/mirror-permissions-unix.test
+ '' + optionalString stdenv.hostPlatform.isMusl ''
+ patch -p1 -i ${../../TLI-musl.patch}
+ substituteInPlace unittests/Support/CMakeLists.txt \
+ --replace "add_subdirectory(DynamicLibrary)" ""
+ rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+ # valgrind unhappy with musl or glibc, but fails w/musl only
+ rm test/CodeGen/AArch64/wineh4.mir
+ '' + optionalString stdenv.hostPlatform.isAarch32 ''
+ # skip failing X86 test cases on 32-bit ARM
+ rm test/DebugInfo/X86/convert-debugloc.ll
+ rm test/DebugInfo/X86/convert-inlined.ll
+ rm test/DebugInfo/X86/convert-linked.ll
+ rm test/tools/dsymutil/X86/op-convert.test
+ '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
+ # Seems to require certain floating point hardware (NEON?)
+ rm test/ExecutionEngine/frem.ll
+ '' + ''
+ patchShebangs test/BugPoint/compile-custom.ll.py
+ '';
+
+ # hacky fix: created binaries need to be run before installation
+ preBuild = ''
+ mkdir -p $out/
+ ln -sv $PWD/lib $out
+ '';
+
+ # E.g. mesa.drivers use the build-id as a cache key (see #93946):
+ LDFLAGS = optionalString (enableSharedLibraries && !stdenv.isDarwin) "-Wl,--build-id=sha1";
+
+ cmakeFlags = with stdenv; [
+ "-DLLVM_INSTALL_CMAKE_DIR=${placeholder "dev"}/lib/cmake/llvm/"
+ "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
+ "-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
+ "-DLLVM_BUILD_TESTS=ON"
+ "-DLLVM_ENABLE_FFI=ON"
+ "-DLLVM_ENABLE_RTTI=ON"
+ "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+ "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+ "-DLLVM_ENABLE_DUMP=ON"
+ ] ++ optionals enableSharedLibraries [
+ "-DLLVM_LINK_LLVM_DYLIB=ON"
+ ] ++ optionals enableManpages [
+ "-DLLVM_BUILD_DOCS=ON"
+ "-DLLVM_ENABLE_SPHINX=ON"
+ "-DSPHINX_OUTPUT_MAN=ON"
+ "-DSPHINX_OUTPUT_HTML=OFF"
+ "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+ ] ++ optionals (!isDarwin) [
+ "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+ ] ++ optionals isDarwin [
+ "-DLLVM_ENABLE_LIBCXX=ON"
+ "-DCAN_TARGET_i386=false"
+ ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+ "-DCMAKE_CROSSCOMPILING=True"
+ "-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
+ (
+ let
+ nativeCC = pkgsBuildBuild.targetPackages.stdenv.cc;
+ nativeBintools = nativeCC.bintools.bintools;
+ nativeToolchainFlags = [
+ "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
+ "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
+ "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
+ "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
+ "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
+ ];
+ in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=${lib.concatStringsSep ";" nativeToolchainFlags}"
+ )
+ ];
+
+ postBuild = ''
+ rm -fR $out
+ '';
+
+ preCheck = ''
+ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
+ '';
+
+ postInstall = ''
+ mkdir -p $python/share
+ mv $out/share/opt-viewer $python/share/opt-viewer
+ moveToOutput "bin/llvm-config*" "$dev"
+ substituteInPlace "$dev/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+ --replace "\''${_IMPORT_PREFIX}/lib/lib" "$lib/lib/lib" \
+ --replace "$out/bin/llvm-config" "$dev/bin/llvm-config"
+ substituteInPlace "$dev/lib/cmake/llvm/LLVMConfig.cmake" \
+ --replace 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}")' 'set(LLVM_BINARY_DIR "''${LLVM_INSTALL_PREFIX}'"$lib"'")'
+ ''
+ + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+ ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+ ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+ ''
+ + optionalString (stdenv.buildPlatform != stdenv.hostPlatform) ''
+ cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
+ '';
+
+ doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl);
+
+ checkTarget = "check-all";
+
+ requiredSystemFeatures = [ "big-parallel" ];
+ meta = llvm_meta // {
+ homepage = "https://llvm.org/";
+ description = "A collection of modular and reusable compiler and toolchain technologies";
+ longDescription = ''
+ The LLVM Project is a collection of modular and reusable compiler and
+ toolchain technologies. Despite its name, LLVM has little to do with
+ traditional virtual machines. The name "LLVM" itself is not an acronym; it
+ is the full name of the project.
+ LLVM began as a research project at the University of Illinois, with the
+ goal of providing a modern, SSA-based compilation strategy capable of
+ supporting both static and dynamic compilation of arbitrary programming
+ languages. Since then, LLVM has grown to be an umbrella project consisting
+ of a number of subprojects, many of which are being used in production by
+ a wide variety of commercial and open source projects as well as being
+ widely used in academic research. Code in the LLVM project is licensed
+ under the "Apache 2.0 License with LLVM exceptions".
+ '';
+ };
+} // lib.optionalAttrs enableManpages {
+ pname = "llvm-manpages";
+
+ buildPhase = ''
+ make docs-llvm-man
+ '';
+
+ propagatedBuildInputs = [];
+
+ installPhase = ''
+ make -C docs install
+ '';
+
+ postPatch = null;
+ postInstall = null;
+
+ outputs = [ "out" ];
+
+ doCheck = false;
+
+ meta = llvm_meta // {
+ description = "man pages for LLVM ${version}";
+ };
+})
diff --git a/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch b/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch
new file mode 100644
index 000000000000..68f3c45396f6
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs-polly.patch
@@ -0,0 +1,105 @@
+diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt
+index ca7c04c565bb..6ed5db5dd4f8 100644
+--- a/tools/polly/CMakeLists.txt
++++ b/tools/polly/CMakeLists.txt
+@@ -2,7 +2,11 @@
+ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+ project(Polly)
+ cmake_minimum_required(VERSION 3.13.4)
++endif()
++
++include(GNUInstallDirs)
+
++if (NOT DEFINED LLVM_MAIN_SRC_DIR)
+ # Where is LLVM installed?
+ find_package(LLVM CONFIG REQUIRED)
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
+@@ -122,13 +126,13 @@ include_directories(
+
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ install(DIRECTORY include/
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING
+ PATTERN "*.h"
+ )
+
+ install(DIRECTORY ${POLLY_BINARY_DIR}/include/
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN "CMakeFiles" EXCLUDE
+diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt
+index 7cc129ba2e90..137be25e4b80 100644
+--- a/tools/polly/cmake/CMakeLists.txt
++++ b/tools/polly/cmake/CMakeLists.txt
+@@ -79,18 +79,18 @@ file(GENERATE
+
+ # Generate PollyConfig.cmake for the install tree.
+ unset(POLLY_EXPORTS)
+-set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
++set(POLLY_INSTALL_PREFIX "")
+ set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
+-set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}")
++set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
++set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ if (POLLY_BUNDLED_ISL)
+ set(POLLY_CONFIG_INCLUDE_DIRS
+- "${POLLY_INSTALL_PREFIX}/include"
+- "${POLLY_INSTALL_PREFIX}/include/polly"
++ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}"
++ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly"
+ )
+ else()
+ set(POLLY_CONFIG_INCLUDE_DIRS
+- "${POLLY_INSTALL_PREFIX}/include"
++ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}"
+ ${ISL_INCLUDE_DIRS}
+ )
+ endif()
+@@ -100,12 +100,12 @@ endif()
+ foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
+ get_target_property(tgt_type ${tgt} TYPE)
+ if (tgt_type STREQUAL "EXECUTABLE")
+- set(tgt_prefix "bin/")
++ set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/")
+ else()
+- set(tgt_prefix "lib/")
++ set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/")
+ endif()
+
+- set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$")
++ set(tgt_path "${tgt_prefix}$")
+ file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path})
+
+ if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
+diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
+index 518a09b45a42..bd9d6f5542ad 100644
+--- a/tools/polly/cmake/polly_macros.cmake
++++ b/tools/polly/cmake/polly_macros.cmake
+@@ -44,8 +44,8 @@ macro(add_polly_library name)
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ${name} STREQUAL "LLVMPolly")
+ install(TARGETS ${name}
+ EXPORT LLVMExports
+- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
+- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+ endif()
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
+ endmacro(add_polly_library)
+diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt
+index 8991094d92c7..178d8ad606bb 100644
+--- a/tools/polly/lib/External/CMakeLists.txt
++++ b/tools/polly/lib/External/CMakeLists.txt
+@@ -275,7 +275,7 @@ if (POLLY_BUNDLED_ISL)
+ install(DIRECTORY
+ ${ISL_SOURCE_DIR}/include/
+ ${ISL_BINARY_DIR}/include/
+- DESTINATION include/polly
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN "CMakeFiles" EXCLUDE
diff --git a/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch
new file mode 100644
index 000000000000..18fa5fc6d89c
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/llvm/gnu-install-dirs.patch
@@ -0,0 +1,381 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 135036f509d2..265c36f8211b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -270,15 +270,21 @@ if (CMAKE_BUILD_TYPE AND
+ message(FATAL_ERROR "Invalid value for CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+ endif()
+
++include(GNUInstallDirs)
++
+ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )
+
+-set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
++set(LLVM_TOOLS_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
++ "Path for binary subdirectory (defaults to 'bin')")
+ mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
+
+ set(LLVM_UTILS_INSTALL_DIR "${LLVM_TOOLS_INSTALL_DIR}" CACHE STRING
+ "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
+ mark_as_advanced(LLVM_UTILS_INSTALL_DIR)
+
++set(LLVM_INSTALL_CMAKE_DIR "${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/cmake/llvm" CACHE STRING
++ "Path for CMake subdirectory (defaults to lib/cmake/llvm)" )
++
+ # They are used as destination of target generators.
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+ set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
+@@ -581,9 +587,9 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
+ option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
+ option (LLVM_ENABLE_BINDINGS "Build bindings." ON)
+
+-set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
++set(LLVM_INSTALL_DOXYGEN_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html"
+ CACHE STRING "Doxygen-generated HTML documentation install directory")
+-set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
++set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/ocaml-html"
+ CACHE STRING "OCamldoc-generated HTML documentation install directory")
+
+ option (LLVM_BUILD_EXTERNAL_COMPILER_RT
+@@ -1048,7 +1054,7 @@ endif()
+
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ install(DIRECTORY include/llvm include/llvm-c
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ COMPONENT llvm-headers
+ FILES_MATCHING
+ PATTERN "*.def"
+@@ -1059,7 +1065,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+ )
+
+ install(DIRECTORY ${LLVM_INCLUDE_DIR}/llvm ${LLVM_INCLUDE_DIR}/llvm-c
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ COMPONENT llvm-headers
+ FILES_MATCHING
+ PATTERN "*.def"
+@@ -1073,13 +1079,13 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+
+ if (LLVM_INSTALL_MODULEMAPS)
+ install(DIRECTORY include/llvm include/llvm-c
+- DESTINATION include
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ COMPONENT llvm-headers
+ FILES_MATCHING
+ PATTERN "module.modulemap"
+ )
+ install(FILES include/llvm/module.install.modulemap
+- DESTINATION include/llvm
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm
+ COMPONENT llvm-headers
+ RENAME "module.extern.modulemap"
+ )
+diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
+index 9c2b85374307..5531ceeb2eeb 100644
+--- a/cmake/modules/AddLLVM.cmake
++++ b/cmake/modules/AddLLVM.cmake
+@@ -818,9 +818,9 @@ macro(add_llvm_library name)
+ get_target_export_arg(${name} LLVM export_to_llvmexports ${umbrella})
+ install(TARGETS ${name}
+ ${export_to_llvmexports}
+- LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+- ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
+- RUNTIME DESTINATION bin COMPONENT ${name})
++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} COMPONENT ${name}
++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${name})
+
+ if (NOT LLVM_ENABLE_IDE)
+ add_llvm_install_targets(install-${name}
+@@ -1036,7 +1036,7 @@ function(process_llvm_pass_plugins)
+ "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
+ install(FILES
+ ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
+- DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
++ DESTINATION ${LLVM_INSTALL_CMAKE_DIR}
+ COMPONENT cmake-exports)
+
+ set(ExtensionDef "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
+@@ -1250,7 +1250,7 @@ macro(add_llvm_example name)
+ endif()
+ add_llvm_executable(${name} ${ARGN})
+ if( LLVM_BUILD_EXAMPLES )
+- install(TARGETS ${name} RUNTIME DESTINATION examples)
++ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+ endif()
+ set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endmacro(add_llvm_example name)
+@@ -1868,7 +1868,7 @@ function(llvm_install_library_symlink name dest type)
+ set(full_name ${CMAKE_${type}_LIBRARY_PREFIX}${name}${CMAKE_${type}_LIBRARY_SUFFIX})
+ set(full_dest ${CMAKE_${type}_LIBRARY_PREFIX}${dest}${CMAKE_${type}_LIBRARY_SUFFIX})
+
+- set(output_dir lib${LLVM_LIBDIR_SUFFIX})
++ set(output_dir ${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+ if(WIN32 AND "${type}" STREQUAL "SHARED")
+ set(output_dir bin)
+ endif()
+@@ -1879,7 +1879,7 @@ function(llvm_install_library_symlink name dest type)
+
+ endfunction()
+
+-function(llvm_install_symlink name dest)
++function(llvm_install_symlink name dest output_dir)
+ cmake_parse_arguments(ARG "ALWAYS_GENERATE" "COMPONENT" "" ${ARGN})
+ foreach(path ${CMAKE_MODULE_PATH})
+ if(EXISTS ${path}/LLVMInstallSymlink.cmake)
+@@ -1902,7 +1902,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)
+@@ -1985,7 +1985,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()
+@@ -2114,9 +2115,9 @@ function(llvm_setup_rpath name)
+ # Since BUILD_SHARED_LIBS is only recommended for use by developers,
+ # hardcode the rpath to build/install lib dir first in this mode.
+ # FIXME: update this when there is better solution.
+- set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++ set(_install_rpath "${LLVM_LIBRARY_OUTPUT_INTDIR}" "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ elseif(UNIX)
+- set(_install_rpath "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
++ set(_install_rpath "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}" ${extra_libdir})
+ if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
+ set_property(TARGET ${name} APPEND_STRING PROPERTY
+ LINK_FLAGS " -Wl,-z,origin ")
+diff --git a/cmake/modules/AddOCaml.cmake b/cmake/modules/AddOCaml.cmake
+index 554046b20edf..4d1ad980641e 100644
+--- a/cmake/modules/AddOCaml.cmake
++++ b/cmake/modules/AddOCaml.cmake
+@@ -144,9 +144,9 @@ function(add_ocaml_library name)
+ endforeach()
+
+ if( APPLE )
+- set(ocaml_rpath "@executable_path/../../../lib${LLVM_LIBDIR_SUFFIX}")
++ set(ocaml_rpath "@executable_path/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ elseif( UNIX )
+- set(ocaml_rpath "\\$ORIGIN/../../../lib${LLVM_LIBDIR_SUFFIX}")
++ set(ocaml_rpath "\\$ORIGIN/../../../${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
+ endif()
+ list(APPEND ocaml_flags "-ldopt" "-Wl,-rpath,${ocaml_rpath}")
+
+diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
+index e80c3b5c1cac..482f6d715ef5 100644
+--- a/cmake/modules/AddSphinxTarget.cmake
++++ b/cmake/modules/AddSphinxTarget.cmake
+@@ -90,7 +90,7 @@ function (add_sphinx_target builder project)
+ endif()
+ elseif (builder STREQUAL html)
+ string(TOUPPER "${project}" project_upper)
+- set(${project_upper}_INSTALL_SPHINX_HTML_DIR "share/doc/${project}/html"
++ set(${project_upper}_INSTALL_SPHINX_HTML_DIR "${CMAKE_INSTALL_DOCDIR}/${project}/html"
+ CACHE STRING "HTML documentation install directory for ${project}")
+
+ # '/.' indicates: copy the contents of the directory directly into
+diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
+index 51b6a4fdc284..4adc2acfc074 100644
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ include(LLVMDistributionSupport)
+
+-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.
+@@ -109,13 +109,13 @@ foreach(p ${_count})
+ set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
+ get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
+ endforeach(p)
+-set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
++set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
+ set(LLVM_CONFIG_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+ set(LLVM_CONFIG_MAIN_INCLUDE_DIR "${LLVM_CONFIG_INCLUDE_DIRS}")
+-set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
++set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
+ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
+-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
++set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}")
+
+ # Generate a default location for lit
+ if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS)
+diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
+index 3e6a2c9a2648..52e14d955c60 100644
+--- a/cmake/modules/LLVMInstallSymlink.cmake
++++ b/cmake/modules/LLVMInstallSymlink.cmake
+@@ -4,7 +4,7 @@
+
+ function(install_symlink name target outdir)
+ set(DESTDIR $ENV{DESTDIR})
+- set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
++ set(bindir "${DESTDIR}${outdir}/")
+
+ message(STATUS "Creating ${name}")
+
+diff --git a/docs/CMake.rst b/docs/CMake.rst
+index f1ac2c7d4934..c6e1469b5e13 100644
+--- a/docs/CMake.rst
++++ b/docs/CMake.rst
+@@ -202,7 +202,7 @@ CMake manual, or execute ``cmake --help-variable VARIABLE_NAME``.
+ **LLVM_LIBDIR_SUFFIX**:STRING
+ Extra suffix to append to the directory where libraries are to be
+ installed. On a 64-bit architecture, one could use ``-DLLVM_LIBDIR_SUFFIX=64``
+- to install libraries to ``/usr/lib64``.
++ to install libraries to ``/usr/lib64``. See also ``CMAKE_INSTALL_LIBDIR``.
+
+ Rarely-used CMake variables
+ ---------------------------
+@@ -551,8 +551,8 @@ LLVM-specific variables
+
+ **LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
+ The path to install Doxygen-generated HTML documentation to. This path can
+- either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+- `share/doc/llvm/doxygen-html`.
++ either be absolute or relative to the ``CMAKE_INSTALL_PREFIX``. Defaults to
++ `${CMAKE_INSTALL_DOCDIR}/${project}/doxygen-html`.
+
+ **LLVM_LINK_LLVM_DYLIB**:BOOL
+ If enabled, tools will be linked with the libLLVM shared library. Defaults
+@@ -792,9 +792,11 @@ the ``cmake`` command or by setting it directly in ``ccmake`` or ``cmake-gui``).
+
+ This file is available in two different locations.
+
+-* ``/lib/cmake/llvm/LLVMConfig.cmake`` where
+- ```` is the install prefix of an installed version of LLVM.
+- On Linux typically this is ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
++* ``LLVMConfig.cmake`` where
++ ```` is the location where LLVM CMake modules are
++ installed as part of an installed version of LLVM. This is typically
++ ``cmake/llvm/`` within the lib directory. On Linux, this is typically
++ ``/usr/lib/cmake/llvm/LLVMConfig.cmake``.
+
+ * ``/lib/cmake/llvm/LLVMConfig.cmake`` where
+ ```` is the root of the LLVM build tree. **Note: this is only
+diff --git a/examples/Bye/CMakeLists.txt b/examples/Bye/CMakeLists.txt
+index bb96edb4b4bf..678c22fb43c8 100644
+--- a/examples/Bye/CMakeLists.txt
++++ b/examples/Bye/CMakeLists.txt
+@@ -14,6 +14,6 @@ if (NOT WIN32)
+ BUILDTREE_ONLY
+ )
+
+- install(TARGETS ${name} RUNTIME DESTINATION examples)
++ install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_DOCDIR}/examples)
+ set_target_properties(${name} PROPERTIES FOLDER "Examples")
+ endif()
+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
+index ebe5b73a5c65..70c497be12f5 100644
+--- a/tools/llvm-config/BuildVariables.inc.in
++++ b/tools/llvm-config/BuildVariables.inc.in
+@@ -23,6 +23,10 @@
+ #define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
+ #define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
+ #define LLVM_LIBDIR_SUFFIX "@LLVM_LIBDIR_SUFFIX@"
++#define LLVM_INSTALL_BINDIR "@CMAKE_INSTALL_BINDIR@"
++#define LLVM_INSTALL_LIBDIR "@CMAKE_INSTALL_LIBDIR@"
++#define LLVM_INSTALL_INCLUDEDIR "@CMAKE_INSTALL_INCLUDEDIR@"
++#define LLVM_INSTALL_CMAKEDIR "@LLVM_INSTALL_CMAKE_DIR@"
+ #define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
+ #define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
+ #define LLVM_BUILD_SYSTEM "@LLVM_BUILD_SYSTEM@"
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 1a2f04552d13..44fa7d3eec6b 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -357,12 +357,26 @@ int main(int argc, char **argv) {
+ ("-I" + ActiveIncludeDir + " " + "-I" + ActiveObjRoot + "/include");
+ } else {
+ ActivePrefix = CurrentExecPrefix;
+- ActiveIncludeDir = ActivePrefix + "/include";
+- SmallString<256> path(StringRef(LLVM_TOOLS_INSTALL_DIR));
+- sys::fs::make_absolute(ActivePrefix, path);
+- ActiveBinDir = std::string(path.str());
+- ActiveLibDir = ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX;
+- ActiveCMakeDir = ActiveLibDir + "/cmake/llvm";
++ {
++ SmallString<256> path(StringRef(LLVM_INSTALL_INCLUDEDIR));
++ sys::fs::make_absolute(ActivePrefix, path);
++ ActiveIncludeDir = std::string(path.str());
++ }
++ {
++ SmallString<256> path(StringRef(LLVM_INSTALL_BINDIR));
++ sys::fs::make_absolute(ActivePrefix, path);
++ ActiveBinDir = std::string(path.str());
++ }
++ {
++ SmallString<256> path(StringRef(LLVM_INSTALL_LIBDIR LLVM_LIBDIR_SUFFIX));
++ sys::fs::make_absolute(ActivePrefix, path);
++ ActiveLibDir = std::string(path.str());
++ }
++ {
++ SmallString<256> path(StringRef(LLVM_INSTALL_CMAKEDIR));
++ sys::fs::make_absolute(ActivePrefix, path);
++ ActiveCMakeDir = std::string(path.str());
++ }
+ ActiveIncludeOption = "-I" + ActiveIncludeDir;
+ }
+
+diff --git a/tools/lto/CMakeLists.txt b/tools/lto/CMakeLists.txt
+index 0af29ad762c5..37b99b83e35c 100644
+--- a/tools/lto/CMakeLists.txt
++++ b/tools/lto/CMakeLists.txt
+@@ -33,7 +33,7 @@ add_llvm_library(${LTO_LIBRARY_NAME} ${LTO_LIBRARY_TYPE} INSTALL_WITH_TOOLCHAIN
+ ${SOURCES} DEPENDS intrinsics_gen)
+
+ install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
+- DESTINATION include/llvm-c
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+ COMPONENT LTO)
+
+ if (APPLE)
+diff --git a/tools/opt-viewer/CMakeLists.txt b/tools/opt-viewer/CMakeLists.txt
+index ead73ec13a8f..250362021f17 100644
+--- a/tools/opt-viewer/CMakeLists.txt
++++ b/tools/opt-viewer/CMakeLists.txt
+@@ -8,7 +8,7 @@ set (files
+
+ foreach (file ${files})
+ install(PROGRAMS ${file}
+- DESTINATION share/opt-viewer
++ DESTINATION ${CMAKE_INSTALL_DATADIR}/opt-viewer
+ COMPONENT opt-viewer)
+ endforeach (file)
+
+diff --git a/tools/remarks-shlib/CMakeLists.txt b/tools/remarks-shlib/CMakeLists.txt
+index 865436247270..ce1daa62f6ab 100644
+--- a/tools/remarks-shlib/CMakeLists.txt
++++ b/tools/remarks-shlib/CMakeLists.txt
+@@ -19,7 +19,7 @@ if(LLVM_ENABLE_PIC)
+ endif()
+
+ install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/Remarks.h
+- DESTINATION include/llvm-c
++ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/llvm-c
+ COMPONENT Remarks)
+
+ if (APPLE)
diff --git a/pkgs/development/compilers/llvm/13/llvm/outputs.patch b/pkgs/development/compilers/llvm/13/llvm/outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/llvm/outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+ ActiveIncludeOption = "-I" + ActiveIncludeDir;
+ }
+
++ /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++ if (!IsInDevelopmentTree) {
++ bool WantShared = true;
++ for (int i = 1; i < argc; ++i) {
++ StringRef Arg = argv[i];
++ if (Arg == "--link-shared")
++ WantShared = true;
++ else if (Arg == "--link-static")
++ WantShared = false; // the last one wins
++ }
++
++ if (WantShared)
++ ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++ }
++
+ /// We only use `shared library` mode in cases where the static library form
+ /// of the components provided are not available; note however that this is
+ /// skipped if we're run from within the build dir. However, once installed,
diff --git a/pkgs/development/compilers/llvm/13/openmp/default.nix b/pkgs/development/compilers/llvm/13/openmp/default.nix
new file mode 100644
index 000000000000..c5a33df97560
--- /dev/null
+++ b/pkgs/development/compilers/llvm/13/openmp/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, stdenv
+, llvm_meta
+, src
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+ pname = "openmp";
+ inherit version;
+
+ inherit src;
+ sourceRoot = "source/${pname}";
+
+ nativeBuildInputs = [ cmake perl ];
+ buildInputs = [ llvm ];
+
+ cmakeFlags = [
+ "-DLIBOMPTARGET_BUILD_AMDGCN_BCLIB=OFF" # Building the AMDGCN device RTL currently fails
+ ];
+
+ meta = llvm_meta // {
+ homepage = "https://openmp.llvm.org/";
+ description = "Support for the OpenMP language";
+ longDescription = ''
+ The OpenMP subproject of LLVM contains the components required to build an
+ executable OpenMP program that are outside the compiler itself.
+ Contains the code for the runtime library against which code compiled by
+ "clang -fopenmp" must be linked before it can run and the library that
+ supports offload to target devices.
+ '';
+ # "All of the code is dual licensed under the MIT license and the UIUC
+ # License (a BSD-like license)":
+ license = with lib.licenses; [ mit ncsa ];
+ };
+}
diff --git a/pkgs/development/compilers/llvm/git/compiler-rt/codesign.patch b/pkgs/development/compilers/llvm/git/compiler-rt/codesign.patch
index 3cc12b94b200..065959d14d46 100644
--- a/pkgs/development/compilers/llvm/git/compiler-rt/codesign.patch
+++ b/pkgs/development/compilers/llvm/git/compiler-rt/codesign.patch
@@ -11,10 +11,10 @@ Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
3 files changed, 107 deletions(-)
diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
-index bc5fb9ff7..b64eb4246 100644
+index bc69ec95c419..9f100fdcec2f 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
-@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
+@@ -366,14 +366,6 @@ function(add_compiler_rt_runtime name type)
set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
endif()
@@ -23,11 +23,11 @@ index bc5fb9ff7..b64eb4246 100644
- add_custom_command(TARGET ${libname}
- POST_BUILD
- COMMAND codesign --sign - $
-- WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+- WORKING_DIRECTORY ${COMPILER_RT_OUTPUT_LIBRARY_DIR}
- )
- endif()
endif()
- install(TARGETS ${libname}
- ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+
+ set(parent_target_arg)
2.14.1
diff --git a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix
index 8aeaabb0cd33..8e258e349b9d 100644
--- a/pkgs/development/compilers/llvm/git/compiler-rt/default.nix
+++ b/pkgs/development/compilers/llvm/git/compiler-rt/default.nix
@@ -56,7 +56,6 @@ stdenv.mkDerivation {
patches = [
./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
- ./gnu-install-dirs.patch
# ld-wrapper dislikes `-rpath-link //nix/store`, so we normalize away the
# extra `/`.
./normalize-var.patch
diff --git a/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch
deleted file mode 100644
index 5f025764de1c..000000000000
--- a/pkgs/development/compilers/llvm/git/compiler-rt/gnu-install-dirs.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index b44ad2c2118e..d42f5664d448 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -8,6 +8,7 @@ cmake_minimum_required(VERSION 3.13.4)
- # 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)
-+ include(GNUInstallDirs)
- set(COMPILER_RT_STANDALONE_BUILD TRUE)
- set_property(GLOBAL PROPERTY USE_FOLDERS ON)
- endif()
-diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
-index 361538a58e47..f0d8d9ab80f1 100644
---- a/cmake/Modules/AddCompilerRT.cmake
-+++ b/cmake/Modules/AddCompilerRT.cmake
-@@ -495,7 +495,7 @@ macro(add_compiler_rt_resource_file target_name file_name component)
- add_custom_target(${target_name} DEPENDS ${dst_file})
- # Install in Clang resource directory.
- install(FILES ${file_name}
-- DESTINATION ${COMPILER_RT_INSTALL_PATH}/share
-+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR}
- COMPONENT ${component})
- add_dependencies(${component} ${target_name})
-
-@@ -512,7 +512,7 @@ macro(add_compiler_rt_script name)
- add_custom_target(${name} DEPENDS ${dst})
- install(FILES ${dst}
- PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
-- DESTINATION ${COMPILER_RT_INSTALL_PATH}/bin)
-+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_BINDIR})
- endmacro(add_compiler_rt_script src name)
-
- # Builds custom version of libc++ and installs it in .
-diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake
-index 456a8dcda59f..7a09e74c7c79 100644
---- a/cmake/Modules/CompilerRTDarwinUtils.cmake
-+++ b/cmake/Modules/CompilerRTDarwinUtils.cmake
-@@ -508,7 +508,7 @@ macro(darwin_add_embedded_builtin_libraries)
- set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
- ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
- set(DARWIN_macho_embedded_LIBRARY_INSTALL_DIR
-- ${COMPILER_RT_INSTALL_PATH}/lib/macho_embedded)
-+ ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/macho_embedded)
-
- set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
- set(CFLAGS_i386 "-march=pentium")
-diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake
-index f61d487e93a0..f1f46fb9599c 100644
---- a/cmake/Modules/CompilerRTUtils.cmake
-+++ b/cmake/Modules/CompilerRTUtils.cmake
-@@ -378,7 +378,7 @@ endfunction()
- function(get_compiler_rt_install_dir arch install_dir)
- if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
- get_compiler_rt_target(${arch} target)
-- set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/lib/${target} PARENT_SCOPE)
-+ set(${install_dir} ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${target} PARENT_SCOPE)
- else()
- set(${install_dir} ${COMPILER_RT_LIBRARY_INSTALL_DIR} PARENT_SCOPE)
- endif()
-diff --git a/cmake/base-config-ix.cmake b/cmake/base-config-ix.cmake
-index 1edab43e7c0d..1aac6b73ff82 100644
---- a/cmake/base-config-ix.cmake
-+++ b/cmake/base-config-ix.cmake
-@@ -65,11 +65,11 @@ if (LLVM_TREE_AVAILABLE)
- else()
- # Take output dir and install path from the user.
- set(COMPILER_RT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH
-- "Path where built compiler-rt libraries should be stored.")
-+ "Path where built compiler-rt build artifacts should be stored.")
- set(COMPILER_RT_EXEC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/bin CACHE PATH
- "Path where built compiler-rt executables should be stored.")
-- set(COMPILER_RT_INSTALL_PATH ${CMAKE_INSTALL_PREFIX} CACHE PATH
-- "Path where built compiler-rt libraries should be installed.")
-+ set(COMPILER_RT_INSTALL_PATH "" CACHE PATH
-+ "Prefix where built compiler-rt artifacts should be installed, comes before CMAKE_INSTALL_PREFIX.")
- option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." OFF)
- option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" OFF)
- # Use a host compiler to compile/link tests.
-@@ -97,7 +97,7 @@ else(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR)
- set(COMPILER_RT_LIBRARY_OUTPUT_DIR
- ${COMPILER_RT_OUTPUT_DIR}/lib/${COMPILER_RT_OS_DIR})
- set(COMPILER_RT_LIBRARY_INSTALL_DIR
-- ${COMPILER_RT_INSTALL_PATH}/lib/${COMPILER_RT_OS_DIR})
-+ ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_LIBDIR}/${COMPILER_RT_OS_DIR})
- endif()
-
- if(APPLE)
-diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
-index b00e8caa1ddd..0fe64e4862c9 100644
---- a/include/CMakeLists.txt
-+++ b/include/CMakeLists.txt
-@@ -69,22 +69,22 @@ set_target_properties(compiler-rt-headers PROPERTIES FOLDER "Compiler-RT Misc")
- install(FILES ${SANITIZER_HEADERS}
- COMPONENT compiler-rt-headers
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/sanitizer)
-+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/sanitizer)
- # Install fuzzer headers.
- install(FILES ${FUZZER_HEADERS}
- COMPONENT compiler-rt-headers
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/fuzzer)
-+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/fuzzer)
- # Install xray headers.
- install(FILES ${XRAY_HEADERS}
- COMPONENT compiler-rt-headers
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/xray)
-+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/xray)
- # Install profile headers.
- install(FILES ${PROFILE_HEADERS}
- COMPONENT compiler-rt-headers
- PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-- DESTINATION ${COMPILER_RT_INSTALL_PATH}/include/profile)
-+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_INCLUDEDIR}/profile)
-
- if (NOT CMAKE_CONFIGURATION_TYPES) # don't add this for IDEs.
- add_custom_target(install-compiler-rt-headers
-diff --git a/lib/dfsan/CMakeLists.txt b/lib/dfsan/CMakeLists.txt
-index a29de8deff1b..d39ff01613d2 100644
---- a/lib/dfsan/CMakeLists.txt
-+++ b/lib/dfsan/CMakeLists.txt
-@@ -57,4 +57,4 @@ add_custom_command(OUTPUT ${dfsan_abilist_filename}
- DEPENDS done_abilist.txt libc_ubuntu1404_abilist.txt)
- add_dependencies(dfsan dfsan_abilist)
- install(FILES ${dfsan_abilist_filename}
-- DESTINATION ${COMPILER_RT_INSTALL_PATH}/share)
-+ DESTINATION ${COMPILER_RT_INSTALL_PATH}/${CMAKE_INSTALL_FULL_DATADIR})
diff --git a/pkgs/development/compilers/llvm/git/default.nix b/pkgs/development/compilers/llvm/git/default.nix
index 8b1fca6c8b1e..35be7eb03c93 100644
--- a/pkgs/development/compilers/llvm/git/default.nix
+++ b/pkgs/development/compilers/llvm/git/default.nix
@@ -21,8 +21,8 @@ let
release_version = "13.0.0";
candidate = ""; # empty or "rcN"
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
- rev = "98033fdc50e61273b1d5c77ba5f0f75afe3965c1"; # When using a Git commit
- rev-version = "unstable-2021-07-12"; # When using a Git commit
+ rev = "f98ed74f6910f8b09e77497aeb30c860c433610d"; # When using a Git commit
+ rev-version = "unstable-2021-07-16"; # When using a Git commit
version = if rev != "" then rev-version else "${release_version}${dash-candidate}";
targetConfig = stdenv.targetPlatform.config;
@@ -30,7 +30,7 @@ let
owner = "llvm";
repo = "llvm-project";
rev = if rev != "" then rev else "llvmorg-${version}";
- sha256 = "0m28wpkyymzgqflp8xwyab0vryn3jln565qk15qm839n0d0mq3hh";
+ sha256 = "1dp0n3rpg60xr321mvn2gi268pfcs6ii4nnwgsi2lix0di4h3ccb";
};
llvm_meta = {
@@ -77,18 +77,17 @@ let
clang-unwrapped = tools.libclang.out // { outputUnspecified = true; };
- # disabled until recommonmark supports sphinx 3
- #Llvm-manpages = lowPrio (tools.libllvm.override {
- # enableManpages = true;
- # python3 = pkgs.python3; # don't use python-boot
- #});
+ llvm-manpages = lowPrio (tools.libllvm.override {
+ enableManpages = true;
+ python3 = pkgs.python3; # don't use python-boot
+ });
clang-manpages = lowPrio (tools.libclang.override {
enableManpages = true;
python3 = pkgs.python3; # don't use python-boot
});
- # disabled until recommonmark supports sphinx 3
+ # TODO: lldb/docs/index.rst:155:toctree contains reference to nonexisting document 'design/structureddataplugins'
# lldb-manpages = lowPrio (tools.lldb.override {
# enableManpages = true;
# python3 = pkgs.python3; # don't use python-boot
diff --git a/pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch
index f59d7f8dfafc..744967a6ee0b 100644
--- a/pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/git/libcxx/gnu-install-dirs.patch
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 06ee1d74a03e..6c3c6f8f8d47 100644
+index b1e25358d41a..7fe1f4d85401 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -28,6 +28,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
+@@ -26,6 +26,8 @@ set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build")
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD)
project(libcxx CXX C)
@@ -11,32 +11,33 @@ index 06ee1d74a03e..6c3c6f8f8d47 100644
set(PACKAGE_NAME libcxx)
set(PACKAGE_VERSION 13.0.0git)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
-@@ -409,7 +411,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+@@ -412,7 +414,7 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
-- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE})
-+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE})
- set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1")
- set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1")
- if(LIBCXX_LIBDIR_SUBDIR)
-@@ -420,14 +422,14 @@ elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
+- 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
+ "Path where built libc++ libraries should be installed.")
+ set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ "Path where target-agnostic libc++ headers should be installed.")
+@@ -426,7 +428,7 @@ 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})
-+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
- set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1")
- set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}")
- else()
+- 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_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ "Path where target-agnostic libc++ headers should be installed.")
+@@ -436,7 +438,7 @@ else()
set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX})
set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}")
-- set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX})
-+ set(LIBCXX_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXX_LIBDIR_SUFFIX})
- set(LIBCXX_INSTALL_INCLUDE_DIR "include/c++/v1")
- set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}")
- endif()
+- 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_INCLUDE_DIR "include/c++/v1" CACHE PATH
+ "Path where target-agnostic libc++ headers should be installed.")
diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake
index 5a8a4a270a1a..c06bae0001aa 100644
--- a/cmake/Modules/HandleLibCXXABI.cmake
@@ -51,10 +52,10 @@ index 5a8a4a270a1a..c06bae0001aa 100644
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 87b71f7ba334..d20a783079b7 100644
+index 496429f3841e..1a0c9c0a3159 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -369,21 +369,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY)
+@@ -376,21 +376,21 @@ if (LIBCXX_INSTALL_SHARED_LIBRARY)
install(TARGETS cxx_shared
ARCHIVE DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
LIBRARY DESTINATION ${LIBCXX_INSTALL_LIBRARY_DIR} COMPONENT cxx
diff --git a/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch
index 45641acb0c74..5d562dd59a99 100644
--- a/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/git/libcxxabi/gnu-install-dirs.patch
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1e8b73aa38cc..6f7b2a25d205 100644
+index 9fb35860d483..5739d9e8af62 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,6 +27,8 @@ set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
@@ -11,26 +11,27 @@ index 1e8b73aa38cc..6f7b2a25d205 100644
set(PACKAGE_NAME libcxxabi)
set(PACKAGE_VERSION 11.0.0git)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
-@@ -196,7 +198,7 @@ set(CMAKE_MODULE_PATH
+@@ -195,7 +197,7 @@ set(CMAKE_MODULE_PATH
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
-- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE})
-+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE})
+- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH
+ "Path where built libc++abi libraries should be installed.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
- string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
-@@ -204,11 +206,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+@@ -204,12 +206,12 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
-- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
-+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+ "Path where built libc++abi libraries should be installed.")
else()
set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
-- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX})
-+ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX})
+- set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
++ set(LIBCXXABI_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LIBCXXABI_LIBDIR_SUFFIX} CACHE PATH
+ "Path where built libc++abi libraries should be installed.")
endif()
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
diff --git a/pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch b/pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch
index 56231cd31b2a..8cd25c56f8cc 100644
--- a/pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch
+++ b/pkgs/development/compilers/llvm/git/libunwind/gnu-install-dirs.patch
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index a2c03fd3f8aa..98de2f8ea7c8 100644
+index 81eddbc24879..e2afb2002150 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,6 +23,8 @@ set(LIBUNWIND_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
@@ -11,24 +11,26 @@ index a2c03fd3f8aa..98de2f8ea7c8 100644
set(PACKAGE_NAME libunwind)
set(PACKAGE_VERSION 13.0.0git)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
-@@ -116,17 +118,17 @@ set(CMAKE_MODULE_PATH
+@@ -116,7 +118,7 @@ set(CMAKE_MODULE_PATH
if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
-- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE})
-+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE})
+- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${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.")
if(LIBCXX_LIBDIR_SUBDIR)
string(APPEND LIBUNWIND_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
- string(APPEND LIBUNWIND_INSTALL_LIBRARY_DIR /${LIBUNWIND_LIBDIR_SUBDIR})
+@@ -124,11 +126,11 @@ if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
endif()
elseif(LLVM_LIBRARY_OUTPUT_INTDIR)
set(LIBUNWIND_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
-- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
-+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH
+ "Path where built libunwind libraries should be installed.")
else()
set(LIBUNWIND_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBUNWIND_LIBDIR_SUFFIX})
-- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX})
-+ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX})
+- set(LIBUNWIND_INSTALL_LIBRARY_DIR lib${LIBUNWIND_LIBDIR_SUFFIX} CACHE PATH
++ set(LIBUNWIND_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}${LLVM_LIBDIR_SUFFIX} CACHE PATH
+ "Path where built libunwind libraries should be installed.")
endif()
- set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBUNWIND_LIBRARY_DIR})
diff --git a/pkgs/development/compilers/llvm/git/lldb/default.nix b/pkgs/development/compilers/llvm/git/lldb/default.nix
index f8c7e7b55e67..2dd6c46eb82c 100644
--- a/pkgs/development/compilers/llvm/git/lldb/default.nix
+++ b/pkgs/development/compilers/llvm/git/lldb/default.nix
@@ -53,8 +53,7 @@ stdenv.mkDerivation (rec {
libedit
libxml2
libllvm
- ]
- ++ lib.optionals stdenv.isDarwin [
+ ] ++ lib.optionals stdenv.isDarwin [
libobjc
xpc
Foundation
diff --git a/pkgs/development/interpreters/clojure/babashka.nix b/pkgs/development/interpreters/clojure/babashka.nix
index 1b6edcd1dd4b..145391229ed9 100644
--- a/pkgs/development/interpreters/clojure/babashka.nix
+++ b/pkgs/development/interpreters/clojure/babashka.nix
@@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
"--no-server"
"--report-unsupported-elements-at-runtime"
"--initialize-at-run-time=org.postgresql.sspi.SSPIClient"
+ "--initialize-at-run-time=org.httpkit.client.ClientSslEngineFactory\$SSLHolder"
"--native-image-info"
"--verbose"
"-H:ServiceLoaderFeatureExcludeServices=javax.sound.sampled.spi.AudioFileReader"
diff --git a/pkgs/development/interpreters/clojure/default.nix b/pkgs/development/interpreters/clojure/default.nix
index 9ae94f0a2487..77ec74e8c3f5 100644
--- a/pkgs/development/interpreters/clojure/default.nix
+++ b/pkgs/development/interpreters/clojure/default.nix
@@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
pname = "clojure";
- version = "1.10.3.855";
+ version = "1.10.3.933";
src = fetchurl {
# https://clojure.org/releases/tools
url = "https://download.clojure.org/install/clojure-tools-${version}.tar.gz";
- sha256 = "sha256-y2PuOBRq5kZlTpPV8NwkWhspQKlNxwjl+k/Drwixk4Q=";
+ sha256 = "sha256-xsm0/HNWr8a/7iLQVC9TbUkASWvw/EI3bD0dMDhLZXA=";
};
nativeBuildInputs = [
diff --git a/pkgs/development/ocaml-modules/sedlex/2.nix b/pkgs/development/ocaml-modules/sedlex/2.nix
index 6db40dd9c7eb..9f4badbc7cad 100644
--- a/pkgs/development/ocaml-modules/sedlex/2.nix
+++ b/pkgs/development/ocaml-modules/sedlex/2.nix
@@ -13,25 +13,25 @@ then throw "sedlex is not available for OCaml ${ocaml.version}"
else
let
- unicodeVersion = "12.1.0";
+ unicodeVersion = "13.0.0";
baseUrl = "https://www.unicode.org/Public/${unicodeVersion}";
DerivedCoreProperties = fetchurl {
url = "${baseUrl}/ucd/DerivedCoreProperties.txt";
- sha256 = "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6";
+ sha256 = "0j12x112cd8fpgazkc8izxnhhpia44p1m36ff8yapslxndcmzm55";
};
DerivedGeneralCategory = fetchurl {
url = "${baseUrl}/ucd/extracted/DerivedGeneralCategory.txt";
- sha256 = "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q";
+ sha256 = "0w6mkz4w79k23bnmwgfxc4yqc2ypv8ilrjn6nk25hrafksbg00j5";
};
PropList = fetchurl {
url = "${baseUrl}/ucd/PropList.txt";
- sha256 = "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk";
+ sha256 = "1ks0585wimygbk2wqi9hqg8gyl25iffvdad5vya1zgsxs8z5lns8";
};
in
buildDunePackage rec {
pname = "sedlex";
- version = "2.3";
+ version = "2.4";
useDune2 = true;
@@ -39,7 +39,7 @@ buildDunePackage rec {
owner = "ocaml-community";
repo = "sedlex";
rev = "v${version}";
- sha256 = "0iw3phlaqr27jdf857hmj5v5hdl0vngbb2h37p2ll18sw991fxar";
+ sha256 = "13g8az4zqg6hrnxmy3qrasslppzlag13dd1dsr8vlpg2vpfmfv6i";
};
propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/aiowinreg/default.nix b/pkgs/development/python-modules/aiowinreg/default.nix
index 3bfbbf7c12bc..59a2483d02ee 100644
--- a/pkgs/development/python-modules/aiowinreg/default.nix
+++ b/pkgs/development/python-modules/aiowinreg/default.nix
@@ -8,13 +8,13 @@
buildPythonPackage rec {
pname = "aiowinreg";
- version = "0.0.6";
+ version = "0.0.7";
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
- sha256 = "0h0r9xrz1n8y75f2p21f7phqrlpsymyiipmgzr0lj591irzjmjjy";
+ sha256 = "1p88q2b6slm1sw3234r40s9jd03fqlkcx8y3iwg6ihf0z4ww14d1";
};
propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/forecast-solar/default.nix b/pkgs/development/python-modules/forecast-solar/default.nix
index 91b9ce3da005..71c517c52b85 100644
--- a/pkgs/development/python-modules/forecast-solar/default.nix
+++ b/pkgs/development/python-modules/forecast-solar/default.nix
@@ -1,24 +1,28 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
+, pythonOlder
, aiodns
, aiohttp
+, backports-zoneinfo
}:
buildPythonPackage rec {
pname = "forecast-solar";
- version = "1.3.1";
+ version = "2.0.0";
src = fetchFromGitHub {
owner = "home-assistant-libs";
repo = "forecast_solar";
rev = version;
- sha256 = "1kqzr1ypvdjw0zvac4spb6xdd2qpms9h8nr6vf0w9qx756ir0f95";
+ sha256 = "12d9bb3q7gp0yy152x0rcbi727wrg3w9458asp2nhnqlb8nm6j4d";
};
propagatedBuildInputs = [
aiodns
aiohttp
+ ] ++ lib.optionals (pythonOlder "3.9") [
+ backports-zoneinfo
];
# no unit tests implemented
diff --git a/pkgs/development/python-modules/ufonormalizer/default.nix b/pkgs/development/python-modules/ufonormalizer/default.nix
index 357c09ab4e8d..5d0af719a39b 100644
--- a/pkgs/development/python-modules/ufonormalizer/default.nix
+++ b/pkgs/development/python-modules/ufonormalizer/default.nix
@@ -2,13 +2,13 @@
buildPythonPackage rec {
pname = "ufonormalizer";
- version = "0.5.4";
+ version = "0.6.0";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
- sha256 = "11l8475p3nq7azim35l5lck8vrgjgd01plnji6gg1hf9ckswr2pb";
+ sha256 = "0w44qlvg4xks7jb0lf3lhsbylagq956x0wkcal9ix34bz3p7vdxd";
extension = "zip";
};
diff --git a/pkgs/development/tools/analysis/tfsec/default.nix b/pkgs/development/tools/analysis/tfsec/default.nix
index 45ba1223e84a..57fe4125658d 100644
--- a/pkgs/development/tools/analysis/tfsec/default.nix
+++ b/pkgs/development/tools/analysis/tfsec/default.nix
@@ -5,13 +5,13 @@
buildGoPackage rec {
pname = "tfsec";
- version = "0.55.0";
+ version = "0.55.1";
src = fetchFromGitHub {
owner = "aquasecurity";
repo = pname;
rev = "v${version}";
- sha256 = "1l71r9il45svdwydvi08hnyh310j0gha11qhyqvdz14d8czf8ahn";
+ sha256 = "0s18hfy1gnnvhppvapj8n066pb0fc7w3sm0zm0mzjd58h11x0bbr";
};
goPackagePath = "github.com/aquasecurity/tfsec";
diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix
index 3afe88043dee..cdcae79dde1e 100644
--- a/pkgs/development/tools/build-managers/gradle/default.nix
+++ b/pkgs/development/tools/build-managers/gradle/default.nix
@@ -9,8 +9,9 @@ let
url = "https://services.gradle.org/distributions/${name}-bin.zip";
};
};
-in rec {
- gradleGen = {name, src, nativeVersion} : stdenv.mkDerivation {
+in
+rec {
+ gradleGen = { name, src, nativeVersion }: stdenv.mkDerivation {
inherit name src nativeVersion;
dontBuild = true;
@@ -27,20 +28,21 @@ in rec {
'';
fixupPhase = if (!stdenv.isLinux) then ":" else
- let arch = if stdenv.is64bit then "amd64" else "i386"; in ''
- mkdir patching
- pushd patching
- jar xf $out/lib/gradle/lib/native-platform-linux-${arch}-${nativeVersion}.jar
- patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64" net/rubygrapefruit/platform/linux-${arch}/libnative-platform.so
- jar cf native-platform-linux-${arch}-${nativeVersion}.jar .
- mv native-platform-linux-${arch}-${nativeVersion}.jar $out/lib/gradle/lib/
- popd
+ let arch = if stdenv.is64bit then "amd64" else "i386"; in
+ ''
+ mkdir patching
+ pushd patching
+ jar xf $out/lib/gradle/lib/native-platform-linux-${arch}-${nativeVersion}.jar
+ patchelf --set-rpath "${stdenv.cc.cc.lib}/lib:${stdenv.cc.cc.lib}/lib64" net/rubygrapefruit/platform/linux-${arch}/libnative-platform.so
+ jar cf native-platform-linux-${arch}-${nativeVersion}.jar .
+ mv native-platform-linux-${arch}-${nativeVersion}.jar $out/lib/gradle/lib/
+ popd
- # The scanner doesn't pick up the runtime dependency in the jar.
- # Manually add a reference where it will be found.
- mkdir $out/nix-support
- echo ${stdenv.cc.cc} > $out/nix-support/manual-runtime-dependencies
- '';
+ # The scanner doesn't pick up the runtime dependency in the jar.
+ # Manually add a reference where it will be found.
+ mkdir $out/nix-support
+ echo ${stdenv.cc.cc} > $out/nix-support/manual-runtime-dependencies
+ '';
nativeBuildInputs = [ makeWrapper unzip ];
buildInputs = [ java ];
@@ -64,9 +66,9 @@ in rec {
gradle_latest = gradle_7;
gradle_7 = gradleGen (gradleSpec {
- version = "7.1";
+ version = "7.1.1";
nativeVersion = "0.22-milestone-16";
- sha256 = "0yyqksq3zza7r9ls389ha81l3s768j7dfdqiwk3846qy4wcyxsrd";
+ sha256 = "0p9nss2xywwhjbpdcyma3d0ijvkav9hzmldpkcp447ch92cqd2xz";
});
gradle_6_8 = gradleGen (gradleSpec {
diff --git a/pkgs/development/tools/go-task/default.nix b/pkgs/development/tools/go-task/default.nix
index d9b32c2c5248..c1cff6562f23 100644
--- a/pkgs/development/tools/go-task/default.nix
+++ b/pkgs/development/tools/go-task/default.nix
@@ -2,16 +2,16 @@
buildGoModule rec {
pname = "go-task";
- version = "3.6.0";
+ version = "3.7.0";
src = fetchFromGitHub {
owner = pname;
repo = "task";
rev = "v${version}";
- sha256 = "sha256-3DTjxcMxgaTMunctHaCgOX5/P85lJDRin6RpMuv9Rfg=";
+ sha256 = "sha256-EksCnhSde25hradmKaDSOfIa/QnMAlIbgbQWX6k5v+4=";
};
- vendorSha256 = "sha256-bsVzV2M31BA7X6aq8na7v56uGYgne4OwR5kz/utmQHI=";
+ vendorSha256 = "sha256-Y2Yuc2pcxW0M1CJfN3dezPB9cg6MvOUg5A+yFHCwntk=";
doCheck = false;
diff --git a/pkgs/development/tools/jbang/default.nix b/pkgs/development/tools/jbang/default.nix
index b0d2cb719533..f179ef13ba9a 100644
--- a/pkgs/development/tools/jbang/default.nix
+++ b/pkgs/development/tools/jbang/default.nix
@@ -1,12 +1,12 @@
{ stdenv, lib, fetchzip, jdk, makeWrapper, coreutils, curl }:
stdenv.mkDerivation rec {
- version = "0.72.0";
+ version = "0.77.0";
pname = "jbang";
src = fetchzip {
url = "https://github.com/jbangdev/jbang/releases/download/v${version}/${pname}-${version}.tar";
- sha256 = "sha256-QMbkxfGJOMNTILmGYhbUdtq4zfe0Cc/IBftFdM+rT9c=";
+ sha256 = "sha256-EOseHe0CrSzOI/NgPk0Q24nzeOSV6X8GVFNPstou/Ng=";
};
nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/development/tools/treefmt/default.nix b/pkgs/development/tools/treefmt/default.nix
index 961b9625eded..590fae640820 100644
--- a/pkgs/development/tools/treefmt/default.nix
+++ b/pkgs/development/tools/treefmt/default.nix
@@ -1,16 +1,16 @@
{ lib, rustPlatform, fetchFromGitHub }:
rustPlatform.buildRustPackage rec {
pname = "treefmt";
- version = "0.2.2";
+ version = "0.2.3";
src = fetchFromGitHub {
owner = "numtide";
repo = "treefmt";
rev = "v${version}";
- sha256 = "13z7n0xg150815c77ysz4iqpk8rbgj4vmqy1y2262ryb88dwaw5n";
+ sha256 = "1j505bjdgd6lsq197frlyw26fl1621aw6z339bdp7zc3sa54z0d6";
};
- cargoSha256 = "1jfrmafj1b28k6xjpj0qq1jpccll0adqxhjypphxhyfsfnra8g6f";
+ cargoSha256 = "0aky94rq1gs506yhpinj759lpvlnw3q2k97gvq34svgq0n38drvk";
meta = {
description = "one CLI to format the code tree";
diff --git a/pkgs/development/web/cypress/default.nix b/pkgs/development/web/cypress/default.nix
index 0e1715a4c12d..e58a7d9295a8 100644
--- a/pkgs/development/web/cypress/default.nix
+++ b/pkgs/development/web/cypress/default.nix
@@ -17,11 +17,11 @@
stdenv.mkDerivation rec {
pname = "cypress";
- version = "8.1.0";
+ version = "8.2.0";
src = fetchzip {
url = "https://cdn.cypress.io/desktop/${version}/linux-x64/cypress.zip";
- sha256 = "17cq88qrq3dshgfaycb77xbkzr9drw7fvw0xqijlxivvmnbvwi6i";
+ sha256 = "0j5acj7ghqf2pywpf4vzzvmcn4ypc4gv0pjyjd8hgzrrl3kff4dm";
};
# don't remove runtime deps
diff --git a/pkgs/development/web/nodejs/v16.nix b/pkgs/development/web/nodejs/v16.nix
index c89b48ae3dd7..494edc1e997b 100644
--- a/pkgs/development/web/nodejs/v16.nix
+++ b/pkgs/development/web/nodejs/v16.nix
@@ -1,4 +1,4 @@
-{ callPackage, openssl, python3, enableNpm ? true }:
+{ callPackage, openssl, python3, fetchpatch, enableNpm ? true }:
let
buildNodejs = callPackage ./nodejs.nix {
@@ -8,6 +8,14 @@ let
in
buildNodejs {
inherit enableNpm;
- version = "16.6.0";
- sha256 = "1ndrqx3k5m62r7nzl5za59m33bx10541n7xbaxxz7088ifh18msw";
+ version = "16.5.0";
+ sha256 = "16dapj5pm2y1m3ldrjjlz8rq9axk85nn316iz02nk6qjs66y6drz";
+ patches = [
+ # Fix CVE-2021-22930 https://github.com/nodejs/node/pull/39423.
+ # It should be fixed by Node.js 16.6.0, but currently it fails to build on Darwin
+ (fetchpatch {
+ url = "https://github.com/nodejs/node/commit/9d950a0956bf2c3dd87bacb56807f37e16a91db4.patch";
+ sha256 = "1narhk5dqdkbndh9hg0dn5ghhgrd6gsamjqszpivmp33nl5hgsx3";
+ })
+ ];
}
diff --git a/pkgs/games/factorio/versions.json b/pkgs/games/factorio/versions.json
index 500181ff70ef..d8174417cb35 100644
--- a/pkgs/games/factorio/versions.json
+++ b/pkgs/games/factorio/versions.json
@@ -2,12 +2,12 @@
"x86_64-linux": {
"alpha": {
"experimental": {
- "name": "factorio_alpha_x64-1.1.36.tar.xz",
+ "name": "factorio_alpha_x64-1.1.37.tar.xz",
"needsAuth": true,
- "sha256": "1x9a2lv6zbqawqlxg8bcbx04hjy0pq40macfa4sqi8w6h14wgww8",
+ "sha256": "0aj8w38lx8bx3d894qxr416x515ijadrlcynvvqjaj1zx3acldzh",
"tarDirectory": "x64",
- "url": "https://factorio.com/get-download/1.1.36/alpha/linux64",
- "version": "1.1.36"
+ "url": "https://factorio.com/get-download/1.1.37/alpha/linux64",
+ "version": "1.1.37"
},
"stable": {
"name": "factorio_alpha_x64-1.1.36.tar.xz",
@@ -38,12 +38,12 @@
},
"headless": {
"experimental": {
- "name": "factorio_headless_x64-1.1.36.tar.xz",
+ "name": "factorio_headless_x64-1.1.37.tar.xz",
"needsAuth": false,
- "sha256": "1s8g030xp5nrlmnn21frrd8n4nd7jjmb5hbpj1vhxjrk6vpijh24",
+ "sha256": "0hawwjdaxgbrkb80vn9jk6dn0286mq35zkgg5vvv5zhi339pqwwg",
"tarDirectory": "x64",
- "url": "https://factorio.com/get-download/1.1.36/headless/linux64",
- "version": "1.1.36"
+ "url": "https://factorio.com/get-download/1.1.37/headless/linux64",
+ "version": "1.1.37"
},
"stable": {
"name": "factorio_headless_x64-1.1.36.tar.xz",
diff --git a/pkgs/misc/drivers/gutenprint/bin.nix b/pkgs/misc/drivers/gutenprint/bin.nix
index 58b77cb91071..891421d3312c 100644
--- a/pkgs/misc/drivers/gutenprint/bin.nix
+++ b/pkgs/misc/drivers/gutenprint/bin.nix
@@ -34,7 +34,9 @@ stdenv.mkDerivation {
buildInputs = [ rpm cpio ];
- phases = "buildPhase";
+ dontUnpack = true;
+ dontInstall = true;
+ dontFixup = true;
libPath = lib.makeLibraryPath [ stdenv.cc.cc zlib ];
diff --git a/pkgs/misc/drivers/postscript-lexmark/default.nix b/pkgs/misc/drivers/postscript-lexmark/default.nix
index ebc6439dd5ca..64a38239a9b0 100644
--- a/pkgs/misc/drivers/postscript-lexmark/default.nix
+++ b/pkgs/misc/drivers/postscript-lexmark/default.nix
@@ -13,8 +13,6 @@ stdenv.mkDerivation {
nativeBuildInputs = [ rpmextract ];
- phases = [ "unpackPhase" "installPhase"];
-
sourceRoot = ".";
unpackPhase = ''
diff --git a/pkgs/misc/drivers/sundtek/default.nix b/pkgs/misc/drivers/sundtek/default.nix
index d52f9dd7cde3..d81a278ec135 100644
--- a/pkgs/misc/drivers/sundtek/default.nix
+++ b/pkgs/misc/drivers/sundtek/default.nix
@@ -10,18 +10,19 @@ let
else
if isi686 then "32bit"
else throw "${system} not considered in build derivation. Might still be supported.";
+ sha256 = with stdenv;
+ if isx86_64 then "1jfsng5n3phw5rqpkid9m5j7m7zgj5bifh7swvba7f97y6imdaax"
+ else "15y6r5w306pcq4g1rn9f7vf70f3a7qhq237ngaf0wxh2nr0aamxp";
in
stdenv.mkDerivation {
src = fetchurl {
url = "http://www.sundtek.de/media/netinst/${platform}/installer.tar.gz";
- sha256 = "15y6r5w306pcq4g1rn9f7vf70f3a7qhq237ngaf0wxh2nr0aamxp";
+ sha256 = sha256;
};
pname = "sundtek";
inherit version;
- phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
-
sourceRoot = ".";
installPhase = ''
diff --git a/pkgs/misc/tmux-plugins/default.nix b/pkgs/misc/tmux-plugins/default.nix
index b4978e200ab1..826feace271c 100644
--- a/pkgs/misc/tmux-plugins/default.nix
+++ b/pkgs/misc/tmux-plugins/default.nix
@@ -63,6 +63,32 @@ in rec {
};
};
+ better-mouse-mode = mkTmuxPlugin {
+ pluginName = "better-mouse-mode";
+ version = "unstable-2021-08-02";
+ src = fetchFromGitHub {
+ owner = "NHDaly";
+ repo = "tmux-better-mouse-mode";
+ rev = "aa59077c635ab21b251bd8cb4dc24c415e64a58e";
+ sha256 = "06346ih3hzwszhkj25g4xv5av7292s6sdbrdpx39p0n3kgf5mwww";
+ };
+ meta = {
+ homepage = "https://github.com/NHDaly/tmux-better-mouse-mode";
+ description = "better mouse support for tmux";
+ longDescription =
+ ''
+ Features:
+
+ * Emulate mouse-support for full-screen programs like less that don't provide built in mouse support.
+ * Exit copy-mode and return to your prompt by scrolling back all the way down to the bottom.
+ * Adjust your scrolling speed.
+ '';
+ license = lib.licenses.mit;
+ platforms = lib.platforms.unix;
+ maintainers = with lib.maintainers; [ chrispickard ];
+ };
+ };
+
continuum = mkTmuxPlugin {
pluginName = "continuum";
version = "unstable-2020-10-16";
diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix
index 951914a41c67..1c93b714f282 100644
--- a/pkgs/misc/vim-plugins/generated.nix
+++ b/pkgs/misc/vim-plugins/generated.nix
@@ -786,12 +786,12 @@ final: prev:
conjure = buildVimPluginFrom2Nix {
pname = "conjure";
- version = "2021-07-23";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "Olical";
repo = "conjure";
- rev = "8dedf17ad815ce78122c22d25e93777e3f2d8cfe";
- sha256 = "0061x13jznqqvpci1f6x9r0qrn2bakvvp2ai1nbrb1ynvbgkh3mf";
+ rev = "998603d240b13e32e3c9571bcb805357ea323fa9";
+ sha256 = "1fd7d3nfb8qi0zk2jskkmym3yb8qzys7li88cjfxdqrl9kcqa723";
};
meta.homepage = "https://github.com/Olical/conjure/";
};
@@ -1510,12 +1510,12 @@ final: prev:
fastfold = buildVimPluginFrom2Nix {
pname = "fastfold";
- version = "2021-08-02";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "konfekt";
repo = "fastfold";
- rev = "37fc982d56f8bfe1cce8209414752e046effc65c";
- sha256 = "1qzkvbdgr4h7bmql33na5h93jrjcf2m96j5y9vi79rvsl8wwjqww";
+ rev = "066d2347baa8dc180c18f889d0b37a826f23973b";
+ sha256 = "0m04jn8701hl4fqjsfc6dalikqvgrql3fwqrc8z81swcjyf6rsaw";
};
meta.homepage = "https://github.com/konfekt/fastfold/";
};
@@ -1667,12 +1667,12 @@ final: prev:
friendly-snippets = buildVimPluginFrom2Nix {
pname = "friendly-snippets";
- version = "2021-08-02";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "rafamadriz";
repo = "friendly-snippets";
- rev = "459179fd7711fcec5c4926903e0785a8f464b21d";
- sha256 = "1fvx3513pbsasar4bh06jaxaj8vaq1y65id2pppkgxp7jsknrf4i";
+ rev = "8e12f8aee2c78e97cb1e99a3c409da1d8c0a13b6";
+ sha256 = "0rv03vyndfh4ic0y9d9x3ckxlcf0rvxxa2ahzgqaz17wn4wzl7a9";
};
meta.homepage = "https://github.com/rafamadriz/friendly-snippets/";
};
@@ -1875,8 +1875,8 @@ final: prev:
src = fetchFromGitHub {
owner = "lewis6991";
repo = "gitsigns.nvim";
- rev = "97ff7471a88e35dd1e73be1f8d70d274f44dcb26";
- sha256 = "0m880kdyyarjj8gyqlq2vfhf6bxmax04p0a8k8yc8sz6lvl78avj";
+ rev = "f8786ea3bfe69fccadec6ef7fa64d4188f788729";
+ sha256 = "028l9x94yi5ffjp44vsjyyalxnax0691aiiy22c143pcd5wv5w3q";
};
meta.homepage = "https://github.com/lewis6991/gitsigns.nvim/";
};
@@ -3250,6 +3250,18 @@ final: prev:
meta.homepage = "https://github.com/vhyrro/neorg/";
};
+ neoscroll-nvim = buildVimPluginFrom2Nix {
+ pname = "neoscroll-nvim";
+ version = "2021-07-23";
+ src = fetchFromGitHub {
+ owner = "karb94";
+ repo = "neoscroll.nvim";
+ rev = "bc1dc90b6697931fca5e19fdc4c2fa43d944269f";
+ sha256 = "1ji348kp4w77dhw7byfqrdyv1z7xwn7dx54y1nvclpbbj36ya9wk";
+ };
+ meta.homepage = "https://github.com/karb94/neoscroll.nvim/";
+ };
+
neosnippet-snippets = buildVimPluginFrom2Nix {
pname = "neosnippet-snippets";
version = "2021-05-05";
@@ -3588,12 +3600,12 @@ final: prev:
nvim-bufferline-lua = buildVimPluginFrom2Nix {
pname = "nvim-bufferline-lua";
- version = "2021-07-27";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "akinsho";
repo = "nvim-bufferline.lua";
- rev = "7bf463cf7c61faa9f24222bba9412230d4cc1dc7";
- sha256 = "12x4lnhxv2sij47drrdxxk814hsmghfz7sv8fc2c5wbbdg9ygg5a";
+ rev = "3fb698aef5f48b660dacf8abd1bcdff6588dd2b8";
+ sha256 = "15zzjyzz53w79j8jn8bsbxgdgs6qfpxm9pp5xvkkah53g34wfqwd";
};
meta.homepage = "https://github.com/akinsho/nvim-bufferline.lua/";
};
@@ -3660,12 +3672,12 @@ final: prev:
nvim-dap-ui = buildVimPluginFrom2Nix {
pname = "nvim-dap-ui";
- version = "2021-07-31";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "rcarriga";
repo = "nvim-dap-ui";
- rev = "a47408920f8dd5ffb1db821ce72dd6ef21730c63";
- sha256 = "1g9nlkdcvhzs6ds7493fcrgi5gizn4h517h65ynr31cfnajxm8wb";
+ rev = "90a4025a4da7ac7a261026c50439bbd1bdfc8563";
+ sha256 = "0apl84djyxy8ldcxv2xs0irgy7rjxcisqnl3wxcfi3fhvfsb0fz3";
};
meta.homepage = "https://github.com/rcarriga/nvim-dap-ui/";
};
@@ -3700,8 +3712,8 @@ final: prev:
src = fetchFromGitHub {
owner = "Iron-E";
repo = "nvim-highlite";
- rev = "f95263e2d0d9177143d3203bb32adc8b24d34c0c";
- sha256 = "1r5nlsbrs8sigs7ny23hiywr475dg1n15aqashzan4m1sgn37nab";
+ rev = "f6eb9e06c4575945e7a20d87ac8968f84d18d608";
+ sha256 = "1kz7fm2aqg2jqmjw2dyjc506j6hgkv7vgqrl7fdxdabsss581cs5";
};
meta.homepage = "https://github.com/Iron-E/nvim-highlite/";
};
@@ -6738,12 +6750,12 @@ final: prev:
vim-fireplace = buildVimPluginFrom2Nix {
pname = "vim-fireplace";
- version = "2021-05-12";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "tpope";
repo = "vim-fireplace";
- rev = "07b0256b08e0da6d31200663cbe6d6f8c995a287";
- sha256 = "0zp3ghiqyg1qf8rxx5a1hqxyz4sqqw1afbh9qzsjlw18g0va86kj";
+ rev = "c9a155b88d629221628937eadb64a3e87f8d82d9";
+ sha256 = "1h0y4k3xypbn4lyyksjddvcdnz8nqy73qnjxm21ahsz73xk6bpwk";
};
meta.homepage = "https://github.com/tpope/vim-fireplace/";
};
@@ -7724,12 +7736,12 @@ final: prev:
vim-maktaba = buildVimPluginFrom2Nix {
pname = "vim-maktaba";
- version = "2021-08-02";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "google";
repo = "vim-maktaba";
- rev = "d520f12ef8e93f457f5b78ff84d464f83f778484";
- sha256 = "07hm7sz6wazb3shjf5iggkgmif7ahyjzln855808dggglsxn765j";
+ rev = "92b8483abb3b128b2a64782c60c2a236b2484a99";
+ sha256 = "1prx8hhjdh4bs1c25jxjis151d1kg3vxdy5f9scwgas9a79ii3lw";
};
meta.homepage = "https://github.com/google/vim-maktaba/";
};
@@ -9298,12 +9310,12 @@ final: prev:
vim-tpipeline = buildVimPluginFrom2Nix {
pname = "vim-tpipeline";
- version = "2021-06-19";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "vimpostor";
repo = "vim-tpipeline";
- rev = "a40b618746bb60ddf3a664e65f82ffa4750d450a";
- sha256 = "1pxnsxixdjpmndqi1cl0lp54mh4zidx40lshpdvmk3fjpjdjd130";
+ rev = "a22d2e53ec38c11fde58e4cf9aab47d89d6600f6";
+ sha256 = "0axdgfvkamywypylpssmlfj0hh0bf5szcp8xri1g8lqks3f5bkv5";
};
meta.homepage = "https://github.com/vimpostor/vim-tpipeline/";
};
@@ -9778,12 +9790,12 @@ final: prev:
vimspector = buildVimPluginFrom2Nix {
pname = "vimspector";
- version = "2021-08-02";
+ version = "2021-08-03";
src = fetchFromGitHub {
owner = "puremourning";
repo = "vimspector";
- rev = "27eb464b8ec3df416cf72803a787edbf2e60440e";
- sha256 = "1swgz7yjlkx6fqgf03kypywqhpqsb0pkjk3a9qvhj1wv6z5f9g0q";
+ rev = "57ce0992803fcf22c0557550fff45e3fe869f707";
+ sha256 = "0136i5yisg6ndvg7rcsr9qqrslgzafbl006csx7s51khd5qmfgmb";
fetchSubmodules = true;
};
meta.homepage = "https://github.com/puremourning/vimspector/";
diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names
index 405f663584cf..d2079702db3d 100644
--- a/pkgs/misc/vim-plugins/vim-plugin-names
+++ b/pkgs/misc/vim-plugins/vim-plugin-names
@@ -299,6 +299,7 @@ kana/vim-operator-user
kana/vim-tabpagecd
kana/vim-textobj-function
kana/vim-textobj-user
+karb94/neoscroll.nvim
kassio/neoterm
kbenzie/vim-spirv
kchmck/vim-coffee-script
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix
index 1b1fb4154512..5acf8e560e3d 100644
--- a/pkgs/os-specific/linux/apparmor/default.nix
+++ b/pkgs/os-specific/linux/apparmor/default.nix
@@ -256,7 +256,7 @@ let
name = "apparmor-kernel-patches-${apparmor-version}";
src = apparmor-sources;
- phases = "unpackPhase installPhase";
+ dontBuild = true;
installPhase = ''
mkdir "$out"
diff --git a/pkgs/os-specific/linux/evdi/default.nix b/pkgs/os-specific/linux/evdi/default.nix
index 5eb31e9422de..c1b624386c39 100644
--- a/pkgs/os-specific/linux/evdi/default.nix
+++ b/pkgs/os-specific/linux/evdi/default.nix
@@ -1,29 +1,16 @@
-{ lib, stdenv, fetchFromGitHub, fetchpatch, kernel, libdrm }:
+{ lib, stdenv, fetchFromGitHub, kernel, libdrm }:
stdenv.mkDerivation rec {
pname = "evdi";
- version = "unstable-2021-06-11";
+ version = "unstable-2021-07-07";
src = fetchFromGitHub {
owner = "DisplayLink";
repo = pname;
- rev = "65e12fca334f2f42396f4e8d16592d53cab34dd6";
- sha256 = "sha256-81IfdYKadKT7vRdkmxzfGo4KHa4UJ8uJ0K6djQCr22U=";
+ rev = "b0b2c80eb63f9b858b71afa772135f434aea192a";
+ sha256 = "sha256-io+CbZovGjEJjwtmARFH23Djt933ONoHMDoea+i6xFo=";
};
- # Linux 5.13 support
- # The patches break compilation for older kernels
- patches = lib.optional (kernel.kernelAtLeast "5.13") [
- (fetchpatch {
- url = "https://github.com/DisplayLink/evdi/commit/c5f5441d0a115d2cfc8125b8bafaa05b2edc7938.patch";
- sha256 = "sha256-tWYgBrRh3mXPebhUygOvJ07V87g9JU66hREriACfEVI=";
- })
- (fetchpatch {
- url = "https://github.com/DisplayLink/evdi/commit/5f04d2e2df4cfd21dc15d31f1152c6a66fa48a78.patch";
- sha256 = "sha256-690/eUiEVWvnT/YAVgKcLo86dgolF9giWRuPxXpL+eQ=";
- })
- ];
-
nativeBuildInputs = kernel.moduleBuildDependencies;
buildInputs = [ kernel libdrm ];
diff --git a/pkgs/os-specific/linux/firmware/b43-firmware/5.1.138.nix b/pkgs/os-specific/linux/firmware/b43-firmware/5.1.138.nix
index 42444d784d52..1355d5bc9a0e 100644
--- a/pkgs/os-specific/linux/firmware/b43-firmware/5.1.138.nix
+++ b/pkgs/os-specific/linux/firmware/b43-firmware/5.1.138.nix
@@ -13,8 +13,6 @@ stdenv.mkDerivation {
buildInputs = [ b43FirmwareCutter ];
- phases = [ "unpackPhase" "installPhase" ];
-
installPhase = ''
mkdir -p $out/lib/firmware
b43-fwcutter -w $out/lib/firmware linux/wl_apsta.o
diff --git a/pkgs/os-specific/linux/firmware/b43-firmware/6.30.163.46.nix b/pkgs/os-specific/linux/firmware/b43-firmware/6.30.163.46.nix
index c0226065ea26..45019dd5a986 100644
--- a/pkgs/os-specific/linux/firmware/b43-firmware/6.30.163.46.nix
+++ b/pkgs/os-specific/linux/firmware/b43-firmware/6.30.163.46.nix
@@ -11,8 +11,6 @@ stdenv.mkDerivation rec {
buildInputs = [ b43FirmwareCutter ];
- phases = [ "unpackPhase" "installPhase" ];
-
sourceRoot = ".";
installPhase = ''
diff --git a/pkgs/os-specific/linux/firmware/rtl8192su-firmware/default.nix b/pkgs/os-specific/linux/firmware/rtl8192su-firmware/default.nix
index 34c2b683ea40..6cbaa4acb8d2 100644
--- a/pkgs/os-specific/linux/firmware/rtl8192su-firmware/default.nix
+++ b/pkgs/os-specific/linux/firmware/rtl8192su-firmware/default.nix
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
sha256 = "0j3c35paapq1icmxq0mg7pm2xa2m69q7bkfmwgq99d682yr2cb5l";
};
- phases = [ "unpackPhase" "installPhase" ];
+ dontBuild = true;
installPhase = ''
for i in rtl8192sfw.bin \
diff --git a/pkgs/os-specific/linux/firmware/rtl8723bs-firmware/default.nix b/pkgs/os-specific/linux/firmware/rtl8723bs-firmware/default.nix
index 36580d4b1b91..c587994ccecb 100644
--- a/pkgs/os-specific/linux/firmware/rtl8723bs-firmware/default.nix
+++ b/pkgs/os-specific/linux/firmware/rtl8723bs-firmware/default.nix
@@ -4,7 +4,7 @@ stdenv.mkDerivation {
name = "rtl8723bs-firmware-${linuxPackages.rtl8723bs.version}";
inherit (linuxPackages.rtl8723bs) src;
- phases = [ "unpackPhase" "installPhase" ];
+ dontBuild = true;
installPhase = ''
mkdir -p "$out/lib/firmware/rtlwifi"
diff --git a/pkgs/os-specific/linux/i810switch/default.nix b/pkgs/os-specific/linux/i810switch/default.nix
index ffca983a35e0..3a202ca08e96 100644
--- a/pkgs/os-specific/linux/i810switch/default.nix
+++ b/pkgs/os-specific/linux/i810switch/default.nix
@@ -1,9 +1,8 @@
{ lib, stdenv, fetchurl, pciutils }:
stdenv.mkDerivation {
- name = "i810switch-0.6.5";
-
- phases = "unpackPhase installPhase";
+ pname = "i810switch";
+ version = "0.6.5";
installPhase = "
sed -i -e 's+/usr++' Makefile
@@ -17,10 +16,11 @@ stdenv.mkDerivation {
sha256 = "d714840e3b14e1fa9c432c4be0044b7c008d904dece0d611554655b979cad4c3";
};
- meta = {
+ meta = with lib; {
description = "A utility for switching between the LCD and external VGA display on Intel graphics cards";
homepage = "http://www16.plala.or.jp/mano-a-mano/i810switch.html";
- license = lib.licenses.gpl2;
- platforms = lib.platforms.linux;
+ maintainers = with maintainers; [ ];
+ license = licenses.gpl2;
+ platforms = platforms.linux;
};
}
diff --git a/pkgs/os-specific/linux/zenstates/default.nix b/pkgs/os-specific/linux/zenstates/default.nix
index a56337cfef22..8e31073151ba 100644
--- a/pkgs/os-specific/linux/zenstates/default.nix
+++ b/pkgs/os-specific/linux/zenstates/default.nix
@@ -35,8 +35,6 @@ stdenv.mkDerivation rec {
buildInputs = [ python3 ];
- phases = [ "installPhase" ];
-
installPhase = ''
mkdir -p $out/bin
cp $src/zenstates.py $out/bin/zenstates
diff --git a/pkgs/os-specific/linux/zfs/default.nix b/pkgs/os-specific/linux/zfs/default.nix
index 7784aa8e03fe..517e6036e780 100644
--- a/pkgs/os-specific/linux/zfs/default.nix
+++ b/pkgs/os-specific/linux/zfs/default.nix
@@ -14,6 +14,9 @@
# Kernel dependencies
, kernel ? null
, enablePython ? true
+
+# for determining the latest compatible linuxPackages
+, linuxPackages_5_13
}:
with lib;
@@ -28,6 +31,7 @@ let
, extraPatches ? []
, rev ? "zfs-${version}"
, isUnstable ? false
+ , latestCompatibleLinuxPackages
, kernelCompatible ? null }:
stdenv.mkDerivation {
@@ -161,7 +165,7 @@ let
outputs = [ "out" ] ++ optionals buildUser [ "dev" ];
passthru = {
- inherit enableMail;
+ inherit enableMail latestCompatibleLinuxPackages;
tests =
if isUnstable then [
@@ -196,6 +200,7 @@ in {
zfsStable = common {
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelAtLeast "3.10" && kernel.kernelOlder "5.14";
+ latestCompatibleLinuxPackages = linuxPackages_5_13;
# this package should point to the latest release.
version = "2.1.0";
@@ -206,6 +211,7 @@ in {
zfsUnstable = common {
# check the release notes for compatible kernels
kernelCompatible = kernel.kernelAtLeast "3.10" && kernel.kernelOlder "5.14";
+ latestCompatibleLinuxPackages = linuxPackages_5_13;
# this package should point to a version / git revision compatible with the latest kernel release
version = "2.1.0";
diff --git a/pkgs/servers/hqplayerd/default.nix b/pkgs/servers/hqplayerd/default.nix
index 76f8bde3e4ed..14fe83ea5cb3 100644
--- a/pkgs/servers/hqplayerd/default.nix
+++ b/pkgs/servers/hqplayerd/default.nix
@@ -53,32 +53,37 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
cp ./usr/bin/hqplayerd $out/bin
+ # main configuration
+ mkdir -p $out/etc/hqplayer
+ cp ./etc/hqplayer/hqplayerd.xml $out/etc/hqplayer/
+
# udev rules
mkdir -p $out/etc/udev/rules.d
- cp ./etc/udev/rules.d/50-taudio2.rules $out/etc/udev/rules.d
+ cp ./etc/udev/rules.d/50-taudio2.rules $out/etc/udev/rules.d/
# kernel module cfgs
mkdir -p $out/etc/modules-load.d
- cp ./etc/modules-load.d/taudio2.conf $out/etc/modules-load.d
+ cp ./etc/modules-load.d/taudio2.conf $out/etc/modules-load.d/
# systemd service file
mkdir -p $out/lib/systemd/system
- cp ./usr/lib/systemd/system/hqplayerd.service $out/lib/systemd/system
+ cp ./usr/lib/systemd/system/hqplayerd.service $out/lib/systemd/system/
# documentation
mkdir -p $out/share/doc/hqplayerd
- cp ./usr/share/doc/hqplayerd/* $out/share/doc/hqplayerd
+ cp ./usr/share/doc/hqplayerd/* $out/share/doc/hqplayerd/
# misc service support files
mkdir -p $out/var/lib/hqplayer
- cp -r ./var/lib/hqplayer/web $out/var/lib/hqplayer/web
+ cp -r ./var/lib/hqplayer/web $out/var/lib/hqplayer
runHook postInstall
'';
postInstall = ''
substituteInPlace $out/lib/systemd/system/hqplayerd.service \
- --replace /usr/bin/hqplayerd $out/bin/hqplayerd
+ --replace /usr/bin/hqplayerd $out/bin/hqplayerd \
+ --replace "NetworkManager-wait-online.service" ""
'';
postFixup = ''
diff --git a/pkgs/servers/monitoring/icinga2/default.nix b/pkgs/servers/monitoring/icinga2/default.nix
index 00f7b5103460..44be5b97e670 100644
--- a/pkgs/servers/monitoring/icinga2/default.nix
+++ b/pkgs/servers/monitoring/icinga2/default.nix
@@ -9,13 +9,13 @@
stdenv.mkDerivation rec {
pname = "icinga2${nameSuffix}";
- version = "2.12.5";
+ version = "2.13.0";
src = fetchFromGitHub {
owner = "icinga";
repo = "icinga2";
rev = "v${version}";
- sha256 = "sha256-sEmxKX+q7hPXQWEqbywgsEG5/bSE5AkNKurL3UGQFLA=";
+ sha256 = "sha256-ibZruP9/8D3DJSTFkIi84ADPGjwWeyTCHv/tTEcy6ns=";
};
patches = [
diff --git a/pkgs/servers/nitter/default.nix b/pkgs/servers/nitter/default.nix
new file mode 100644
index 000000000000..47352edf48d3
--- /dev/null
+++ b/pkgs/servers/nitter/default.nix
@@ -0,0 +1,131 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, nim
+, libsass
+}:
+
+let
+ jester = fetchFromGitHub {
+ owner = "dom96";
+ repo = "jester";
+ rev = "v0.5.0";
+ sha256 = "0m8a4ss4460jd2lcbqcbdd68jhcy35xg7qdyr95mh8rflwvmcvhk";
+ };
+ karax = fetchFromGitHub {
+ owner = "karaxnim";
+ repo = "karax";
+ rev = "1.1.2";
+ sha256 = "07ykrd21hd76vlmkqpvv5xvaxw6aaq87bky47p2420ni85a6d94j";
+ };
+ sass = fetchFromGitHub {
+ owner = "dom96";
+ repo = "sass";
+ rev = "e683aa1";
+ sha256 = "0qvly5rilsqqsyvr67pqhglm55ndc4nd6v90jwswbnigxiqf79lc";
+ };
+ regex = fetchFromGitHub {
+ owner = "nitely";
+ repo = "nim-regex";
+ rev = "2e32fdc";
+ sha256 = "1hrl40mwql7nh4wc7sdhmk8bj5728b93v5a93j49v660l0rn4qx8";
+ };
+ unicodedb = fetchFromGitHub {
+ owner = "nitely";
+ repo = "nim-unicodedb";
+ rev = "v0.9.0";
+ sha256 = "06j8d0bjbpv1iibqlmrac4qb61ggv17hvh6nv4pbccqk1rlpxhsq";
+ };
+ unicodeplus= fetchFromGitHub {
+ owner = "nitely";
+ repo = "nim-unicodeplus";
+ rev = "v0.8.0";
+ sha256 = "181wzwivfgplkqn5r4crhnaqgsza7x6fi23i86djb2dxvm7v6qxk";
+ };
+ segmentation = fetchFromGitHub {
+ owner = "nitely";
+ repo = "nim-segmentation";
+ rev = "v0.1.0";
+ sha256 = "007bkx8dwy8n340zbp6wyqfsq9bh6q5ykav1ywdlwykyp1n909bh";
+ };
+ nimcrypto = fetchFromGitHub {
+ owner = "cheatfate";
+ repo = "nimcrypto";
+ rev = "a5742a9a214ac33f91615f3862c7b099aec43b00";
+ sha256 = "0al0jsaicm8vyr63n909dq1glhvpra1n9sllmj0r7lsjsdb59wsz";
+ };
+ markdown = fetchFromGitHub {
+ owner = "soasme";
+ repo = "nim-markdown";
+ rev = "abdbe5e";
+ sha256 = "0f3c1sxvhbbds43c9l8cz69pfpf984msj1lv4pb7bzpxb5zil2wy";
+ };
+ packedjson = fetchFromGitHub {
+ owner = "Araq";
+ repo = "packedjson";
+ rev = "7198cc8";
+ sha256 = "1ay2zd88q8hvpvigsg8h0y5vc65hk3lk0d48fy9hwg4lcng19mp1";
+ };
+ supersnappy = fetchFromGitHub {
+ owner = "guzba";
+ repo = "supersnappy";
+ rev = "1.1.5";
+ sha256 = "1y26sgnszvdf5sn7j0jx2dpd4i03mvbk9i9ni9kbyrs798bjwi6z";
+ };
+ redpool = fetchFromGitHub {
+ owner = "zedeus";
+ repo = "redpool";
+ rev = "57aeb25";
+ sha256 = "0fph7qlia6fvya1zqzbgvww2hk5pd0vq1wlf9ij9jyn655mg0w3q";
+ };
+ frosty = fetchFromGitHub {
+ owner = "disruptek";
+ repo = "frosty";
+ rev = "0.3.1";
+ sha256 = "0hd6484ihjgl57gmqyp5xfq5prycb49k0313fqky600mhz71nmyz";
+ };
+ redis = fetchFromGitHub {
+ owner = "zedeus";
+ repo = "redis";
+ rev = "94bcbf1";
+ sha256 = "1p9zv4f4lqrjqa8fk98cb89b9fzlf866jc584ll9sws14904i80j";
+ };
+in stdenv.mkDerivation rec {
+ pname = "nitter";
+ version = "unstable-2021-07-18";
+
+ src = fetchFromGitHub {
+ owner = "zedeus";
+ repo = "nitter";
+ rev = "6c5cb01b294d4f6e3b438fc47683359eb0fe5057";
+ sha256 = "1dl8ndyv8m1hnydrp5xilcpp2cfbp02d5jap3y42i4nazc9ar6p4";
+ };
+
+ nativeBuildInputs = [ nim ];
+ buildInputs = [ libsass ];
+
+ buildPhase = ''
+ runHook preBuild
+ export HOME=$TMPDIR
+ nim -d:release -p:${jester} -p:${karax} -p:${sass}/src -p:${regex}/src -p:${unicodedb}/src -p:${unicodeplus}/src -p:${segmentation}/src -p:${nimcrypto} -p:${markdown}/src -p:${packedjson} -p:${supersnappy}/src -p:${redpool}/src -p:${frosty} -p:${redis}/src c src/$pname
+ nim -p:${sass}/src c --hint[Processing]:off -r tools/gencss
+ runHook postBuild
+ '';
+
+ installPhase = ''
+ runHook preInstall
+ install -Dt $out/bin src/$pname
+ mkdir -p $out/share/nitter
+ cp -r public $out/share/nitter/public
+ runHook postInstall
+ '';
+
+ meta = with lib; {
+ description = "Alternative Twitter front-end";
+ homepage = "https://github.com/zedeus/nitter";
+ maintainers = with maintainers; [ erdnaxe ];
+ license = licenses.agpl3Only;
+ platforms = [ "x86_64-linux" ];
+ };
+}
+
diff --git a/pkgs/servers/tailscale/default.nix b/pkgs/servers/tailscale/default.nix
index b5e878b6966e..2e1f68f6b125 100644
--- a/pkgs/servers/tailscale/default.nix
+++ b/pkgs/servers/tailscale/default.nix
@@ -2,13 +2,13 @@
buildGoModule rec {
pname = "tailscale";
- version = "1.12.1";
+ version = "1.12.2";
src = fetchFromGitHub {
owner = "tailscale";
repo = "tailscale";
rev = "v${version}";
- sha256 = "sha256-lGUV3GsRz09HHooaBYSvM+D53R0FPkvPyZml66hxMww=";
+ sha256 = "sha256-wbww6pYq2ATRRmeUAzFDGKzLk6MNYyGp6QKf8ybeaTc=";
};
nativeBuildInputs = [ makeWrapper ];
diff --git a/pkgs/servers/teleport/default.nix b/pkgs/servers/teleport/default.nix
index ad96798133b5..57866388b465 100644
--- a/pkgs/servers/teleport/default.nix
+++ b/pkgs/servers/teleport/default.nix
@@ -4,21 +4,21 @@ let
webassets = fetchFromGitHub {
owner = "gravitational";
repo = "webassets";
- rev = "8a30ee4e3570c7db0566028b6b562167aa40f646";
- sha256 = "sha256-noMVcB1cjiMcRke6/qJIzDaEh4uPIewsedLQRdPbzIQ=";
+ rev = "c63397375632f1a4323918dde78334472f3ffbb9";
+ sha256 = "sha256-6YKk0G3s+35PRsUBkKgu/tNoSSwjJ5bTn8DACF4gYr4=";
};
in
buildGoModule rec {
pname = "teleport";
- version = "6.2.7";
+ version = "6.2.8";
# This repo has a private submodule "e" which fetchgit cannot handle without failing.
src = fetchFromGitHub {
owner = "gravitational";
repo = "teleport";
rev = "v${version}";
- sha256 = "0ychs2pqi3awbr0vraz0ksddwk5hihrd1d9raq8mxyw5dz5124ki";
+ sha256 = "sha256-TVjdz97CUXBKCQh9bYrvtcH4StblBMsXiQ9Gix/NIm4=";
};
vendorSha256 = null;
@@ -27,8 +27,12 @@ buildGoModule rec {
nativeBuildInputs = [ zip makeWrapper ];
- # https://github.com/NixOS/nixpkgs/issues/120738
- patches = [ ./tsh.patch ];
+ patches = [
+ # https://github.com/NixOS/nixpkgs/issues/120738
+ ./tsh.patch
+ # https://github.com/NixOS/nixpkgs/issues/132652
+ ./test.patch
+ ];
postBuild = ''
pushd .
diff --git a/pkgs/servers/teleport/test.patch b/pkgs/servers/teleport/test.patch
new file mode 100644
index 000000000000..49f5a17663e1
--- /dev/null
+++ b/pkgs/servers/teleport/test.patch
@@ -0,0 +1,13 @@
+diff --git a/tool/tsh/resolve_default_addr_test.go b/tool/tsh/resolve_default_addr_test.go
+index d5976f156..aec5199aa 100644
+--- a/tool/tsh/resolve_default_addr_test.go
++++ b/tool/tsh/resolve_default_addr_test.go
+@@ -237,7 +237,7 @@ func TestResolveDefaultAddrTimeoutBeforeAllRacersLaunched(t *testing.T) {
+
+ blockingHandler, doneCh := newWaitForeverHandler()
+
+- servers := make([]*httptest.Server, 1000)
++ servers := make([]*httptest.Server, 100)
+ for i := 0; i < len(servers); i++ {
+ servers[i] = makeTestServer(t, blockingHandler)
+ }
diff --git a/pkgs/servers/x11/xorg/default.nix b/pkgs/servers/x11/xorg/default.nix
index 39c601f00f3e..9ea12d815886 100644
--- a/pkgs/servers/x11/xorg/default.nix
+++ b/pkgs/servers/x11/xorg/default.nix
@@ -1915,17 +1915,17 @@ lib.makeScope newScope (self: with self; {
}) {};
# THIS IS A GENERATED FILE. DO NOT EDIT!
- xeyes = callPackage ({ stdenv, pkg-config, fetchurl, libX11, libXext, libXmu, xorgproto, libXrender, libXt }: stdenv.mkDerivation {
+ xeyes = callPackage ({ stdenv, pkg-config, fetchurl, libX11, libxcb, libXext, libXi, libXmu, xorgproto, libXrender, libXt }: stdenv.mkDerivation {
pname = "xeyes";
- version = "1.1.2";
+ version = "1.2.0";
builder = ./builder.sh;
src = fetchurl {
- url = "mirror://xorg/individual/app/xeyes-1.1.2.tar.bz2";
- sha256 = "0lq5j7fryx1wn998jq6h3icz1h6pqrsbs3adskjzjyhn5l6yrg2p";
+ url = "mirror://xorg/individual/app/xeyes-1.2.0.tar.bz2";
+ sha256 = "1nxn443pfhddmwl59wplpjkslhlyfk307qx18nrimvvb2hipx8gq";
};
hardeningDisable = [ "bindnow" "relro" ];
nativeBuildInputs = [ pkg-config ];
- buildInputs = [ libX11 libXext libXmu xorgproto libXrender libXt ];
+ buildInputs = [ libX11 libxcb libXext libXi libXmu xorgproto libXrender libXt ];
meta.platforms = lib.platforms.unix;
}) {};
@@ -3312,11 +3312,11 @@ lib.makeScope newScope (self: with self; {
# THIS IS A GENERATED FILE. DO NOT EDIT!
xwd = callPackage ({ stdenv, pkg-config, fetchurl, libxkbfile, libX11, xorgproto }: stdenv.mkDerivation {
pname = "xwd";
- version = "1.0.7";
+ version = "1.0.8";
builder = ./builder.sh;
src = fetchurl {
- url = "mirror://xorg/individual/app/xwd-1.0.7.tar.bz2";
- sha256 = "1537i8q8pgf0sjklakzfvjwrq5b246qjywrx9ll8xfg0p6w1as6d";
+ url = "mirror://xorg/individual/app/xwd-1.0.8.tar.bz2";
+ sha256 = "06q36fh55r62ms0igfxsanrn6gv8lh794q1bw9xzw51p2qs2papv";
};
hardeningDisable = [ "bindnow" "relro" ];
nativeBuildInputs = [ pkg-config ];
diff --git a/pkgs/servers/x11/xorg/overrides.nix b/pkgs/servers/x11/xorg/overrides.nix
index a52e1a7b0a58..ec43ae9d59d4 100644
--- a/pkgs/servers/x11/xorg/overrides.nix
+++ b/pkgs/servers/x11/xorg/overrides.nix
@@ -844,10 +844,6 @@ self: super:
postInstall = "mkdir $out/bin";
});
- xwd = super.xwd.overrideAttrs (attrs: {
- buildInputs = with self; attrs.buildInputs ++ [libXt];
- });
-
xrdb = super.xrdb.overrideAttrs (attrs: {
configureFlags = [ "--with-cpp=${mcpp}/bin/mcpp" ];
});
diff --git a/pkgs/servers/x11/xorg/tarballs.list b/pkgs/servers/x11/xorg/tarballs.list
index 0339d5832923..dabfbd881106 100644
--- a/pkgs/servers/x11/xorg/tarballs.list
+++ b/pkgs/servers/x11/xorg/tarballs.list
@@ -36,7 +36,7 @@ mirror://xorg/individual/app/xdm-1.1.12.tar.bz2
mirror://xorg/individual/app/xdpyinfo-1.3.2.tar.bz2
mirror://xorg/individual/app/xdriinfo-1.0.6.tar.bz2
mirror://xorg/individual/app/xev-1.2.3.tar.bz2
-mirror://xorg/individual/app/xeyes-1.1.2.tar.bz2
+mirror://xorg/individual/app/xeyes-1.2.0.tar.bz2
mirror://xorg/individual/app/xfd-1.1.3.tar.bz2
mirror://xorg/individual/app/xfontsel-1.0.6.tar.bz2
mirror://xorg/individual/app/xfs-1.2.0.tar.bz2
@@ -70,7 +70,7 @@ mirror://xorg/individual/app/xsm-1.0.4.tar.bz2
mirror://xorg/individual/app/xstdcmap-1.0.4.tar.bz2
mirror://xorg/individual/app/xtrap-1.0.3.tar.bz2
mirror://xorg/individual/app/xvinfo-1.1.4.tar.bz2
-mirror://xorg/individual/app/xwd-1.0.7.tar.bz2
+mirror://xorg/individual/app/xwd-1.0.8.tar.bz2
mirror://xorg/individual/app/xwininfo-1.1.4.tar.bz2
mirror://xorg/individual/app/xwud-1.0.5.tar.bz2
mirror://xorg/individual/data/xbitmaps-1.1.2.tar.bz2
diff --git a/pkgs/tools/misc/esphome/default.nix b/pkgs/tools/misc/esphome/default.nix
index e38f0d48b9b7..feeb7ad7583b 100644
--- a/pkgs/tools/misc/esphome/default.nix
+++ b/pkgs/tools/misc/esphome/default.nix
@@ -16,13 +16,13 @@ let
in
with python.pkgs; buildPythonApplication rec {
pname = "esphome";
- version = "1.20.3";
+ version = "1.20.4";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "v${version}";
- sha256 = "1sx2ky7860d8rjfxpbwb176n33icz6q82w4wgd5qr3ldrfjn58vn";
+ sha256 = "sha256-Z2/7J8F9o+ZY+7Q9bpAT79yHqUFyJu9usu4XI4PhpCI=";
};
patches = [
diff --git a/pkgs/tools/misc/goreleaser/default.nix b/pkgs/tools/misc/goreleaser/default.nix
index d2446829b289..44b52e27c4a5 100644
--- a/pkgs/tools/misc/goreleaser/default.nix
+++ b/pkgs/tools/misc/goreleaser/default.nix
@@ -2,13 +2,13 @@
buildGoModule rec {
pname = "goreleaser";
- version = "0.174.1";
+ version = "0.174.2";
src = fetchFromGitHub {
owner = "goreleaser";
repo = pname;
rev = "v${version}";
- sha256 = "sha256-oHH5/w1G0xlhmnUe6/qS0++qtBdDd6dUw6JfWYAWIh8=";
+ sha256 = "sha256-o/rDqYjOI+HxThQA7cflWUhCdsb6m4XOuzI753upmio=";
};
vendorSha256 = "sha256-P91wi2Fqo9+Yccqoqmsx0IbjSGUpiKIh7uOsgsR9c+0=";
diff --git a/pkgs/tools/misc/parallel/default.nix b/pkgs/tools/misc/parallel/default.nix
index 0667327d062b..519d928c6952 100644
--- a/pkgs/tools/misc/parallel/default.nix
+++ b/pkgs/tools/misc/parallel/default.nix
@@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "parallel";
- version = "20210322";
+ version = "20210722";
src = fetchurl {
url = "mirror://gnu/parallel/${pname}-${version}.tar.bz2";
- sha256 = "sha256-mPcbRFojoYu06bzk83S5PmptnezfiSvo0iRZ8iS4VpQ=";
+ sha256 = "0jaa5137sjw2szvmnnslkqv1n3gg2rkkgr71j7hpp5a3q15hjf9j";
};
outputs = [ "out" "man" "doc" ];
diff --git a/pkgs/tools/package-management/apk-tools/default.nix b/pkgs/tools/package-management/apk-tools/default.nix
index b39c74dd57ce..8d8645de2deb 100644
--- a/pkgs/tools/package-management/apk-tools/default.nix
+++ b/pkgs/tools/package-management/apk-tools/default.nix
@@ -4,14 +4,14 @@
stdenv.mkDerivation rec {
pname = "apk-tools";
- version = "2.12.6";
+ version = "2.12.7";
src = fetchFromGitLab {
domain = "gitlab.alpinelinux.org";
owner = "alpine";
repo = "apk-tools";
rev = "v${version}";
- sha256 = "0ki306k2ilwwg8ia302i62qa00f31g9g5q56xfbanyl7b620wd1f";
+ sha256 = "sha256-sGAsC5HZV5jaaUXgaPDUf4+vDL4zSGldzhykpdZlFS4=";
};
nativeBuildInputs = [ pkg-config scdoc ]
diff --git a/pkgs/tools/security/exploitdb/default.nix b/pkgs/tools/security/exploitdb/default.nix
index e12e19a5570c..974fabb3a27f 100644
--- a/pkgs/tools/security/exploitdb/default.nix
+++ b/pkgs/tools/security/exploitdb/default.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "exploitdb";
- version = "2021-08-03";
+ version = "2021-08-04";
src = fetchFromGitHub {
owner = "offensive-security";
repo = pname;
rev = version;
- sha256 = "sha256-cgd4J6d493uQRo079eq7CjjmhofPeuafS0mWAjVfOck=";
+ sha256 = "sha256-DJg/pBTK2abo3eemt8XI4ecy7sZ8iH/qrJgUqrDNjjQ=";
};
installPhase = ''
diff --git a/pkgs/tools/security/vault/default.nix b/pkgs/tools/security/vault/default.nix
index 66a6d5e63e85..e5b8b370ff33 100644
--- a/pkgs/tools/security/vault/default.nix
+++ b/pkgs/tools/security/vault/default.nix
@@ -1,27 +1,34 @@
-{ stdenv, lib, fetchFromGitHub, buildGoPackage, installShellFiles, nixosTests
+{ stdenv, lib, fetchFromGitHub, buildGoModule, installShellFiles, nixosTests
, makeWrapper
, gawk
, glibc
}:
-buildGoPackage rec {
+buildGoModule rec {
pname = "vault";
- version = "1.7.3";
+ version = "1.8.0";
src = fetchFromGitHub {
owner = "hashicorp";
repo = "vault";
rev = "v${version}";
- sha256 = "sha256-BO4xzZrX9eVETQWjBDBfP7TlD7sO+gLgbB330A11KAI=";
+ sha256 = "sha256-jyGymAplSe8vaSwbONtpRoAondxNBcRbFZ+YyOtr7qo=";
};
- goPackagePath = "github.com/hashicorp/vault";
+ vendorSha256 = "11mrdf7pwf8v7bb7wamv2yhixw4x06rd0qym942kk9bwif2balfp";
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles makeWrapper ];
- buildFlagsArray = [ "-tags=vault" "-ldflags=-s -w -X ${goPackagePath}/sdk/version.GitCommit=${src.rev}" ];
+ buildFlagsArray = [ "-tags=vault" ];
+
+ ldflags = [
+ "-s" "-w"
+ "-X github.com/hashicorp/vault/sdk/version.GitCommit=${src.rev}"
+ "-X github.com/hashicorp/vault/sdk/version.Version=${version}"
+ "-X github.com/hashicorp/vault/sdk/version.VersionPrerelease="
+ ];
postInstall = ''
echo "complete -C $out/bin/vault vault" > vault.bash
diff --git a/pkgs/tools/security/vault/vault-bin.nix b/pkgs/tools/security/vault/vault-bin.nix
index c38f370b0bf1..c2f0c2ea51d0 100644
--- a/pkgs/tools/security/vault/vault-bin.nix
+++ b/pkgs/tools/security/vault/vault-bin.nix
@@ -1,26 +1,26 @@
{ lib, stdenv, fetchurl, unzip, makeWrapper, gawk, glibc }:
let
- version = "1.7.3";
+ version = "1.8.0";
sources = let
base = "https://releases.hashicorp.com/vault/${version}";
in {
x86_64-linux = fetchurl {
url = "${base}/vault_${version}_linux_amd64.zip";
- sha256 = "sha256-hFMTKpO3VcCondSy8amb1K8G+BZ7gZF/EXCAg5Ax4D8=";
+ sha256 = "sha256-H+kPDE8xuu2lgENf4t+vCb+Tni+ChkB8K5ZEgIY3Jyo=";
};
i686-linux = fetchurl {
url = "${base}/vault_${version}_linux_386.zip";
- sha256 = "02wbbzffb2m7y3476l5qa5dhi0v30f3sfif0svqhhzh927kg4s5w";
+ sha256 = "19c7d7yr5nm1xgrkh46pcgwwxa6iic6is06n343qaxcj0dfg43kn";
};
x86_64-darwin = fetchurl {
url = "${base}/vault_${version}_darwin_amd64.zip";
- sha256 = "0sw56dhjbasdnlwg668swhyxrn5gy7h9gysdg96za4dhq3iimkrn";
+ sha256 = "0zql0r6gmq0yqb1cbpjgwsg6cky9y43n5gsvijp6snhnp86bicdr";
};
aarch64-linux = fetchurl {
url = "${base}/vault_${version}_linux_arm64.zip";
- sha256 = "0c2w0684adaqildwviajp6pi8vp76g4zwwgc1k2bb5mwv1h2y293";
+ sha256 = "1ajkgkanq8ijcxbb5zbn9z25r0v7qcq13ivjqr0x7ql5bxm3xfmc";
};
};
diff --git a/pkgs/tools/security/verifpal/default.nix b/pkgs/tools/security/verifpal/default.nix
index d65d35122727..02f41477c7ef 100644
--- a/pkgs/tools/security/verifpal/default.nix
+++ b/pkgs/tools/security/verifpal/default.nix
@@ -16,8 +16,6 @@ buildGoModule rec {
vendorSha256 = "XHeXonzRDHXayge5G3apvDarbOfTiV+UQ+IqSbrLkCk=";
- doCheck = false;
-
nativeBuildInputs = [ pigeon ];
subPackages = [ "cmd/verifpal" ];
diff --git a/pkgs/tools/system/hostctl/default.nix b/pkgs/tools/system/hostctl/default.nix
index 54bc72144ea3..3c366d56fca9 100644
--- a/pkgs/tools/system/hostctl/default.nix
+++ b/pkgs/tools/system/hostctl/default.nix
@@ -2,13 +2,13 @@
buildGoModule rec {
pname = "hostctl";
- version = "1.1.0";
+ version = "1.1.1";
src = fetchFromGitHub {
owner = "guumaster";
repo = pname;
rev = "v${version}";
- sha256 = "sha256-X07JvXN1mwOQE2XBfaYbqQnQ92fBSg/Erj0yUygAqmM=";
+ sha256 = "sha256-VjFjGvIoymGVVRiZUk/qoq/PTYoklp+Jz89zndX0e5A=";
};
vendorSha256 = "sha256-rGDWrivIdl5FTu/kNR8nAfE2+1hE4cm3uDg7oBobE9M=";
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 89eb3115537b..c7766eb1f26f 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7407,6 +7407,8 @@ in
ngrok-1 = callPackage ../tools/networking/ngrok-1 { };
+ nitter = callPackage ../servers/nitter { };
+
noice = callPackage ../applications/misc/noice { };
noip = callPackage ../tools/networking/noip { };
@@ -10859,6 +10861,8 @@ in
devpi-server = callPackage ../development/tools/devpi-server {};
+ dictu = callPackage ../development/compilers/dictu { };
+
dotty = callPackage ../development/compilers/scala/dotty.nix { jre = jre8;};
ecl = callPackage ../development/compilers/ecl { };
@@ -11635,9 +11639,12 @@ in
inherit (darwin) libiconv libobjc libresolv;
}) mx jvmci8 graalvm8;
- inherit (callPackages ../development/compilers/graalvm/community-edition.nix {
- inherit (darwin.apple_sdk.frameworks) Foundation;
- }) graalvm8-ce graalvm11-ce;
+ graalvmCEPackages =
+ recurseIntoAttrs (callPackage ../development/compilers/graalvm/community-edition {
+ inherit (darwin.apple_sdk.frameworks) Foundation;
+ });
+ graalvm8-ce = graalvmCEPackages.graalvm8-ce;
+ graalvm11-ce = graalvmCEPackages.graalvm11-ce;
inherit (callPackages ../development/compilers/graalvm/enterprise-edition.nix { })
graalvm8-ee
@@ -11760,6 +11767,7 @@ in
lld_10 = llvmPackages_10.lld;
lld_11 = llvmPackages_11.lld;
lld_12 = llvmPackages_12.lld;
+ lld_13 = llvmPackages_13.lld;
lldb = llvmPackages_latest.lldb;
lldb_5 = llvmPackages_5.lldb;
@@ -11770,11 +11778,13 @@ in
lldb_10 = llvmPackages_10.lldb;
lldb_11 = llvmPackages_11.lldb;
lldb_12 = llvmPackages_12.lldb;
+ lldb_13 = llvmPackages_13.lldb;
llvm = llvmPackages.llvm;
libllvm = llvmPackages.libllvm;
llvm-manpages = llvmPackages.llvm-manpages;
+ llvm_13 = llvmPackages_13.llvm;
llvm_12 = llvmPackages_12.llvm;
llvm_11 = llvmPackages_11.llvm;
llvm_10 = llvmPackages_10.llvm;
@@ -11855,6 +11865,14 @@ in
stdenv = gcc7Stdenv;
}));
+ llvmPackages_13 = recurseIntoAttrs (callPackage ../development/compilers/llvm/13 ({
+ inherit (stdenvAdapters) overrideCC;
+ buildLlvmTools = buildPackages.llvmPackages_13.tools;
+ targetLlvmLibraries = targetPackages.llvmPackages_13.libraries;
+ } // lib.optionalAttrs (stdenv.hostPlatform.isi686 && buildPackages.stdenv.cc.isGNU) {
+ stdenv = gcc7Stdenv;
+ }));
+
llvmPackages_latest = llvmPackages_12;
llvmPackages_rocm = recurseIntoAttrs (callPackage ../development/compilers/llvm/rocm { });
@@ -23055,7 +23073,9 @@ in
weather-icons = callPackage ../data/fonts/weather-icons { };
- whitesur-gtk-theme = callPackage ../data/themes/whitesur { };
+ whitesur-gtk-theme = callPackage ../data/themes/whitesur {
+ inherit (gnome) gnome-shell;
+ };
whitesur-icon-theme = callPackage ../data/icons/whitesur-icon-theme { };
@@ -23949,8 +23969,8 @@ in
};
emacsPackagesFor = emacs: import ./emacs-packages.nix {
- inherit (lib) makeScope makeOverridable;
- inherit emacs;
+ inherit (lib) makeScope makeOverridable dontRecurseIntoAttrs;
+ emacs' = emacs;
pkgs' = pkgs; # default pkgs used for bootstrapping the emacs package set
};
@@ -30030,6 +30050,8 @@ in
d-seams = callPackage ../applications/science/chemistry/d-seams {};
+ ergoscf = callPackage ../applications/science/chemistry/ergoscf { };
+
gwyddion = callPackage ../applications/science/chemistry/gwyddion {};
jmol = callPackage ../applications/science/chemistry/jmol {
diff --git a/pkgs/top-level/emacs-packages.nix b/pkgs/top-level/emacs-packages.nix
index 3fa2d2ea5dca..9b4d700a3553 100644
--- a/pkgs/top-level/emacs-packages.nix
+++ b/pkgs/top-level/emacs-packages.nix
@@ -21,7 +21,12 @@
(package-initialize)
*/
-{ pkgs', makeScope, makeOverridable, emacs }:
+{ pkgs'
+, emacs'
+, makeScope
+, makeOverridable
+, dontRecurseIntoAttrs
+}:
let
@@ -71,7 +76,12 @@ in makeScope pkgs'.newScope (self: makeOverridable ({
// manualPackages // { inherit manualPackages; }
// {
- inherit emacs;
+ # Propagate overriden scope
+ emacs = emacs'.overrideAttrs(old: {
+ passthru = old.passthru // {
+ pkgs = dontRecurseIntoAttrs self;
+ };
+ });
trivialBuild = pkgs.callPackage ../build-support/emacs/trivial.nix {
inherit (self) emacs;
@@ -84,7 +94,7 @@ in makeScope pkgs'.newScope (self: makeOverridable ({
emacsWithPackages = emacsWithPackages { inherit pkgs lib; } self;
withPackages = emacsWithPackages { inherit pkgs lib; } self;
- }// {
+ } // {
# Package specific priority overrides goes here
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index 078c01349c57..93e7acff553d 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -9008,6 +9008,20 @@ let
};
};
+ GooCanvas2CairoTypes = buildPerlPackage rec {
+ pname = "GooCanvas2-CairoTypes";
+ version = "0.001";
+ src = fetchurl {
+ url = "mirror://cpan/authors/id/A/AS/ASOKOLOV/GooCanvas2-CairoTypes-${version}.tar.gz";
+ sha256 = "sha256-uoBnNuvMnePYFBp2Omgr3quxy4cCveKZrf1XSs6HUFI=";
+ };
+ propagatedBuildInputs = [ pkgs.goocanvas2 Gtk3 ];
+ meta = {
+ description = "Bridge between GooCanvas2 and Cairo types";
+ license = with lib.licenses; [ artistic1 gpl1Plus ];
+ };
+ };
+
GoogleProtocolBuffers = buildPerlPackage {
pname = "Google-ProtocolBuffers";
version = "0.12";
@@ -9237,16 +9251,16 @@ let
};
};
- Gtk3ImageView = buildPerlPackage {
+ Gtk3ImageView = buildPerlPackage rec {
pname = "Gtk3-ImageView";
- version = "6";
+ version = "9";
src = fetchurl {
- url = "mirror://cpan/authors/id/R/RA/RATCLIFFE/Gtk3-ImageView-6.tar.gz";
- sha256 = "0krkif9i3hrgjdskw05pcks40fmb43d21lxf4h8aclv0g8z647f0";
+ url = "mirror://cpan/authors/id/A/AS/ASOKOLOV/Gtk3-ImageView-${version}.tar.gz";
+ sha256 = "sha256-0dxe0p1UQglq+xok7g4l2clJ9WqOHxCeAzWD65E0H9w=";
};
buildInputs = [ pkgs.gtk3 ];
propagatedBuildInputs = [ Readonly Gtk3 ];
- checkInputs = [ TestDifferences ImageMagick TryTiny TestMockObject CarpAlways pkgs.librsvg ];
+ checkInputs = [ TestDifferences TestDeep ImageMagick TryTiny TestMockObject CarpAlways pkgs.librsvg ];
checkPhase = ''
${pkgs.xvfb-run}/bin/xvfb-run -s '-screen 0 800x600x24' \
make test
@@ -18802,7 +18816,19 @@ let
sha256 = "096fq62iphmxgcfcayg4i0wf09y1rl1ar6hrcxfqsbrsmkwlzk8a";
};
buildInputs = [ FileShareDirInstall JSONMaybeXS TestDifferences TestException XMLWriter YAML ];
- propagatedBuildInputs = [ CarpClan DBI FileShareDir Moo PackageVariant ParseRecDescent TryTiny ];
+ propagatedBuildInputs = [ CarpClan DBI FileShareDir Moo PackageVariant ParseRecDescent TryTiny GraphViz GD ];
+
+ postPatch = ''
+ patchShebangs script
+ '';
+
+ nativeBuildInputs = lib.optional stdenv.isDarwin shortenPerlShebang;
+ postInstall = lib.optionalString stdenv.isDarwin ''
+ for file in $out/bin/*; do
+ shortenPerlShebang $file
+ done
+ '';
+
meta = {
description = "SQL DDL transformations and more";
license = with lib.licenses; [ artistic1 gpl1Plus ];