Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2021-04-01 12:06:32 +00:00 committed by GitHub
commit 85e9b4acf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
123 changed files with 2570 additions and 423 deletions

View file

@ -5054,6 +5054,12 @@
fingerprint = "8992 44FC D291 5CA2 0A97 802C 156C 88A5 B0A0 4B2A";
}];
};
kiyengar = {
email = "hello@kiyengar.net";
github = "karthikiyengar";
githubId = 8260207;
name = "Karthik Iyengar";
};
kkallio = {
email = "tierpluspluslists@gmail.com";
name = "Karn Kallio";
@ -10392,6 +10398,12 @@
githubId = 1322287;
name = "William O'Hanley";
};
woky = {
email = "pampu.andrei@pm.me";
github = "andreisergiu98";
githubId = 11740700;
name = "Andrei Pampu";
};
wolfangaukang = {
email = "liquid.query960@4wrd.cc";
github = "wolfangaukang";

View file

@ -244,7 +244,7 @@
</listitem>
<listitem>
<para>
xfsprogs was update from 4.19 to 5.10. It now enables reflink support by default on filesystem creation.
xfsprogs was update from 4.19 to 5.11. It now enables reflink support by default on filesystem creation.
Support for reflinks was added with an experimental status to kernel 4.9 and deemed stable in kernel 4.16.
If you want to be able to mount XFS filesystems created with this release of xfsprogs on kernel releases older than those, you need to format them
with <literal>mkfs.xfs -m reflink=0</literal>.

View file

@ -515,6 +515,7 @@
./services/misc/nzbget.nix
./services/misc/nzbhydra2.nix
./services/misc/octoprint.nix
./services/misc/ombi.nix
./services/misc/osrm.nix
./services/misc/packagekit.nix
./services/misc/paperless.nix

View file

@ -0,0 +1,80 @@
{ config, pkgs, lib, ... }:
with lib;
let cfg = config.services.ombi;
in {
options = {
services.ombi = {
enable = mkEnableOption ''
Ombi.
Optionally see <link xlink:href="https://docs.ombi.app/info/reverse-proxy"/>
on how to set up a reverse proxy
'';
dataDir = mkOption {
type = types.str;
default = "/var/lib/ombi";
description = "The directory where Ombi stores its data files.";
};
port = mkOption {
type = types.port;
default = 5000;
description = "The port for the Ombi web interface.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = "Open ports in the firewall for the Ombi web interface.";
};
user = mkOption {
type = types.str;
default = "ombi";
description = "User account under which Ombi runs.";
};
group = mkOption {
type = types.str;
default = "ombi";
description = "Group under which Ombi runs.";
};
};
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' 0700 ${cfg.user} ${cfg.group} - -"
];
systemd.services.ombi = {
description = "Ombi";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStart = "${pkgs.ombi}/bin/Ombi --storage '${cfg.dataDir}' --host 'http://*:${toString cfg.port}'";
Restart = "on-failure";
};
};
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.port ];
};
users.users = mkIf (cfg.user == "ombi") {
ombi = {
group = cfg.group;
home = cfg.dataDir;
};
};
users.groups = mkIf (cfg.group == "ombi") { ombi = { }; };
};
}

View file

@ -124,6 +124,17 @@ in {
};
'';
};
enableAnalyticsReporting = mkOption {
type = types.bool;
default = false;
description = ''
Enable reporting of anonymous usage statistics to Netdata Inc. via either
Google Analytics (in versions prior to 1.29.4), or Netdata Inc.'s
self-hosted PostHog (in versions 1.29.4 and later).
See: <link xlink:href="https://learn.netdata.cloud/docs/agent/anonymous-statistics"/>
'';
};
};
};
@ -140,8 +151,12 @@ in {
wantedBy = [ "multi-user.target" ];
path = (with pkgs; [ curl gawk which ]) ++ lib.optional cfg.python.enable
(pkgs.python3.withPackages cfg.python.extraPackages);
environment = {
PYTHONPATH = "${cfg.package}/libexec/netdata/python.d/python_modules";
} // lib.optionalAttrs (!cfg.enableAnalyticsReporting) {
DO_NOT_TRACK = "1";
};
serviceConfig = {
Environment="PYTHONPATH=${cfg.package}/libexec/netdata/python.d/python_modules";
ExecStart = "${cfg.package}/bin/netdata -P /run/netdata/netdata.pid -D -c ${configFile}";
ExecReload = "${pkgs.util-linux}/bin/kill -s HUP -s USR1 -s USR2 $MAINPID";
TimeoutStopSec = 60;

View file

@ -57,6 +57,26 @@ in
services.privacyidea = {
enable = mkEnableOption "PrivacyIDEA";
environmentFile = mkOption {
type = types.nullOr types.path;
default = null;
example = "/root/privacyidea.env";
description = ''
File to load as environment file. Environment variables
from this file will be interpolated into the config file
using <package>envsubst</package> which is helpful for specifying
secrets:
<programlisting>
{ <xref linkend="opt-services.privacyidea.secretKey" /> = "$SECRET"; }
</programlisting>
The environment-file can now specify the actual secret key:
<programlisting>
SECRET=veryverytopsecret
</programlisting>
'';
};
stateDir = mkOption {
type = types.str;
default = "/var/lib/privacyidea";
@ -206,7 +226,7 @@ in
wantedBy = [ "multi-user.target" ];
after = [ "postgresql.service" ];
path = with pkgs; [ openssl ];
environment.PRIVACYIDEA_CONFIGFILE = piCfgFile;
environment.PRIVACYIDEA_CONFIGFILE = "${cfg.stateDir}/privacyidea.cfg";
preStart = let
pi-manage = "${pkgs.sudo}/bin/sudo -u privacyidea -HE ${penv}/bin/pi-manage";
pgsu = config.services.postgresql.superUser;
@ -214,6 +234,10 @@ in
in ''
mkdir -p ${cfg.stateDir} /run/privacyidea
chown ${cfg.user}:${cfg.group} -R ${cfg.stateDir} /run/privacyidea
umask 077
${lib.getBin pkgs.envsubst}/bin/envsubst -o ${cfg.stateDir}/privacyidea.cfg \
-i "${piCfgFile}"
chown ${cfg.user}:${cfg.group} ${cfg.stateDir}/privacyidea.cfg
if ! test -e "${cfg.stateDir}/db-created"; then
${pkgs.sudo}/bin/sudo -u ${pgsu} ${psql}/bin/createuser --no-superuser --no-createdb --no-createrole ${cfg.user}
${pkgs.sudo}/bin/sudo -u ${pgsu} ${psql}/bin/createdb --owner ${cfg.user} privacyidea
@ -231,6 +255,7 @@ in
Type = "notify";
ExecStart = "${uwsgi}/bin/uwsgi --json ${piuwsgi}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
ExecStop = "${pkgs.coreutils}/bin/kill -INT $MAINPID";
NotifyAccess = "main";
KillSignal = "SIGQUIT";

View file

@ -290,6 +290,7 @@ in
nzbget = handleTest ./nzbget.nix {};
nzbhydra2 = handleTest ./nzbhydra2.nix {};
oh-my-zsh = handleTest ./oh-my-zsh.nix {};
ombi = handleTest ./ombi.nix {};
openarena = handleTest ./openarena.nix {};
openldap = handleTest ./openldap.nix {};
opensmtpd = handleTest ./opensmtpd.nix {};

18
nixos/tests/ombi.nix Normal file
View file

@ -0,0 +1,18 @@
import ./make-test-python.nix ({ lib, ... }:
with lib;
{
name = "ombi";
meta.maintainers = with maintainers; [ woky ];
nodes.machine =
{ pkgs, ... }:
{ services.ombi.enable = true; };
testScript = ''
machine.wait_for_unit("ombi.service")
machine.wait_for_open_port("5000")
machine.succeed("curl --fail http://localhost:5000/")
'';
})

View file

@ -12,10 +12,16 @@ import ./make-test-python.nix ({ pkgs, ...} : rec {
services.privacyidea = {
enable = true;
secretKey = "testing";
pepper = "testing";
secretKey = "$SECRET_KEY";
pepper = "$PEPPER";
adminPasswordFile = pkgs.writeText "admin-password" "testing";
adminEmail = "root@localhost";
# Don't try this at home!
environmentFile = pkgs.writeText "pi-secrets.env" ''
SECRET_KEY=testing
PEPPER=testing
'';
};
services.nginx = {
enable = true;
@ -29,6 +35,8 @@ import ./make-test-python.nix ({ pkgs, ...} : rec {
machine.start()
machine.wait_for_unit("multi-user.target")
machine.succeed("curl --fail http://localhost | grep privacyIDEA")
machine.succeed("grep \"SECRET_KEY = 'testing'\" /var/lib/privacyidea/privacyidea.cfg")
machine.succeed("grep \"PI_PEPPER = 'testing'\" /var/lib/privacyidea/privacyidea.cfg")
machine.succeed(
"curl --fail http://localhost/auth -F username=admin -F password=testing | grep token"
)

View file

@ -10,14 +10,14 @@ let
# If an update breaks things, one of those might have valuable info:
# https://aur.archlinux.org/packages/spotify/
# https://community.spotify.com/t5/Desktop-Linux
version = "1.1.55.494.gca75f788";
version = "1.1.55.498.gf9a83c60";
# To get the latest stable revision:
# curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated'
# To get general information:
# curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.'
# More examples of api usage:
# https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py
rev = "45";
rev = "46";
deps = [
alsaLib
@ -79,7 +79,7 @@ stdenv.mkDerivation {
# https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334
src = fetchurl {
url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap";
sha512 = "5d61a2d5b26be651620ab5d18d3a204d8d7b09dcec8a733ddc176c44cb43e9176c4350933ebe4498b065ba219113f3226c13bea9659da738fe635f41d01db303";
sha512 = "dabb55d2ba41f977b6d3f03bfcf147d11785136dd1277efc62011c8371ef25cc04531266bd16608639b9b6a500c1a18a45f44ba7a43e17ab5ac139e36eff7149";
};
nativeBuildInputs = [ makeWrapper squashfsTools ];

View file

@ -9,7 +9,7 @@
, useGTK2 ? false
, gtk2
, gtk3 # gtk3 seems better supported
, exo
, xfce4-dev-tools
, at-spi2-core
, librsvg
, hicolor-icon-theme
@ -31,8 +31,8 @@ stdenv.mkDerivation rec {
sha256 = "1g7wc3d3vqfa7mrdhx1w9ywydgjbffla6rbrxq9k3sc62br97qms";
};
nativeBuildInputs = [ pkg-config intltool wrapGAppsHook ];
buildInputs = [ lightdm exo librsvg hicolor-icon-theme ]
nativeBuildInputs = [ pkg-config intltool xfce4-dev-tools wrapGAppsHook ];
buildInputs = [ lightdm librsvg hicolor-icon-theme ]
++ (if useGTK2 then [ gtk2 ] else [ gtk3 ]);
configureFlags = [
@ -42,6 +42,13 @@ stdenv.mkDerivation rec {
"--sbindir=${placeholder "out"}/bin" # for wrapGAppsHook to wrap automatically
] ++ lib.optional useGTK2 "--with-gtk2";
postPatch = ''
# exo-csource has been dropped from exo, and replaced by xdt-csource from xfce4-dev-tools
for f in configure.ac src/Makefile.am; do
substituteInPlace $f --replace exo-csource xdt-csource
done
'';
preConfigure = ''
configureFlagsArray+=( --enable-at-spi-command="${at-spi2-core}/libexec/at-spi-bus-launcher --launch-immediately" )
'';
@ -66,7 +73,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://launchpad.net/lightdm-gtk-greeter";
platforms = platforms.linux;
license = licenses.gpl3;
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ];
};
}

View file

@ -1,109 +1,48 @@
{ lib, stdenv, fetchurl, makeWrapper, pkg-config
, zip, python, zlib, which, icu, libmicrohttpd, lzma, aria2, wget, bc
, libuuid, libX11, libXext, libXt, libXrender, glib, dbus, dbus-glib
, gtk2, gdk-pixbuf, pango, cairo, freetype, fontconfig, alsaLib, atk, cmake
, xapian, ctpp2, zimlib
{ lib, mkDerivation, fetchFromGitHub
, callPackage
, pkg-config
, makeWrapper
, qmake
, qtbase
, qtwebengine
, qtsvg
, qtimageformats
, aria2
}:
with lib;
let
xulrunner64_tar = fetchurl {
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-x86_64.tar.bz2";
sha256 = "0i3m30gm5z7qmas14id6ypvbmnb2k7jhz8aby2wz5vvv49zqmx3s";
};
xulrunnersdk64_tar = fetchurl {
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-x86_64.sdk.tar.bz2";
sha256 = "0z90v7c4mq15g5klmsj8vs2r10fbygj3qzynx4952hkv8ihw8n3a";
};
xulrunner32_tar = fetchurl {
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-i686.tar.bz2";
sha256 = "0yln6pxz8f6b9wm9124sx049z8mgi17lgd63rcv2hnix825y8gjb";
};
xulrunnersdk32_tar = fetchurl {
url = "http://download.kiwix.org/dev/xulrunner-29.0.en-US.linux-i686.sdk.tar.bz2";
sha256 = "1h9vcbvf8wgds6i2z20y7krpys0mqsqhv1ijyfljanp6vyll9fvi";
};
xulrunner = if stdenv.hostPlatform.system == "x86_64-linux"
then { tar = xulrunner64_tar; sdk = xulrunnersdk64_tar; }
else { tar = xulrunner32_tar; sdk = xulrunnersdk32_tar; };
pugixml = stdenv.mkDerivation rec {
version = "1.2";
pname = "pugixml";
src = fetchurl {
url = "http://download.kiwix.org/dev/${pname}-${version}.tar.gz";
sha256 = "0sqk0vdwjq44jxbbkj1cy8qykrmafs1sickzldb2w2nshsnjshhg";
};
nativeBuildInputs = [ cmake ];
unpackPhase = ''
# not a nice src archive: all the files are in the root :(
mkdir ${pname}-${version}
cd ${pname}-${version}
tar -xf ${src}
# and the build scripts are in there :'(
cd scripts
'';
};
in
stdenv.mkDerivation rec {
mkDerivation rec {
pname = "kiwix";
version = "0.9";
version = "2.0.5";
src = fetchurl {
url = "http://download.kiwix.org/src/kiwix-${version}-src.tar.xz";
sha256 = "0577phhy2na59cpcqjgldvksp0jwczyg0l6c9ghnr19i375l7yqc";
src = fetchFromGitHub {
owner = pname;
repo = "${pname}-desktop";
rev = version;
sha256 = "12v43bcg4g8fcp02y2srsfdvcb7dpl4pxb9z7a235006s0kfv8yn";
};
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [
qmake
pkg-config
];
buildInputs = [
zip python zlib xapian which icu libmicrohttpd
lzma zimlib ctpp2 aria2 wget bc libuuid makeWrapper pugixml
qtbase
qtwebengine
qtsvg
qtimageformats
(callPackage ./lib.nix {})
];
postUnpack = ''
cd kiwix*
mkdir static
cp Makefile.in static/
cd src/dependencies
tar -xf ${xulrunner.tar}
tar -xf ${xulrunner.sdk}
cd ../../..
'';
configureFlags = [
"--disable-staticbins"
qtWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ aria2 ]}"
];
postInstall = ''
cp -r src/dependencies/xulrunner $out/lib/kiwix
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/lib/kiwix/xulrunner/xulrunner
rm $out/bin/kiwix
makeWrapper $out/lib/kiwix/kiwix-launcher $out/bin/kiwix \
--suffix LD_LIBRARY_PATH : ${makeLibraryPath [stdenv.cc.cc libX11 libXext libXt libXrender glib dbus dbus-glib gtk2 gdk-pixbuf pango cairo freetype fontconfig alsaLib atk]} \
--suffix PATH : ${aria2}/bin
'';
meta = {
meta = with lib; {
description = "An offline reader for Web content";
homepage = "https://kiwix.org";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = with maintainers; [ robbinch ];
knownVulnerabilities = [
"CVE-2015-1032"
];
maintainers = with maintainers; [ ajs124 ];
};
}

View file

@ -0,0 +1,55 @@
{ stdenv, lib, fetchFromGitHub
, meson, ninja, pkg-config
, python3
, curl
, icu
, pugixml
, zimlib
, zlib
, libmicrohttpd
, mustache-hpp
, gtest
}:
stdenv.mkDerivation rec {
pname = "kiwix-lib";
version = "9.4.1";
src = fetchFromGitHub {
owner = "kiwix";
repo = pname;
rev = version;
sha256 = "034nk6l623v78clrs2d0k1vg69sbzrd8c0q79qiqmlkinck1nkxw";
};
nativeBuildInputs = [
meson
ninja
pkg-config
python3
];
buildInputs = [
icu
zlib
mustache-hpp
];
propagatedBuildInputs = [
curl
libmicrohttpd
pugixml
zimlib
];
checkInputs = [
gtest
];
doCheck = true;
postPatch = ''
patchShebangs scripts
'';
}

View file

@ -0,0 +1,36 @@
{ stdenv, fetchFromGitHub, lib, fzf, xclip }:
stdenv.mkDerivation rec {
pname = "unipicker";
version = "unstable-2018-07-10";
src = fetchFromGitHub {
owner = "jeremija";
repo = pname;
rev = "767571c87cdb1e654408d19fc4db98e5e6725c04";
sha256 = "1k4v53pm3xivwg9vq2kndpcmah0yn4679r5jzxvg38bbkfdk86c1";
};
buildInputs = [
fzf
xclip
];
preInstall = ''
substituteInPlace unipicker --replace "/etc/unipickerrc" "$out/etc/unipickerrc"
substituteInPlace unipickerrc --replace "/usr/local" "$out"
'';
makeFlags = [
"PREFIX=$(out)"
"DESTDIR=$(out)"
];
meta = with lib; {
description = "A CLI utility for searching unicode characters by description and optionally copying them to clipboard";
homepage = "https://github.com/jeremija/unipicker";
license = licenses.mit;
maintainers = with maintainers; [ kiyengar ];
platforms = with platforms; unix;
};
}

View file

@ -18,9 +18,9 @@
}
},
"beta": {
"version": "90.0.4430.40",
"sha256": "0n7g4j981h3fn5wgpb3azpili9682nq0yikhd4z7dr7agvpnfr3k",
"sha256bin64": "120rbh8bpcj3z5kqdaicqnsd2mh0xcr8y1411kl0zpwa6hfvgm3r",
"version": "90.0.4430.51",
"sha256": "1k87fw0pv0d2zlxm0il9b5p60gdz6l44jssmsns4zy2fmd9316wr",
"sha256bin64": "0q5yx7bc266azs3nl29ksz4yafvy2nmzn09ifcgr69fjkvsr1qh7",
"deps": {
"gn": {
"version": "2021-02-09",

View file

@ -0,0 +1,24 @@
{ stdenv, lib, fetchFromSourcehut, pkg-config, bearssl, scdoc }:
stdenv.mkDerivation rec {
pname = "gmni";
version = "unstable-2021-03-26";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "gmni";
rev = "77b73efbcd3ea7ed9e3e4c0aa19d9247e21d3c87";
sha256 = "1wvnzyv7vyddcd39y6q5aflpnnsdl4k4y5aj5ssb7vgkld0h1b7r";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ bearssl scdoc ];
meta = with lib; {
description = "A Gemini client";
homepage = "https://git.sr.ht/~sircmpwn/gmni";
license = licenses.gpl3Only;
maintainers = with maintainers; [ bsima jb55 ];
platforms = platforms.all;
};
}

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "tektoncd-cli";
version = "0.17.0";
version = "0.17.1";
src = fetchFromGitHub {
owner = "tektoncd";
repo = "cli";
rev = "v${version}";
sha256 = "sha256-IyYlmatgcVbUj1WCPAFVOIgn1iHM80P4ie6d1YD3ISM=";
sha256 = "sha256-xwUTSJ0rlNzQqGQp6jL03L4SuHUvvD3aWXxa1Xp0UyM=";
};
vendorSha256 = null;

View file

@ -6,16 +6,16 @@
buildGoModule rec {
pname = "bit";
version = "1.0.5";
version = "1.0.6";
src = fetchFromGitHub {
owner = "chriswalz";
repo = pname;
rev = "v${version}";
sha256 = "0dv6ma2vwb21cbxkxzrpmj7cqlhwr7a86i4g728m3y1aclh411sn";
sha256 = "sha256-juQAFVqs0d4EtoX24EyrlKd2qRRseP+jKfM0ymkD39E=";
};
vendorSha256 = "1j6w7bll4zyp99579dhs2rza4y9kgfz3g8d5grfzgqck6cjj9mn8";
vendorSha256 = "sha256-3Y/B14xX5jaoL44rq9+Nn4niGViLPPXBa8WcJgTvYTA=";
propagatedBuildInputs = [ git ];

View file

@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://github.com/kalj/xmonad-log-applet";
license = licenses.bsd3;
broken = desktopSupport == "gnomeflashback";
broken = desktopSupport == "gnomeflashback" || desktopSupport == "xfce4";
description = "An applet that will display XMonad log information (${desktopSupport} version)";
platforms = platforms.linux;
maintainers = with maintainers; [ abbradar ];

View file

@ -0,0 +1,28 @@
{ lib, fetchFromGitHub }:
let
pname = "kreative-square-fonts";
version = "unstable-2021-01-29";
in
fetchFromGitHub {
name = "${pname}-${version}";
owner = "kreativekorp";
repo = "open-relay";
rev = "084f05af3602307499981651eca56851bec01fca";
postFetch = ''
tar xf $downloadedFile --strip=1
install -Dm444 -t $out/share/fonts/truetype/ KreativeSquare/KreativeSquare.ttf
install -Dm444 -t $out/share/fonts/truetype/ KreativeSquare/KreativeSquareSM.ttf
'';
sha256 = "15vvbbzv6b3jh7lxg77viycdd7yf3y8lxy54vs3rsrsxwncg0pak";
meta = with lib; {
description = "Fullwidth scalable monospace font designed specifically to support pseudographics, semigraphics, and private use characters";
homepage = "https://www.kreativekorp.com/software/fonts/ksquare.shtml";
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.linus ];
};
}

View file

@ -1,4 +1,4 @@
{ mkXfceDerivation, exo, gtk3, gvfs, glib }:
{ lib, mkXfceDerivation, gtk3, gvfs, glib }:
mkXfceDerivation {
category = "apps";
@ -8,10 +8,15 @@ mkXfceDerivation {
sha256 = "8UDb4H3zxRKx2y+MRsozQoR3es0fs5ooR/5wBIE11bY=";
nativeBuildInputs = [ exo ];
buildInputs = [ gtk3 glib gvfs ];
postPatch = ''
# exo-csource has been dropped from exo
substituteInPlace src/Makefile.am --replace exo-csource xdt-csource
'';
meta = {
description = "A frontend to easily manage connections to remote filesystems";
license = with lib.licenses; [ gpl2Only ];
};
}

View file

@ -0,0 +1,25 @@
From 3b06d6129033ddaa8dc455a6a572077fd63a3816 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= <malaquias@gmail.com>
Date: Mon, 1 Mar 2021 17:03:07 -0300
Subject: [PATCH] Allow checking parent sources when looking up schema
---
mousepad/mousepad-settings-store.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mousepad/mousepad-settings-store.c b/mousepad/mousepad-settings-store.c
index e5a848b..de989bd 100644
--- a/mousepad/mousepad-settings-store.c
+++ b/mousepad/mousepad-settings-store.c
@@ -181,7 +181,7 @@ mousepad_settings_store_add_settings (MousepadSettingsStore *self,
const gchar *prefix;
/* loop through keys in schema and store mapping of their setting name to GSettings */
- schema = g_settings_schema_source_lookup (source, schema_id, FALSE);
+ schema = g_settings_schema_source_lookup (source, schema_id, TRUE);
keys = g_settings_schema_list_keys (schema);
prefix = schema_id + MOUSEPAD_ID_LEN + 1;
for (key = keys; key && *key; key++)
--
2.30.0

View file

@ -1,20 +1,20 @@
{ mkXfceDerivation, exo, glib, gtk3, gtksourceview3, xfconf }:
{ mkXfceDerivation, gobject-introspection, vala, gtk3, gtksourceview3, xfconf }:
mkXfceDerivation {
category = "apps";
pname = "mousepad";
version = "0.4.2";
version = "0.5.3";
odd-unstable = false;
sha256 = "0a35vaq4l0d8vzw7hqpvbgkr3wj1sqr2zvj7bc5z4ikz2cppqj7p";
sha256 = "0ki5k5p24dpawkyq4k8am1fcq02njhnmhq5vf2ah1zqbc0iyl5yn";
nativeBuildInputs = [ exo ];
buildInputs = [ glib gtk3 gtksourceview3 xfconf ];
nativeBuildInputs = [ gobject-introspection vala ];
# See https://github.com/NixOS/nixpkgs/issues/36468
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
buildInputs = [ gtk3 gtksourceview3 xfconf ];
patches = [ ./allow-checking-parent-sources-when-looking-up-schema.patch ];
meta = {
description = "A simple text editor for Xfce";
description = "Simple text editor for Xfce";
};
}

View file

@ -7,9 +7,9 @@
mkXfceDerivation {
category = "apps";
pname = "parole";
version = "1.0.5";
version = "4.16.0";
sha256 = "0qgis2gnkcvg7xwp76cbi0ihqdjprvvw2d66hk7klhrafp7c0v13";
sha256 = "07hcnbcd56lq7z3gq1cnk71ppy98hwdvlfp5z3zlc55cqrry26zm";
postPatch = ''
substituteInPlace src/plugins/mpris2/Makefile.am \

View file

@ -1,4 +1,4 @@
{ mkXfceDerivation, automakeAddFlags, exo, gtk3, glib, libexif
{ mkXfceDerivation, gtk3, glib, libexif
, libxfce4ui, libxfce4util, xfconf }:
mkXfceDerivation {
@ -8,9 +8,13 @@ mkXfceDerivation {
sha256 = "07h7wbq3xh2ac6q4kp2ai1incfn0zfxxngap7hzqx47a5xw2mrm8";
nativeBuildInputs = [ exo ];
buildInputs = [ glib gtk3 libexif libxfce4ui libxfce4util xfconf ];
postPatch = ''
# exo-csource has been dropped from exo
substituteInPlace src/Makefile.am --replace exo-csource xdt-csource
'';
meta = {
description = "A fast and lightweight picture-viewer for the Xfce desktop environment";
};

View file

@ -3,9 +3,9 @@
mkXfceDerivation {
category = "apps";
pname = "xfce4-dict";
version = "0.8.3";
version = "0.8.4";
sha256 = "0p7k2ffknr23hh3j17dhh5q8adn736p2piwx0sg8f5dvvhhc5whz";
sha256 = "0gm5gwqxhnv3qz9ggf8dj1sq5s72xcliidkyip9l91msx03hfjah";
patches = [ ./configure-gio.patch ];

View file

@ -4,9 +4,9 @@
mkXfceDerivation {
category = "apps";
pname = "xfce4-notifyd";
version = "0.6.1";
version = "0.6.2";
sha256 = "18d2q5b54df8j2281lash8gm0826c6apn39q4igfz2zfcyqjh1if";
sha256 = "1q8n7dffyqbfyy6vpqlmnsfpavlc7iz6hhv1h27fkwzswy2rx28s";
buildInputs = [ exo gtk3 glib libnotify libxfce4ui libxfce4util xfce4-panel xfconf ];

View file

@ -3,10 +3,10 @@
mkXfceDerivation {
category = "apps";
pname = "xfce4-screenshooter";
version = "1.9.7";
version = "1.9.8";
odd-unstable = false;
sha256 = "14vbd7iigaw57hl47rnixk873c20q5clqynzkm9zzpqc568dxixd";
sha256 = "0pbzjcaxm8gk0s75s99kvzygmih4yghp7ngf2mxymjiywcxqr40d";
buildInputs = [ exo gtk3 libsoup libxfce4ui libxfce4util xfce4-panel glib-networking ];

View file

@ -3,9 +3,9 @@
mkXfceDerivation {
category = "apps";
pname = "xfce4-taskmanager";
version = "1.2.3";
version = "1.4.2";
sha256 = "0818chns7vkvjqakgz8z790adkygcq4jlw59dv6kyzk17hxq6cxv";
sha256 = "1l7k00y3d9j38g4hxjrcrh1y4s6s77sq4sjcadsbpzs6zdf05hld";
nativeBuildInputs = [ exo ];
buildInputs = [ gtk3 libwnck3 libXmu ];

View file

@ -1,11 +1,13 @@
{ mkXfceDerivation, gtk3, libxfce4ui, vte, xfconf, pcre2 }:
{ mkXfceDerivation, gtk3, libxfce4ui, vte, xfconf, pcre2, libxslt, docbook_xml_dtd_45, docbook_xsl }:
mkXfceDerivation {
category = "apps";
pname = "xfce4-terminal";
version = "0.8.9.2";
version = "0.8.10";
sha256 = "1vlpfsrdalqmsd86aj0kvvam5skzn6xngigjziwli6q6il6lb9fj";
sha256 = "0v58qcrdpqpd2nbwlc4ra7j9nkvfzfhb1zcp1kggbn627q86i0ql";
nativeBuildInputs = [ libxslt docbook_xml_dtd_45 docbook_xsl ];
buildInputs = [ gtk3 libxfce4ui vte xfconf pcre2 ];

View file

@ -17,11 +17,11 @@
mkXfceDerivation {
category = "apps";
pname = "xfdashboard";
version = "0.7.7";
version = "0.9.1";
rev-prefix = "";
odd-unstable = false;
sha256 = "0b9pl3k8wl7svwhb9knhvr86gjg2904n788l8cbczwy046ql7pyc";
sha256 = "14k774wxbk3w0ci2mmm6bhq4i742qahd0j0dr40iwmld55473zgd";
buildInputs = [
clutter

View file

@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://www.xfce.org/";
description = "Themes for Xfce";
license = licenses.gpl3;
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = [ maintainers.volth ];
};

View file

@ -1,12 +1,12 @@
{ mkXfceDerivation, docbook_xsl, glib, libxslt, gtk2, gtk3
{ mkXfceDerivation, docbook_xsl, glib, libxslt, gtk3
, libxfce4ui, libxfce4util, perl }:
mkXfceDerivation {
category = "xfce";
pname = "exo";
version = "0.12.11";
version = "4.16.1";
sha256 = "1db7w6jk3i501x4qw0hs0ydrm1fjdkxmahzbv5iag859wnnlg0pd";
sha256 = "1220mq8gs5s8l0d1p92j6icldzqj6zaisp27ss5jm7hwkkcnms9n";
nativeBuildInputs = [
libxslt
@ -14,7 +14,6 @@ mkXfceDerivation {
];
buildInputs = [
gtk2 # some xfce plugins still uses gtk2
gtk3
glib
libxfce4ui

View file

@ -1,15 +1,18 @@
{ mkXfceDerivation, gtk3, libxfce4ui, libxfce4util }:
{ lib, mkXfceDerivation, gobject-introspection, gtk3, libxfce4ui, libxfce4util }:
mkXfceDerivation {
category = "xfce";
pname = "garcon";
version = "0.6.4";
version = "4.16.1";
sha256 = "0pamhp1wffiw638s66nws2mpzmwkhvhb6iwccfy8b0kyr57wipjv";
sha256 = "134nm1754i12axl4si60fdwkbk2v6z108nrj9c0lb5in1zmqwa9a";
nativeBuildInputs = [ gobject-introspection ];
buildInputs = [ gtk3 libxfce4ui libxfce4util ];
meta = {
description = "Xfce menu support library";
license = with lib.licenses; [ lgpl2Only fdl11Only ];
};
}

View file

@ -1,15 +1,15 @@
{ lib, mkXfceDerivation, gobject-introspection, gtk2, gtk3, libICE, libSM
, libstartup_notification, libxfce4util, xfconf }:
{ lib, mkXfceDerivation, gobject-introspection, vala, gtk3, libICE, libSM
, libstartup_notification, libgtop, epoxy, libxfce4util, xfconf }:
mkXfceDerivation {
category = "xfce";
pname = "libxfce4ui";
version = "4.14.1";
version = "4.16.0";
sha256 = "0fnncf30s51qhgixn57z4d021pjjhzgsg2x69w4dy68vff2347qy";
sha256 = "0a9wfdpsv83giwv6kcidvpd6c665aa7sv6f2l1q6qcq214vb0rk2";
nativeBuildInputs = [ gobject-introspection ];
buildInputs = [ gtk2 gtk3 libstartup_notification xfconf ];
nativeBuildInputs = [ gobject-introspection vala ];
buildInputs = [ gtk3 libstartup_notification libgtop epoxy xfconf ];
propagatedBuildInputs = [ libxfce4util libICE libSM ];
configureFlags = [
@ -18,6 +18,6 @@ mkXfceDerivation {
meta = with lib; {
description = "Widgets library for Xfce";
license = licenses.lgpl2Plus;
license = with licenses; [ lgpl2Plus lgpl21Plus ];
};
}

View file

@ -1,13 +1,13 @@
{ lib, mkXfceDerivation, gobject-introspection }:
{ lib, mkXfceDerivation, gobject-introspection, vala }:
mkXfceDerivation {
category = "xfce";
pname = "libxfce4util";
version = "4.14.0";
version = "4.16.0";
sha256 = "0vq16bzmnykiikg4dhiaj0qbyj76nkdd54j6k6n568h3dc9ix6q4";
sha256 = "1p0snipc81dhaq5glv7c1zfq5pcvgq7nikl4ikhfm2af9picfsxb";
nativeBuildInputs = [ gobject-introspection ];
nativeBuildInputs = [ gobject-introspection vala ];
meta = with lib; {
description = "Extension library for Xfce";

View file

@ -3,11 +3,11 @@
mkXfceDerivation {
category = "xfce";
pname = "thunar-volman";
version = "0.9.5";
version = "4.16.0";
buildInputs = [ exo gtk3 libgudev libxfce4ui libxfce4util xfconf ];
sha256 = "1qrlpn0q5g9psd41l6y80r3bvbg8jaic92m6r400zzwcvivf95z0";
sha256 = "002nkxsvcq384dgpj7lv3bmb21ks64hsq13l67z1dcjbj51hzl03";
odd-unstable = false;

View file

@ -21,9 +21,9 @@
let unwrapped = mkXfceDerivation {
category = "xfce";
pname = "thunar";
version = "1.8.15";
version = "4.16.6";
sha256 = "1y9d88i0kwl7ak4d65gy3qf4bpkiyaqxd4g6px3v1ykf274k8al8";
sha256 = "12zqwazsqdmghy4h2c4fwxha069l07d46i512395y22h7n6655rn";
nativeBuildInputs = [
docbook_xsl

View file

@ -5,7 +5,6 @@
, freetype
, libgsf
, poppler
, libjpeg
, gst_all_1
}:
@ -14,9 +13,9 @@
mkXfceDerivation {
category = "xfce";
pname = "tumbler";
version = "0.2.9";
version = "4.16.0";
sha256 = "0b3mli40msv35qn67c1m9rn5bigj6ls10l08qk7fa3fwvzl49hmw";
sha256 = "1z4q858afj3yksim4lc96wylgvymv4cv6iw41qdxl5xd6ii2ddr4";
buildInputs = [
ffmpegthumbnailer

View file

@ -3,9 +3,9 @@
mkXfceDerivation {
category = "xfce";
pname = "xfce4-appfinder";
version = "4.14.0";
version = "4.16.1";
sha256 = "04h7jxfm3wkxnxfy8149dckay7i160vvk4p9lnq6xny22r4x20h8";
sha256 = "1r7sjdavqadrpgxqclrznds7a1c2i7mlvghx5mi6qqnh42425gsy";
nativeBuildInputs = [ exo ];
buildInputs = [ garcon gtk3 libxfce4ui libxfce4util xfconf ];

View file

@ -1,14 +1,27 @@
{ mkXfceDerivation, autoreconfHook, autoconf, automake
, glib, gtk-doc, intltool, libtool }:
{ mkXfceDerivation
, autoreconfHook
, libxslt
, docbook_xsl
, autoconf
, automake
, glib
, gtk-doc
, intltool
, libtool
}:
mkXfceDerivation {
category = "xfce";
pname = "xfce4-dev-tools";
version = "4.14.0";
version = "4.16.0";
sha256 = "10hcj88784faqrk08xb538355cla26vdk9ckx158hqdqv38sb42f";
sha256 = "0w47npi1np9vb7lhzjr680aa1xb8ch6kcbg0l0bqnpm0y0jmvgz6";
nativeBuildInputs = [ autoreconfHook ];
nativeBuildInputs = [
autoreconfHook
libxslt
docbook_xsl
];
propagatedBuildInputs = [
autoconf
@ -19,11 +32,6 @@ mkXfceDerivation {
libtool
];
preAutoreconf = ''
substitute configure.ac.in configure.ac \
--subst-var-by REVISION UNKNOWN
'';
setupHook = ./setup-hook.sh;
meta = {

View file

@ -1,5 +1,5 @@
xdtEnvHook() {
addToSearchPath ACLOCAL_PATH $1/share/xfce4/dev-tools/m4macros
addToSearchPath ACLOCAL_PATH $1/share/aclocal
}
envHooks+=(xdtEnvHook)

View file

@ -1,17 +1,48 @@
{ mkXfceDerivation, tzdata, exo, garcon, gtk2, gtk3, glib, gettext, glib-networking, libxfce4ui, libxfce4util, libwnck3, xfconf, gobject-introspection }:
{ mkXfceDerivation
, exo
, garcon
, gettext
, glib
, gobject-introspection
, gtk3
, libdbusmenu-gtk3
, libwnck3
, libxfce4ui
, libxfce4util
, tzdata
, vala
, xfconf
}:
mkXfceDerivation {
category = "xfce";
pname = "xfce4-panel";
version = "4.14.4";
version = "4.16.2";
sha256 = "1srzgb9vsvfrbhym74zkz9hdhxcrvbffxpfgv5vprhlwxw3vk3fq";
sha256 = "0wy66viwjnp1c0lgf90fp3vyqy0f1m1kbfdym8a0yrv2b6sn3958";
nativeBuildInputs = [ gobject-introspection ];
buildInputs = [ exo garcon gtk2 gtk3 glib glib-networking libxfce4ui libxfce4util libwnck3 xfconf ];
nativeBuildInputs = [
gobject-introspection
vala
];
buildInputs = [
exo
garcon
libdbusmenu-gtk3
libxfce4ui
libwnck3
xfconf
tzdata
];
propagatedBuildInputs = [
glib
gtk3
libxfce4util
];
patches = [ ./xfce4-panel-datadir.patch ];
patchFlags = [ "-p1" ];
postPatch = ''
for f in $(find . -name \*.sh); do
@ -21,7 +52,8 @@ mkXfceDerivation {
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
'';
configureFlags = [ "--enable-gtk3" ];
# Workaround https://bugzilla.xfce.org/show_bug.cgi?id=15825
NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0";
meta = {
description = "Xfce's panel";

View file

@ -4,9 +4,9 @@
mkXfceDerivation {
category = "xfce";
pname = "xfce4-power-manager";
version = "1.6.6";
version = "4.16.0";
sha256 = "0lyp3dp4ijbpf21vanrvgm6rmfp8v0zyqxibdj5gxnadmvcq38iy";
sha256 = "1rfw07xbv83rfb0mz3ayanlcvnaq7xpl2znsyya0hspysvavwks2";
nativeBuildInputs = [ automakeAddFlags exo ];
buildInputs = [ gtk3 libnotify libxfce4ui libxfce4util upower xfconf ];

View file

@ -1,11 +1,11 @@
{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xorg, xfce4-session }:
{ mkXfceDerivation, polkit, exo, libxfce4util, libxfce4ui, xfconf, iceauth, gtk3, glib, libwnck3, xfce4-session }:
mkXfceDerivation {
category = "xfce";
pname = "xfce4-session";
version = "4.14.2";
version = "4.16.0";
sha256 = "1gr6j96l792v33lbh7rqpbdjmy8m68hy14bsndx6bykv10zvmgx2";
sha256 = "0b8vkcqn2arjp6qdwmzr0f84n8fjgy2kbf9h4gq03400ar1l111c";
buildInputs = [ exo gtk3 glib libxfce4ui libxfce4util libwnck3 xfconf polkit iceauth ];

View file

@ -1,16 +1,16 @@
{ mkXfceDerivation, automakeAddFlags, exo, garcon, gtk3, glib
{ mkXfceDerivation, exo, garcon, gtk3, glib
, libnotify, libxfce4ui, libxfce4util, libxklavier
, upower, xfconf, xf86inputlibinput }:
mkXfceDerivation {
category = "xfce";
pname = "xfce4-settings";
version = "4.14.3";
version = "4.16.0";
sha256 = "1zzngdj7mp2r6rcs8gvda1218zlz5gpnc6gsp20z32l69psp3yld";
sha256 = "0iha3jm7vmgk6hq7z4l2r7w9qm5jraka0z580i8i83704kfx9g0y";
postPatch = ''
for f in $(find . -name \*.c); do
for f in xfsettingsd/pointers.c dialogs/mouse-settings/main.c; do
substituteInPlace $f --replace \"libinput-properties.h\" '<xorg/libinput-properties.h>'
done
'';

View file

@ -1,11 +1,13 @@
{ mkXfceDerivation, libxfce4util }:
{ mkXfceDerivation, libxfce4util, gobject-introspection, vala }:
mkXfceDerivation {
category = "xfce";
pname = "xfconf";
version = "4.14.3";
version = "4.16.0";
sha256 = "0yxpdcyz81di7w9493jzps09bgrlgianjj5abnzahqmkpmpvb0rh";
sha256 = "00cp2cm1w5a6k7g0fjvqx7d2iwaqw196vii9jkx1aa7mb0f2gk63";
nativeBuildInputs = [ gobject-introspection vala ];
buildInputs = [ libxfce4util ];

View file

@ -3,9 +3,9 @@
mkXfceDerivation {
category = "xfce";
pname = "xfdesktop";
version = "4.14.2";
version = "4.16.0";
sha256 = "04fhm1pf9290sy3ymrmnfnm2x6fq5ldzvj5bjd9kz6zkx0nsq1za";
sha256 = "1znbccr25wvizmzzgdcf719y3qc9gqdi1g4rasgrmi95427lvwn3";
buildInputs = [
exo

View file

@ -5,9 +5,9 @@
mkXfceDerivation {
category = "xfce";
pname = "xfwm4";
version = "4.14.6";
version = "4.16.1";
sha256 = "1ml5b4nn8laqhjihfqqsbjn66525abhin5d32bplh1k9yfxw4xi4";
sha256 = "1lhxm9ifkrnvn1vq3aak3kd695i1ishpryjnw617ifzawy9lj10b";
nativeBuildInputs = [ exo librsvg ];

View file

@ -48,7 +48,7 @@ let
meta = with lib; {
homepage = "https://gitlab.xfce.org/${category}/${pname}/about";
license = licenses.gpl2; # some libraries are under LGPLv2+
license = licenses.gpl2Plus; # some libraries are under LGPLv2+
platforms = platforms.linux;
};
};

View file

@ -1,4 +1,4 @@
{ mkXfceDerivation, gtk3, libXtst, libxfce4ui, libxfce4util, xfce4-panel, xfconf, exo }:
{ mkXfceDerivation, libXtst, libxfce4ui, xfce4-panel, xfconf }:
mkXfceDerivation {
category = "panel-plugins";
@ -6,7 +6,12 @@ mkXfceDerivation {
version = "1.6.1";
sha256 = "03akijvry1n1fkziyvxwcksl4vy4lmnpgd5izjs8jai5sndhsszl";
buildInputs = [ exo gtk3 libXtst libxfce4ui libxfce4util xfce4-panel xfconf ];
buildInputs = [ libXtst libxfce4ui xfce4-panel xfconf ];
postPatch = ''
# exo-csource has been dropped from exo
substituteInPlace panel-plugin/Makefile.am --replace exo-csource xdt-csource
'';
meta = {
description = "Clipboard manager for Xfce panel";

View file

@ -3,8 +3,8 @@
mkXfceDerivation {
category = "panel-plugins";
pname = "xfce4-cpufreq-plugin";
version = "1.2.1";
sha256 = "1p7c4g3yfc19ksdckxpzq1q35jvplh5g55299cvv0afhdb5l8zhv";
version = "1.2.5";
sha256 = "1isqlfhz1ijl1h3hfvi0n4misdjsrhd7pc9h5rkaqm4vh543ggxg";
buildInputs = [ gtk3 libxfce4ui libxfce4util xfce4-panel xfconf ];

View file

@ -20,11 +20,11 @@ let
category = "panel-plugins";
in stdenv.mkDerivation rec {
pname = "xfce4-cpugraph-plugin";
version = "1.2.1";
version = "1.2.3";
src = fetchurl {
url = "mirror://xfce/src/${category}/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "YVrfmr2RQXpEMZ2OTa3GAS+iKjd48vN5cXUS3Lfvkko=";
sha256 = "13302psv0fzg2dsgadr8j6mb06k1bsa4zw6hxmb644vqlvcwq37v";
};
nativeBuildInputs = [

View file

@ -3,17 +3,16 @@
, intltool
, libxfce4ui
, xfce4-panel
, gtk3
, gettext
}:
mkXfceDerivation {
category = "panel-plugins";
pname = "xfce4-datetime-plugin";
version = "0.8.0";
version = "0.8.1";
rev-prefix = "datetime-";
sha256 = "12drh7y70d70r93lpv43fkj5cbyl0vciz4a41nxrknrfbhxrvyah";
rev-prefix = "xfce4-datetime-plugin-";
sha256 = "06h13bmh2sni4qbr3kfnqaa5dq5f48h4xkywrm9pa6h2nyvn4rma";
nativeBuildInputs = [
gettext
@ -21,7 +20,6 @@ mkXfceDerivation {
];
buildInputs = [
gtk3
libxfce4ui
xfce4-panel
];

View file

@ -1,30 +1,30 @@
{ lib, stdenv, pkg-config, fetchFromGitHub, python2, bash, vala_0_46
{ lib, stdenv, pkg-config, fetchFromGitHub, python3, bash, vala_0_48
, dockbarx, gtk2, xfce, pythonPackages, wafHook }:
stdenv.mkDerivation rec {
pname = "xfce4-dockbarx-plugin";
version = "${ver}-${rev}";
ver = "0.5";
rev = "a2dcb66";
ver = "0.6";
rev = "5213876";
src = fetchFromGitHub {
owner = "TiZ-EX1";
owner = "xuzhen";
repo = "xfce4-dockbarx-plugin";
rev = rev;
sha256 = "1f75iwlshnif60x0qqdqw5ffng2m4f4zp0ijkrbjz83wm73nsxfx";
sha256 = "0s8bljn4ga2hj480j0jwkc0npp8szbmirmcsys791gk32iq4dasn";
};
pythonPath = [ dockbarx ];
nativeBuildInputs = [ pkg-config wafHook ];
buildInputs = [ python2 vala_0_46 gtk2 pythonPackages.wrapPython ]
buildInputs = [ python3 vala_0_48 gtk2 pythonPackages.wrapPython ]
++ (with xfce; [ libxfce4util xfce4-panel xfconf xfce4-dev-tools ])
++ pythonPath;
postPatch = ''
substituteInPlace wscript --replace /usr/share/ "\''${PREFIX}/share/"
substituteInPlace src/dockbarx.vala --replace /usr/share/ $out/share/
substituteInPlace src/dockbarx.vala --replace '/usr/bin/env python2' ${bash}/bin/bash
substituteInPlace src/dockbarx.vala --replace '/usr/bin/env python3' ${bash}/bin/bash
'';
postFixup = ''
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
'';
meta = with lib; {
homepage = "https://github.com/TiZ-EX1/xfce4-dockbarx-plugin";
homepage = "https://github.com/xuzhen/xfce4-dockbarx-plugin";
description = "A plugins to embed DockbarX into xfce4-panel";
license = licenses.mit;
platforms = platforms.linux;

View file

@ -44,6 +44,7 @@ in stdenv.mkDerivation rec {
description = "Embed arbitrary app windows on Xfce panel";
license = licenses.gpl2Plus;
platforms = platforms.linux;
broken = true; # unmaintained plugin; no longer compatible with xfce 4.16
maintainers = [ ];
};
}

View file

@ -33,8 +33,9 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://goodies.xfce.org/projects/panel-plugins/xfce4-hardware-monitor-plugin";
description = "Hardware monitor plugin for the XFCE4 panel";
license = licenses.gpl3;
license = licenses.gpl3Only;
platforms = platforms.unix;
broken = true; # unmaintained plugin; no longer compatible with xfce 4.16
maintainers = [ maintainers.romildo ];
};
}

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, pkg-config, intltool, libxfce4util, xfce4-panel, libxfce4ui,
gtk2, exo, gnutls, libgcrypt, xfce }:
{ lib, stdenv, fetchurl, pkg-config, intltool, xfce4-panel, libxfce4ui,
exo, gnutls, libgcrypt, xfce }:
let
category = "panel-plugins";
@ -7,11 +7,11 @@ in
stdenv.mkDerivation rec {
pname = "xfce4-mailwatch-plugin";
version = "1.2.0";
version = "1.3.0";
src = fetchurl {
url = "mirror://xfce/src/${category}/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "1bfw3smwivr9mzdyq768biqrl4aq94zqi3xjzq6kqnd8561cqjk2";
sha256 = "0bmykjhd3gs1737fl3zn5gg6f3vlncak2xqz89zv5018znz1xy90";
};
nativeBuildInputs = [
@ -20,11 +20,9 @@ stdenv.mkDerivation rec {
];
buildInputs = [
libxfce4util
libxfce4ui
xfce4-panel
gtk2
exo # needs exo with gtk2 support
exo
gnutls
libgcrypt
];
@ -38,7 +36,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-mailwatch-plugin";
description = "Mail watcher plugin for Xfce panel";
license = licenses.gpl2;
license = licenses.gpl2Only;
platforms = platforms.linux;
maintainers = [ ];
};

View file

@ -16,9 +16,8 @@ stdenv.mkDerivation rec {
buildInputs = [ gtk3 libwnck3 libxfce4util xfce4-panel ];
postPatch = ''
for f in src/preferences.vala src/namebar.vala; do
substituteInPlace $f --replace 'var dirs = Environment.get_system_data_dirs()' "string[] dirs = { \"$out/share\" }"
done
substituteInPlace src/namebar.vala --replace 'var dirs = Environment.get_system_data_dirs()' "string[] dirs = { \"$out/share\" }"
substituteInPlace src/preferences.vala --replace 'var dir_strings = Environment.get_system_data_dirs()' "string[] dir_strings = { \"$out/share\" }"
'';
passthru.updateScript = xfce.updateScript {

View file

@ -1,15 +1,11 @@
{ lib
, stdenv
, fetchurl
, fetchpatch
, pkg-config
, intltool
, libxfce4util
, xfce4-panel
, libxfce4ui
, xfconf
, gtk2
, libunique
, xfce
}:
@ -30,16 +26,11 @@ in stdenv.mkDerivation rec {
];
buildInputs = [
libxfce4util
libxfce4ui
xfce4-panel
xfconf
gtk2
libunique
];
hardeningDisable = [ "format" ];
passthru.updateScript = xfce.updateScript {
inherit pname version;
attrPath = "xfce.${pname}";

View file

@ -8,11 +8,11 @@ in
stdenv.mkDerivation rec {
pname = "xfce4-sensors-plugin";
version = "1.3.92";
version = "1.3.95";
src = fetchurl {
url = "mirror://xfce/src/${category}/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "04jibw23ibi61f19gc9xy400yhcdiya4px6zp8c7fjq65hyn9iix";
sha256 = "0v44qwrwb95jrlsni1gdlc0zhymlm62w42zs3jbr5mcdc7j4mil3";
};
nativeBuildInputs = [
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-sensors-plugin";
description = "A panel plug-in for different sensors using acpi, lm_sensors and hddtemp";
license = licenses.gpl2;
license = licenses.gpl2Plus;
platforms = platforms.unix;
maintainers = [ maintainers.romildo ];
};

View file

@ -3,10 +3,9 @@
, fetchurl
, pkg-config
, intltool
, libxfce4util
, xfce4-panel
, libxfce4ui
, gtk3
, xfconf
, xfce
}:
@ -14,11 +13,11 @@ let
category = "panel-plugins";
in stdenv.mkDerivation rec {
pname = "xfce4-systemload-plugin";
version = "1.2.4";
version = "1.3.1";
src = fetchurl {
url = "mirror://xfce/src/${category}/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "BTG435I8ujvo0GTLi2OLlU33SRXlpEciiZlReEd4mDU=";
sha256 = "0lknh5l30qs5c69wwjcblbyhczvdbxs59fqkb8mpqbfm05w01lan";
};
nativeBuildInputs = [
@ -27,10 +26,9 @@ in stdenv.mkDerivation rec {
];
buildInputs = [
libxfce4util
libxfce4ui
xfce4-panel
gtk3
xfconf
];
passthru.updateScript = xfce.updateScript {

View file

@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
homepage = "https://docs.xfce.org/panel-plugins/xfce4-timer-plugin";
description = "Simple countdown and alarm plugin for the Xfce panel";
platforms = platforms.linux;
license = licenses.gpl2;
license = licenses.gpl2Plus;
maintainers = [ ];
};
}

View file

@ -5,7 +5,6 @@
, pcre
, libxfce4util
, xfce4-panel
, xfconf
}:
mkXfceDerivation {

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, pkg-config, intltool, gtk3, libxml2, libsoup, upower,
libxfce4ui, libxfce4util, xfce4-panel, hicolor-icon-theme, xfce }:
{ lib, stdenv, fetchurl, pkg-config, intltool, libxml2, libsoup, upower,
libxfce4ui, xfce4-panel, xfconf, hicolor-icon-theme, xfce }:
let
category = "panel-plugins";
@ -7,11 +7,11 @@ in
stdenv.mkDerivation rec {
pname = "xfce4-weather-plugin";
version = "0.10.1";
version = "0.11.0";
src = fetchurl {
url = "mirror://xfce/src/${category}/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2";
sha256 = "12bs2rfmmy021087i10vxibdbbvd5vld0vk3h5hymhpz7rgszcmg";
sha256 = "1z2k24d599mxf5gqa35i3xmc3gk2yvqs80hxxpyw06yma6ljw973";
};
nativeBuildInputs = [
@ -20,13 +20,12 @@ stdenv.mkDerivation rec {
];
buildInputs = [
gtk3
libxml2
libsoup
upower
libxfce4ui
libxfce4util
xfce4-panel
xfconf
hicolor-icon-theme
];

View file

@ -3,10 +3,10 @@
mkXfceDerivation {
category = "panel-plugins";
pname = "xfce4-whiskermenu-plugin";
version = "2.4.6";
version = "2.5.3";
rev-prefix = "v";
odd-unstable = false;
sha256 = "03asfaxqbhawzb3870az7qgid5y7cg3ip8h6r4z8kavcd0b7x4ii";
sha256 = "15kcph35pji3l1y81snrmpqzhhpdc9h4nk6cjsjyla51a1s2y3hz";
nativeBuildInputs = [ cmake ];

View file

@ -1,15 +1,14 @@
{ lib, stdenv, fetchFromGitHub, pkg-config, intltool, python3, imagemagick, libwnck, gtk2
, exo, libxfce4ui, libxfce4util, xfce4-panel, xfconf, xfce4-dev-tools, xfce }:
{ lib, stdenv, fetchFromGitHub, pkg-config, intltool, python3, imagemagick, libwnck3, libxfce4ui, xfce4-panel, xfconf, xfce4-dev-tools, xfce }:
stdenv.mkDerivation rec {
pname = "xfce4-windowck-plugin";
version = "0.4.6";
version = "0.4.10";
src = fetchFromGitHub {
owner = "cedl38";
owner = "invidian";
repo = pname;
rev = "v${version}";
sha256 = "1gwrbjfv4cnlsqh05h42w41z3xs15yjj6j8y9gxvvvvlgzzp4p3g";
sha256 = "0l066a174v2c7ly125v9x1fgbg5bnpwdwnjh69v9kp4plp791q4n";
};
nativeBuildInputs = [
@ -20,11 +19,8 @@ stdenv.mkDerivation rec {
buildInputs = [
python3
imagemagick
libwnck
gtk2
exo
libwnck3
libxfce4ui
libxfce4util
xfce4-panel
xfconf
xfce4-dev-tools

View file

@ -39,7 +39,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
homepage = "https://github.com/Jeinzi/thunar-dropbox";
description = "A plugin that adds context-menu items for Dropbox to Thunar";
license = licenses.gpl3;
license = licenses.gpl3Only;
platforms = platforms.linux;
};
}

View file

@ -4,7 +4,7 @@ let
getPatches = dir:
let files = builtins.attrNames (builtins.readDir dir);
in map (f: dir + ("/" + f)) files;
version = "1.22.4";
version = "2.0.3";
channel = "stable";
filename = "flutter_linux_${version}-${channel}.tar.xz";
in
@ -15,7 +15,7 @@ in
pname = "flutter";
src = fetchurl {
url = "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
sha256 = "0qalgav9drqddcj8lfvl9ddf3325n953pvkmgha47lslg9sa88zw";
sha256 = "14a63cpkp78rgymmlrppds69jsrdarg33dr43nb7s61r0xfh9icm";
};
patches = getPatches ./patches;
};

View file

@ -41,11 +41,10 @@ let
buildInputs = [ git ];
inherit src patches;
inherit src patches version;
postPatch = ''
patchShebangs --build ./bin/
find ./bin/ -executable -type f -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \;
'';
buildPhase = ''

View file

@ -1,8 +1,8 @@
diff --git a/bin/internal/shared.sh b/bin/internal/shared.sh
index 8d613de739..a673466726 100644
index c44f867746..c9eda34e26 100644
--- a/bin/internal/shared.sh
+++ b/bin/internal/shared.sh
@@ -204,8 +204,6 @@ function shared::execute() {
@@ -218,8 +218,6 @@ function shared::execute() {
# FLUTTER_TOOL_ARGS="--enable-asserts $FLUTTER_TOOL_ARGS"
# FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432"
@ -12,20 +12,18 @@ index 8d613de739..a673466726 100644
case "$BIN_NAME" in
flutter*)
diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
index 8a1a1e29da..778f253358 100644
index 3dc7929dd1..e65d70d55b 100644
--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
+++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
@@ -293,13 +293,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
@@ -246,11 +246,7 @@ class FlutterCommandRunner extends CommandRunner<void> {
globals.flutterUsage.suppressAnalytics = true;
}
- try {
- await globals.flutterVersion.ensureVersionFile();
- } on FileSystemException catch (e) {
- globals.printError('Failed to write the version file to the artifact cache: "$e".');
- globals.printError('Please ensure you have permissions in the artifact cache directory.');
- throwToolExit('Failed to write the version file');
- }
- globals.flutterVersion.ensureVersionFile();
final bool machineFlag = topLevelResults['machine'] as bool;
if (topLevelResults.command?.name != 'upgrade' && topLevelResults['version-check'] as bool && !machineFlag) {
await globals.flutterVersion.checkFlutterVersionFreshness();
- if (topLevelResults.command?.name != 'upgrade' && topLevelResults['version-check'] as bool && !machineFlag) {
- await globals.flutterVersion.checkFlutterVersionFreshness();
- }
// See if the user specified a specific device.
globals.deviceManager.specifiedDeviceId = topLevelResults['device-id'] as String;

View file

@ -1,59 +1,54 @@
diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart
index d045c83f04..d51973020b 100644
--- a/dev/devicelab/lib/framework/runner.dart
+++ b/dev/devicelab/lib/framework/runner.dart
@@ -136,7 +136,7 @@ Future<void> cleanupSystem() async {
print('\nTelling Gradle to shut down (JAVA_HOME=$javaHome)');
final String gradlewBinaryName = Platform.isWindows ? 'gradlew.bat' : 'gradlew';
final Directory tempDir = Directory.systemTemp.createTempSync('flutter_devicelab_shutdown_gradle.');
- recursiveCopy(Directory(path.join(flutterDirectory.path, 'bin', 'cache', 'artifacts', 'gradle_wrapper')), tempDir);
+ recursiveCopy(Directory(path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'gradle_wrapper')), tempDir);
copy(File(path.join(path.join(flutterDirectory.path, 'packages', 'flutter_tools'), 'templates', 'app', 'android.tmpl', 'gradle', 'wrapper', 'gradle-wrapper.properties')), Directory(path.join(tempDir.path, 'gradle', 'wrapper')));
if (!Platform.isWindows) {
await exec(
diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
index 8da01315ae..bb8d61d7f2 100644
index a6c59bae07..21f6c9812a 100644
--- a/packages/flutter_tools/lib/src/asset.dart
+++ b/packages/flutter_tools/lib/src/asset.dart
@@ -8,6 +8,7 @@ import 'package:meta/meta.dart';
@@ -5,6 +5,7 @@
import 'package:meta/meta.dart';
import 'package:package_config/package_config.dart';
import 'package:yaml/yaml.dart';
+import 'base/common.dart';
import 'base/context.dart';
import 'base/file_system.dart';
import 'base/utils.dart';
@@ -399,7 +400,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
for (final Map<dynamic, dynamic> font in (family['fonts'] as List<dynamic>).cast<Map<dynamic, dynamic>>()) {
final Uri entryUri = globals.fs.path.toUri(font['asset'] as String);
import 'base/logger.dart';
@@ -14,6 +15,7 @@ import 'cache.dart';
import 'convert.dart';
import 'dart/package_map.dart';
import 'devfs.dart';
+import 'globals.dart' as globals;
import 'flutter_manifest.dart';
import 'license_collector.dart';
import 'project.dart';
@@ -377,7 +379,7 @@ class ManifestAssetBundle implements AssetBundle {
for (final Map<String, Object> font in family['fonts'] as List<Map<String, Object>>) {
final Uri entryUri = _fileSystem.path.toUri(font['asset'] as String);
result.add(_Asset(
- baseDir: globals.fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
+ baseDir: globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
- baseDir: _fileSystem.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
+ baseDir: _fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
relativeUri: Uri(path: entryUri.pathSegments.last),
entryUri: entryUri,
package: null,
diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
index a35d8f87d0..a40027dc74 100644
index 11e3bf3e11..39d6fae0d1 100644
--- a/packages/flutter_tools/lib/src/cache.dart
+++ b/packages/flutter_tools/lib/src/cache.dart
@@ -215,8 +215,15 @@ class Cache {
@@ -321,8 +321,15 @@ class Cache {
return;
}
assert(_lock == null);
+
+ final Directory dir = globals.fs.directory(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
+ final Directory dir = _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
+ if (!dir.existsSync()) {
+ dir.createSync(recursive: true);
+ globals.os.chmod(dir, '755');
+ }
+
final File lockFile =
- globals.fs.file(globals.fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
+ globals.fs.file(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
- _fileSystem.file(_fileSystem.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
+ _fileSystem.file(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
try {
_lock = lockFile.openSync(mode: FileMode.write);
} on FileSystemException catch (e) {
@@ -319,7 +326,7 @@ class Cache {
@@ -424,7 +431,7 @@ class Cache {
if (_rootOverride != null) {
return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
} else {

View file

@ -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
''

View file

@ -0,0 +1,110 @@
{ lib, stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
, fixDarwinDylibNames
, enableManpages ? false
}:
let
self = stdenv.mkDerivation ({
pname = "clang";
inherit version;
src = fetch "clang" "1xg2wy86zdj1d4h33n9mmb4j0x8bp9a5pk4qnnx3imlh8n6vhrqj";
inherit clang-tools-extra_src;
unpackPhase = ''
unpackFile $src
mv clang-* clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
'';
nativeBuildInputs = [ cmake python3 lld ]
++ lib.optional enableManpages python3.pkgs.sphinx
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
buildInputs = [ libxml2 llvm ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
] ++ lib.optionals enableManpages [
"-DCLANG_INCLUDE_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
"-DSPHINX_OUTPUT_MAN=ON"
"-DSPHINX_OUTPUT_HTML=OFF"
"-DSPHINX_WARNINGS_AS_ERRORS=OFF"
];
patches = [
./purity.patch
# https://reviews.llvm.org/D51899
];
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" "python" ];
# Clang expects to find LLVMgold in its own prefix
postInstall = ''
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/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
'';
passthru = {
isClang = true;
inherit llvm;
};
meta = {
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
homepage = "https://llvm.org/";
license = lib.licenses.ncsa;
platforms = lib.platforms.all;
};
} // 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.description = "man page for Clang ${version}";
});
in self

View file

@ -0,0 +1,28 @@
From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
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

View file

@ -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)$")

View file

@ -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)

View file

@ -0,0 +1,33 @@
From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
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 bc5fb9ff7..b64eb4246 100644
--- a/cmake/Modules/AddCompilerRT.cmake
+++ b/cmake/Modules/AddCompilerRT.cmake
@@ -210,14 +210,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 - $<TARGET_FILE:${libname}>
- WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
- )
- endif()
endif()
install(TARGETS ${libname}
ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
2.14.1

View file

@ -0,0 +1,90 @@
{ lib, stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
let
useLLVM = stdenv.hostPlatform.useLLVM or false;
bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
inherit (stdenv.hostPlatform) isMusl;
in
stdenv.mkDerivation rec {
pname = "compiler-rt";
inherit version;
src = fetch pname "1n4jf0clwj3q0vfc7xjl0k4dqj69fvgsmib8qdqh45imgamnypvb";
nativeBuildInputs = [ cmake python3 llvm ];
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 (stdenv.isDarwin) [
"-DDARWIN_macosx_OVERRIDE_SDK_VERSION=ON"
"-DDARWIN_osx_ARCHS=${stdenv.hostPlatform.parsed.cpu.name}"
] ++ 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) [
"-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) [
"-DCOMPILER_RT_BUILD_BUILTINS=ON"
"-DCMAKE_C_FLAGS=-nodefaultlibs"
#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"
];
outputs = [ "out" "dev" ];
patches = [
./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./compiler-rt-X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config
]# ++ lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
++ lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-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 <stdlib.h>" ""
substituteInPlace lib/builtins/clear_cache.c \
--replace "#include <assert.h>" ""
substituteInPlace lib/builtins/cpu_model.c \
--replace "#include <assert.h>" ""
'';
# 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
'';
}

View file

@ -0,0 +1,204 @@
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, gccForLibs
, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
, buildPackages
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
, darwin
}:
let
release_version = "12.0.0";
candidate = "rc3"; # empty or "rcN"
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
version = "${release_version}${dash-candidate}"; # differentiating these (variables) is important for RCs
targetConfig = stdenv.targetPlatform.config;
fetch = name: sha256: fetchurl {
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${name}-${release_version}${candidate}.src.tar.xz";
inherit sha256;
};
clang-tools-extra_src = fetch "clang-tools-extra" "1p6ln69iciwwpng226mfvxf3vylfvbz73y0a4y4v2rg7pn7hk671";
tools = lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
mkExtraBuildCommands = cc: ''
rsrc="$out/resource-root"
mkdir "$rsrc"
ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
ln -s "${targetLlvmLibraries.compiler-rt.out}/share" "$rsrc/share"
echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
'';
in {
llvm = callPackage ./llvm.nix { };
clang-unwrapped = callPackage ./clang {
inherit (tools) lld;
inherit clang-tools-extra_src;
};
# disabled until recommonmark supports sphinx 3
#Llvm-manpages = lowPrio (tools.llvm.override {
# enableManpages = true;
# python3 = pkgs.python3; # don't use python-boot
#});
clang-manpages = lowPrio (tools.clang-unwrapped.override {
enableManpages = true;
python3 = pkgs.python3; # don't use python-boot
});
# disabled until recommonmark supports sphinx 3
# lldb-manpages = lowPrio (tools.lldb.override {
# enableManpages = true;
# python3 = pkgs.python3; # don't use python-boot
# });
libclang = tools.clang-unwrapped.lib;
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.nix {
libunwind = libraries.libunwind;
};
lldb = callPackage ./lldb.nix {
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
# doesnt support like LLVM. Probably we should move to some other
# file.
bintools = callPackage ./bintools.nix {};
lldClang = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = targetLlvmLibraries.libcxx;
bintools = wrapBintoolsWith {
inherit (tools) 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 ''
echo "-fno-exceptions" >> $out/nix-support/cc-cflags
'' + mkExtraBuildCommands cc;
};
lldClangNoLibcxx = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = null;
bintools = wrapBintoolsWith {
inherit (tools) 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;
};
lldClangNoLibc = wrapCCWith rec {
cc = tools.clang-unwrapped;
libcxx = null;
bintools = wrapBintoolsWith {
inherit (tools) bintools;
libc = null;
};
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;
};
lldClangNoCompilerRt = wrapCCWith {
cc = tools.clang-unwrapped;
libcxx = null;
bintools = wrapBintoolsWith {
inherit (tools) bintools;
libc = null;
};
extraPackages = [ ];
extraBuildCommands = ''
echo "-nostartfiles" >> $out/nix-support/cc-cflags
'';
};
});
libraries = lib.makeExtensible (libraries: let
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
in {
compiler-rt = callPackage ./compiler-rt.nix ({} //
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
}));
stdenv = overrideCC stdenv buildLlvmTools.clang;
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
libcxx = callPackage ./libc++ ({} //
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
}));
libcxxabi = callPackage ./libc++abi.nix ({} //
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
libunwind = libraries.libunwind;
}));
openmp = callPackage ./openmp.nix {};
libunwind = callPackage ./libunwind.nix ({} //
(lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
}));
});
in { inherit tools libraries; } // libraries // tools

View file

@ -0,0 +1,56 @@
{ lib, stdenv, fetch, fetchpatch, cmake, python3, libcxxabi, llvm, fixDarwinDylibNames, version
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++";
inherit version;
src = fetch "libcxx" "1114yvbipwdk1qk1xrb7s05hf7cycyknpf4ph0wbqpjzzzxk0hgk";
postUnpack = ''
unpackFile ${libcxxabi.src}
mv libcxxabi-* libcxxabi
unpackFile ${llvm.src}
mv llvm-* llvm
'';
patches = [
(fetchpatch {
# Backported from LLVM 12, avoids clashes with commonly used "block.h" header.
url = "https://github.com/llvm/llvm-project/commit/19bc9ea480b60b607a3e303f20c7a3a2ea553369.patch";
sha256 = "sha256-aWa66ogmPkG0xHzSfcpD0qZyZQcNKwLV44js4eiun78=";
stripLen = 1;
})
] ++ lib.optional 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;
buildInputs = [ libcxxabi ];
cmakeFlags = [
"-DLIBCXX_CXX_ABI=libcxxabi"
] ++ 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 = {
homepage = "https://libcxx.llvm.org/";
description = "A new implementation of the C++ standard library, targeting C++11";
license = with lib.licenses; [ ncsa mit ];
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,69 @@
{ lib, stdenv, cmake, fetch, libcxx, libunwind, llvm, version
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation {
pname = "libc++abi";
inherit version;
src = fetch "libcxxabi" "1vdc6zld5rlbrbpxf0fxs0m6k1cabpi82ksiwgj1pmhx8l140n0q";
nativeBuildInputs = [ cmake ];
buildInputs = lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
cmakeFlags = 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"
];
patches = [ ./libcxxabi-no-threads.patch ];
postUnpack = ''
unpackFile ${libcxx.src}
mv libcxx-* libcxx
unpackFile ${llvm.src}
mv llvm-* llvm
'' + 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 ${./libcxxabi-wasm.patch}
'';
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 = {
homepage = "https://libcxxabi.llvm.org/";
description = "A new implementation of low level support for a standard C++ library";
license = with lib.licenses; [ ncsa mit ];
maintainers = with lib.maintainers; [ vlstill ];
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4138acf..41b4763 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -362,6 +362,7 @@ if (NOT LIBCXXABI_ENABLE_THREADS)
" is also set to ON.")
endif()
add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
+ add_definitions(-D_LIBCPP_HAS_NO_THREADS)
endif()
if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)

View file

@ -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)

View file

@ -0,0 +1,14 @@
{ lib, stdenv, version, fetch, cmake, fetchpatch
, enableShared ? !stdenv.hostPlatform.isStatic
}:
stdenv.mkDerivation rec {
pname = "libunwind";
inherit version;
src = fetch pname "18n3k2kf6pyvzspnz1i22czbgi14kmch76fxml8kvhky7mw7v1yz";
nativeBuildInputs = [ cmake ];
cmakeFlags = lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
}

View file

@ -0,0 +1,39 @@
{ lib, stdenv
, fetch
, libunwind
, cmake
, libxml2
, llvm
, version
}:
stdenv.mkDerivation rec {
pname = "lld";
inherit version;
src = fetch pname "097pxd7hgipr538vi48q8fi5svbd03bx3d078a06wigmvb7kzvw1";
nativeBuildInputs = [ cmake ];
buildInputs = [ llvm libxml2 ];
postPatch = ''
substituteInPlace MachO/CMakeLists.txt --replace \
'(''${LLVM_MAIN_SRC_DIR}/' '('
mkdir -p libunwind/include
tar -xf "${libunwind.src}" --wildcards -C libunwind/include --strip-components=2 "libunwind-*/include/"
'';
outputs = [ "out" "dev" ];
postInstall = ''
moveToOutput include "$dev"
moveToOutput lib "$dev"
'';
meta = {
description = "The LLVM Linker";
homepage = "https://lld.llvm.org/";
license = lib.licenses.ncsa;
platforms = lib.platforms.all;
};
}

View file

@ -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 <sys/ptrace.h>
+#include <asm/ptrace.h>
-#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 <sys/procfs.h>
+#undef pt_regs
+#else
#include <sys/procfs.h>
-#endif // __ANDROID__
+#endif

View file

@ -0,0 +1,103 @@
{ lib, stdenv
, fetch
, cmake
, zlib
, ncurses
, swig
, which
, libedit
, libxml2
, llvm
, clang-unwrapped
, python3
, version
, libobjc
, xpc
, Foundation
, bootstrap_cmds
, Carbon
, Cocoa
, lit
, enableManpages ? false
}:
stdenv.mkDerivation (rec {
pname = "lldb";
inherit version;
src = fetch pname "077fli9l0fg4kpa5l9vrj810s13ajs15d745lg4l8kmjkbw7p3yh";
patches = [ ./lldb-procfs.patch ];
nativeBuildInputs = [ cmake python3 which swig lit ]
++ lib.optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [
ncurses
zlib
libedit
libxml2
llvm
]
++ lib.optionals stdenv.isDarwin [
libobjc
xpc
Foundation
bootstrap_cmds
Carbon
Cocoa
];
hardeningDisable = [ "format" ];
cmakeFlags = [
"-DLLVM_ENABLE_RTTI=OFF"
"-DClang_DIR=${clang-unwrapped}/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"
];
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 = with lib; {
description = "A next-generation high-performance debugger";
homepage = "https://lldb.llvm.org";
license = licenses.ncsa;
platforms = platforms.all;
};
} // 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.description = "man pages for LLDB ${version}";
})

View file

@ -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,

View file

@ -0,0 +1,189 @@
{ lib, stdenv
, fetch
, cmake
, python3
, libffi
, libbfd
, libpfm
, libxml2
, ncurses
, version
, release_version
, zlib
, buildPackages
, debugVersion ? false
, enableManpages ? false
, enableSharedLibraries ? true
, 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;
src = fetch pname "1lpdkndjb8cxpcyjv9glqp58687j8y8cvd7r72pw6sbqkkzq86g5";
polly_src = fetch "polly" "002a8q3lgspvqdb8fi09cl11x438x6a2d2sb026jargrx92i5vas";
unpackPhase = ''
unpackFile $src
mv llvm-${release_version}* llvm
sourceRoot=$PWD/llvm
'' + optionalString enablePolly ''
unpackFile $polly_src
mv polly-* $sourceRoot/tools/polly
'';
outputs = [ "out" "python" ]
++ optional enableSharedLibraries "lib";
nativeBuildInputs = [ cmake python3 ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [ libxml2 libffi ]
++ optional enablePFM libpfm; # exegesis
propagatedBuildInputs = [ ncurses zlib ];
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/../lib''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
''
# Patch llvm-config to return correct library path based on --link-{shared,static}.
+ optionalString (enableSharedLibraries) ''
substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
patch -p1 < ./llvm-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
'' + 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; [
"-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=${buildPackages.llvm_12}/bin/llvm-tblgen"
];
postBuild = ''
rm -R $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
''
+ optionalString enableSharedLibraries ''
moveToOutput "lib/libLLVM-*" "$lib"
moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
''
+ optionalString (enableSharedLibraries && (!stdenv.isDarwin)) ''
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
''
+ optionalString (stdenv.isDarwin && enableSharedLibraries) ''
substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
--replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl);
checkTarget = "check-all";
requiredSystemFeatures = [ "big-parallel" ];
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = "https://llvm.org/";
license = lib.licenses.ncsa;
maintainers = with lib.maintainers; [ lovek323 raskin dtzWill primeos ];
platforms = lib.platforms.all;
};
} // lib.optionalAttrs enableManpages {
pname = "llvm-manpages";
buildPhase = ''
make docs-llvm-man
'';
installPhase = ''
make -C docs install
'';
postPatch = null;
postInstall = null;
outputs = [ "out" ];
doCheck = false;
meta.description = "man pages for LLVM ${version}";
})

View file

@ -0,0 +1,35 @@
{ lib
, stdenv
, fetch
, fetchpatch
, cmake
, llvm
, perl
, version
}:
stdenv.mkDerivation rec {
pname = "openmp";
inherit version;
src = fetch pname "0kw1g7ndvwi0g7lx5d55mp81h9vffxz820l9r2wjdvvfs3dsyq05";
patches = [
# Fix compilation on aarch64-darwin, remove after the next release.
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/7b5254223acbf2ef9cd278070c5a84ab278d7e5f.patch";
sha256 = "sha256-A+9/IVIoazu68FK5H5CiXcOEYe1Hpp4xTx2mIw7m8Es=";
stripLen = 1;
})
];
nativeBuildInputs = [ cmake perl ];
buildInputs = [ llvm ];
meta = {
description = "Components required to build an executable OpenMP program";
homepage = "https://openmp.llvm.org/";
license = lib.licenses.mit;
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,412 @@
From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001
From: Will Dietz <w@wdtz.org>
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 <anarchy@gentoo.org>
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 <link.h>
#endif
-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
+#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
#include <ucontext.h>
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 <glob.h>
-#include <obstack.h>
+# if !SANITIZER_NONGNU
+# include <obstack.h>
+# endif
#include <mqueue.h>
-#include <net/if_ppp.h>
-#include <netax25/ax25.h>
-#include <netipx/ipx.h>
-#include <netrom/netrom.h>
+#include <linux/if_ppp.h>
+#include <linux/ax25.h>
+#include <linux/ipx.h>
+#include <linux/netrom.h>
#if HAVE_RPC_XDR_H
# include <rpc/xdr.h>
#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 <sys/ustat.h> 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

View file

@ -0,0 +1,44 @@
#!/usr/bin/env bash
set -eu
# Example usage: ./pkgs/development/compilers/llvm/update.sh 12.0.0-rc4
readonly VERSION="$1"
readonly VERSION_MAJOR="${VERSION%%.*}"
readonly VERSION_MAIN="${VERSION%%-*}"
declare VERSION_PATCH="${VERSION/$VERSION_MAIN/}"
readonly VERSION_PATCH="${VERSION_PATCH/-/}"
readonly DIR="pkgs/development/compilers/llvm/$VERSION_MAJOR"
readonly FILE="$DIR/default.nix"
sed -Ei \
-e "s/release_version = \".+\";/release_version = \"$VERSION_MAIN\";/" \
-e "s/candidate = \".*\";/candidate = \"$VERSION_PATCH\";/" \
"$FILE"
readonly ATTRSET="llvmPackages_$VERSION_MAJOR"
readonly SOURCES=(
"clang-unwrapped.src"
"compiler-rt.src"
"clang-unwrapped.clang-tools-extra_src"
"libcxx.src"
"libcxxabi.src"
"libunwind.src"
"lld.src"
"lldb.src"
"llvm.src"
"llvm.polly_src"
"openmp.src"
)
for SOURCE in "${SOURCES[@]}"; do
echo "Updating the hash of $SOURCE:"
declare ATTR="$ATTRSET.$SOURCE"
declare OLD_HASH="$(nix eval -f . $ATTR.outputHash)"
declare NEW_HASH="\"$(nix-prefetch-url -A $ATTR)\""
find "$DIR" -type f -exec sed -i "s/$OLD_HASH/$NEW_HASH/" {} +
done
echo OK

View file

@ -2,7 +2,7 @@
, lib
, fetchurl
, unzip
, version ? "2.10.5"
, version ? "2.12.2"
, sources ?
let
base = "https://storage.googleapis.com/dart-archive/channels";
@ -11,24 +11,24 @@
aarch64 = "arm64";
# Make sure that if the user overrides version parameter they're
# also need to override sources, to avoid mistakes
version = "2.10.5";
version = "2.12.2";
in
{
"${version}-x86_64-darwin" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-macos-${x86_64}-release.zip";
sha256 = "1vb2m25w6v901id9syan9q69fa60sxxd7qpyzq21fn5dpah0g99i";
sha256 = "0h6mpy0kfc842vhg053fyxbjnd8lw1d1shdcsj800048260lxhyd";
};
"${version}-x86_64-linux" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${x86_64}-release.zip";
sha256 = "1mb6m3vxjya1dz47mdna23c2015n3bz8dvz8fwggq6k3zp0a4dsh";
sha256 = "1gg210gf4yif3bl9k19znkndc4c1cd529xwxpi20ykaw3zfxxz2z";
};
"${version}-i686-linux" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${i686}-release.zip";
sha256 = "10g4qrwvmabrdg4i8y0wq9g7whqcpkdfp05yilflg70ybplrscf7";
sha256 = "1wngxba71j20gq9vy7n8q0m9rnqs047xm5b03bxk3hhaq6dyzkwn";
};
"${version}-aarch64-linux" = fetchurl {
url = "${base}/stable/release/${version}/sdk/dartsdk-linux-${aarch64}-release.zip";
sha256 = "0js83wy496swcwia144fhxk872irb5nr6i8558hxabkdrpv1bky5";
sha256 = "0rqsmzl5g5kgk54qb03kamjm5n5g5pqfl79np37xdzwqbv0zx22b";
};
}
}:

View file

@ -0,0 +1,26 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "mustache";
version = "4.1";
src = fetchFromGitHub {
owner = "kainjow";
repo = "Mustache";
rev = "v${version}";
sha256 = "0r9rbk6v1wpld2ismfsk2lkhbyv3dkf0p03hkjivbj05qkfhvlbb";
};
nativeBuildInputs = [ cmake ];
installPhase = ''
mkdir -p $out/include
cp ../mustache.hpp $out/include
'';
meta = with lib; {
description = "Mustache text templates for modern C++";
homepage = "https://github.com/kainjow/Mustache";
license = licenses.boost;
};
}

View file

@ -1,23 +1,55 @@
{ lib, stdenv, fetchurl, lzma }:
{ lib, stdenv, fetchFromGitHub
, meson, ninja, pkg-config
, python3
, icu
, libuuid
, xapian
, xz
, zstd
, gtest
}:
stdenv.mkDerivation rec {
pname = "zimlib";
version = "1.4";
version = "6.3.0";
src = fetchurl {
url = "http://www.openzim.org/download/${pname}-${version}.tar.gz";
sha256 = "14ra3iq42x53k1nqxb5lsg4gadlkpkgv6cbjjl6305ajmbrghcdq";
src = fetchFromGitHub {
owner = "openzim";
repo = "libzim";
rev = version;
sha256 = "0iy0f1clhihq277x218ccx3mszgpr3h9l0by48b9ykr115nffw3s";
};
buildInputs = [ lzma ];
nativeBuildInputs = [
meson
pkg-config
ninja
python3
];
enableParallelBuilding = true;
propagatedBuildInputs = [
icu
libuuid
xapian
xz
zstd
];
postPatch = ''
patchShebangs scripts
'';
checkInputs = [
gtest
];
doCheck = true;
meta = with lib; {
description = "Library for reading and writing ZIM files";
homepage = "https://www.openzim.org/wiki/Zimlib";
license = licenses.gpl2;
maintainers = with maintainers; [ robbinch ];
maintainers = with maintainers; [ ajs124 ];
platforms = platforms.linux;
};
}

View file

@ -2,7 +2,9 @@
buildDunePackage rec {
pname = "bigstring";
version = "0.2";
version = "0.3";
useDune2 = true;
minimumOCamlVersion = "4.03";
@ -10,10 +12,11 @@ buildDunePackage rec {
owner = "c-cube";
repo = "ocaml-bigstring";
rev = version;
sha256 = "0ypdf29cmwmjm3djr5ygz8ls81dl41a4iz1xx5gbcdpbrdiapb77";
sha256 = "0bkxwdcswy80f6rmx5wjza92xzq4rdqsb4a9fm8aav8bdqx021n8";
};
doCheck = true;
# Circular dependency with bigstring-unix
doCheck = false;
meta = with lib; {
homepage = "https://github.com/c-cube/ocaml-bigstring";

View file

@ -4,6 +4,8 @@ buildDunePackage rec {
pname = "cpu";
version = "2.0.0";
useDune2 = true;
src = fetchFromGitHub {
owner = "UnixJunkie";
repo = pname;

View file

@ -5,6 +5,8 @@ buildDunePackage rec {
pname = "crowbar";
version = "0.2";
useDune2 = true;
src = fetchFromGitHub {
owner = "stedolan";
repo = pname;

View file

@ -4,6 +4,8 @@ buildDunePackage rec {
pname = "dtoa";
version = "0.3.2";
useDune2 = true;
minimumOCamlVersion = "4.02";
src = fetchurl {

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