Merge master into staging-next

Changed files
+640 -198
nixos
pkgs
applications
graphics
networking
browsers
firefox
science
biology
hmmer
logic
monosat
video
mplayer
build-support
desktops
gnome
core
gnome-software
development
compilers
interpreters
libraries
SDL2_gfx
glibc
libgphoto2
libimagequant
libite
libtsm
opencolorio
pcl
x264
python-modules
casbin
env-canada
flux-led
keyutils
oath
pyads
pyahocorasick
pyqtgraph
qcs-api-client
os-specific
linux
fbterm
firmware
fwupd
read-edid
rtl8812au
servers
icingaweb2
tools
compression
graphics
pngquant
misc
networking
fastd
security
mkp224o
top-level
+1 -1
nixos/lib/make-zfs-image.nix
···
pkgs.vmTools.override {
rootModules =
[ "zfs" "9p" "9pnet_virtio" "virtio_pci" "virtio_blk" ] ++
-
(pkgs.lib.optional (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) "rtc_cmos");
+
(pkgs.lib.optional pkgs.stdenv.hostPlatform.isx86 "rtc_cmos");
kernel = modulesTree;
}
).runInLinuxVM (
+1 -1
nixos/lib/qemu-common.nix
···
''-netdev vde,id=vlan${toString nic},sock="$QEMU_VDE_SOCKET_${toString net}"''
];
-
qemuSerialDevice = if pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64 then "ttyS0"
+
qemuSerialDevice = if pkgs.stdenv.hostPlatform.isx86 then "ttyS0"
else if (with pkgs.stdenv.hostPlatform; isAarch32 || isAarch64 || isPower) then "ttyAMA0"
else throw "Unknown QEMU serial device for system '${pkgs.stdenv.hostPlatform.system}'";
+1 -1
nixos/modules/hardware/all-firmware.nix
···
b43Firmware_5_1_138
b43Firmware_6_30_163_46
b43FirmwareCutter
-
] ++ optional (pkgs.stdenv.hostPlatform.isi686 || pkgs.stdenv.hostPlatform.isx86_64) facetimehd-firmware;
+
] ++ optional pkgs.stdenv.hostPlatform.isx86 facetimehd-firmware;
})
(mkIf cfg.wirelessRegulatoryDatabase {
hardware.firmware = [ pkgs.wireless-regdb ];
+1 -1
nixos/modules/installer/cd-dvd/iso-image.nix
···
throw "Unsupported architecture";
# Syslinux (and isolinux) only supports x86-based architectures.
-
canx86BiosBoot = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
+
canx86BiosBoot = pkgs.stdenv.hostPlatform.isx86;
in
+1 -1
nixos/modules/system/boot/kernel.nix
···
"hid_generic" "hid_lenovo" "hid_apple" "hid_roccat"
"hid_logitech_hidpp" "hid_logitech_dj" "hid_microsoft"
-
] ++ optionals (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [
+
] ++ optionals pkgs.stdenv.hostPlatform.isx86 [
# Misc. x86 keyboard stuff.
"pcips2" "atkbd" "i8042"
+1 -1
nixos/modules/virtualisation/azure-agent.nix
···
config = mkIf cfg.enable {
assertions = [ {
-
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
+
assertion = pkgs.stdenv.hostPlatform.isx86;
message = "Azure not currently supported on ${pkgs.stdenv.hostPlatform.system}";
} {
assertion = config.networking.networkmanager.enable == false;
+3 -3
nixos/modules/virtualisation/qemu-vm.nix
···
imap1 (idx: drive: drive // { device = driveDeviceName idx; });
efiPrefix =
-
if (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then "${pkgs.OVMF.fd}/FV/OVMF"
+
if pkgs.stdenv.hostPlatform.isx86 then "${pkgs.OVMF.fd}/FV/OVMF"
else if pkgs.stdenv.isAarch64 then "${pkgs.OVMF.fd}/FV/AAVMF"
else throw "No EFI firmware available for platform";
efiFirmware = "${efiPrefix}_CODE.fd";
···
virtualisation.memorySize =
mkOption {
type = types.ints.positive;
-
default = 384;
+
default = 1024;
description =
''
The memory size in megabytes of the virtual machine.
···
# FIXME: Consolidate this one day.
virtualisation.qemu.options = mkMerge [
-
(mkIf (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [
+
(mkIf pkgs.stdenv.hostPlatform.isx86 [
"-usb" "-device usb-tablet,bus=usb-bus.0"
])
(mkIf (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [
+1 -1
nixos/modules/virtualisation/virtualbox-guest.nix
···
config = mkIf cfg.enable (mkMerge [{
assertions = [{
-
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
+
assertion = pkgs.stdenv.hostPlatform.isx86;
message = "Virtualbox not currently supported on ${pkgs.stdenv.hostPlatform.system}";
}];
+1 -1
nixos/modules/virtualisation/vmware-guest.nix
···
config = mkIf cfg.enable {
assertions = [ {
-
assertion = pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64;
+
assertion = pkgs.stdenv.hostPlatform.isx86;
message = "VMWare guest is not currently supported on ${pkgs.stdenv.hostPlatform.system}";
} ];
-4
nixos/tests/airsonic.nix
···
enable = true;
maxMemory = 800;
};
-
-
# Airsonic is a Java application, and unfortunately requires a significant
-
# amount of memory.
-
virtualisation.memorySize = 1024;
};
testScript = ''
-1
nixos/tests/cage.nix
···
program = "${pkgs.xterm}/bin/xterm -cm -pc -fa Monospace -fs 24";
};
-
virtualisation.memorySize = 1024;
# Need to switch to a different GPU driver than the default one (-vga std) so that Cage can launch:
virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ];
};
-1
nixos/tests/cagebreak.nix
···
programs.xwayland.enable = true;
environment.systemPackages = [ pkgs.cagebreak pkgs.wayland-utils ];
-
virtualisation.memorySize = 1024;
# Need to switch to a different GPU driver than the default one (-vga std) so that Cagebreak can launch:
virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ];
};
-1
nixos/tests/cassandra.nix
···
];
};
services.cassandra = cassandraCfg ipAddress // extra;
-
virtualisation.memorySize = 1024;
};
in
{
-1
nixos/tests/ceph-multi-node.nix
···
generateHost = { pkgs, cephConfig, networkConfig, ... }: {
virtualisation = {
-
memorySize = 1024;
emptyDiskImages = [ 20480 ];
vlans = [ 1 ];
};
-1
nixos/tests/ceph-single-node-bluestore.nix
···
generateHost = { pkgs, cephConfig, networkConfig, ... }: {
virtualisation = {
-
memorySize = 1024;
emptyDiskImages = [ 20480 20480 20480 ];
vlans = [ 1 ];
};
-1
nixos/tests/ceph-single-node.nix
···
generateHost = { pkgs, cephConfig, networkConfig, ... }: {
virtualisation = {
-
memorySize = 1024;
emptyDiskImages = [ 20480 20480 20480 ];
vlans = [ 1 ];
};
-1
nixos/tests/common/wayland-cage.nix
···
};
virtualisation = {
-
memorySize = 1024;
qemu.options = [ "-vga virtio" ];
};
}
-1
nixos/tests/containers-bridge.nix
···
{ pkgs, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true;
-
virtualisation.memorySize = 768;
networking.bridges = {
br0 = {
-1
nixos/tests/containers-ephemeral.nix
···
};
machine = { pkgs, ... }: {
-
virtualisation.memorySize = 768;
virtualisation.writableStore = true;
containers.webserver = {
-1
nixos/tests/containers-extra_veth.nix
···
{ pkgs, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true;
-
virtualisation.memorySize = 768;
virtualisation.vlans = [];
networking.useDHCP = false;
-1
nixos/tests/containers-hosts.nix
···
machine =
{ lib, ... }:
{
-
virtualisation.memorySize = 256;
virtualisation.vlans = [];
networking.bridges.br0.interfaces = [];
-1
nixos/tests/containers-imperative.nix
···
nix.binaryCaches = []; # don't try to access cache.nixos.org
virtualisation.writableStore = true;
-
virtualisation.memorySize = 1024;
# Make sure we always have all the required dependencies for creating a
# container available within the VM, because we don't have network access.
virtualisation.additionalPaths = let
-1
nixos/tests/containers-ip.nix
···
imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation = {
writableStore = true;
-
memorySize = 768;
};
containers.webserver4 = webserverFor "10.231.136.1" "10.231.136.2";
-2
nixos/tests/containers-macvlans.nix
···
machine1 =
{ lib, ... }:
{
-
virtualisation.memorySize = 256;
virtualisation.vlans = [ 1 ];
# To be able to ping containers from the host, it is necessary
···
machine2 =
{ ... }:
{
-
virtualisation.memorySize = 256;
virtualisation.vlans = [ 1 ];
};
-4
nixos/tests/containers-physical_interfaces.nix
···
nodes = {
server = { ... }:
{
-
virtualisation.memorySize = 256;
virtualisation.vlans = [ 1 ];
containers.server = {
···
};
};
bridged = { ... }: {
-
virtualisation.memorySize = 128;
virtualisation.vlans = [ 1 ];
containers.bridged = {
···
};
bonded = { ... }: {
-
virtualisation.memorySize = 128;
virtualisation.vlans = [ 1 ];
containers.bonded = {
···
};
bridgedbond = { ... }: {
-
virtualisation.memorySize = 128;
virtualisation.vlans = [ 1 ];
containers.bridgedbond = {
-1
nixos/tests/containers-portforward.nix
···
{ pkgs, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true;
-
virtualisation.memorySize = 768;
containers.webserver =
{ privateNetwork = true;
-1
nixos/tests/containers-tmpfs.nix
···
{ pkgs, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true;
-
virtualisation.memorySize = 768;
containers.tmpfs =
{
-2
nixos/tests/custom-ca.nix
···
# chromium-based browsers refuse to run as root
test-support.displayManager.auto.user = "alice";
-
# browsers may hang with the default memory
-
virtualisation.memorySize = 500;
networking.hosts."127.0.0.1" = [ "good.example.com" "bad.example.com" ];
security.pki.certificateFiles = [ "${example-good-cert}/ca.crt" ];
-1
nixos/tests/enlightenment.nix
···
};
};
hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
-
virtualisation.memorySize = 1024;
environment.systemPackages = [ pkgs.xdotool ];
services.acpid.enable = true;
services.connman.enable = true;
-1
nixos/tests/fcitx/default.nix
···
...
}:
{
-
virtualisation.memorySize = 1024;
imports = [
../common/user-account.nix
-1
nixos/tests/fenics.nix
···
gcc
(python3.withPackages (ps: with ps; [ fenics ]))
];
-
virtualisation.memorySize = 512;
};
};
testScript =
-3
nixos/tests/firefox.nix
···
pkgs.xdotool
];
-
# Need some more memory to record audio.
-
virtualisation.memorySize = 500;
-
# Create a virtual sound device, with mixing
# and all, for recording audio.
boot.kernelModules = [ "snd-aloop" ];
-1
nixos/tests/gerrit.nix
···
{ config, pkgs, ... }: {
networking.firewall.allowedTCPPorts = [ 80 2222 ];
-
virtualisation.memorySize = 1024;
services.gerrit = {
enable = true;
-1
nixos/tests/gnome-xorg.nix
···
};
};
-
virtualisation.memorySize = 1024;
};
testScript = { nodes, ... }: let
-1
nixos/tests/gnome.nix
···
};
};
-
virtualisation.memorySize = 1024;
};
testScript = { nodes, ... }: let
-1
nixos/tests/graphite.nix
···
nodes = {
one =
{ ... }: {
-
virtualisation.memorySize = 1024;
time.timeZone = "UTC";
services.graphite = {
web = {
-2
nixos/tests/hadoop/hadoop.nix
···
# YARN cluster
rm1 = {pkgs, options, ...}: {
-
virtualisation.memorySize = 1024;
services.hadoop = {
inherit package coreSite hdfsSite;
yarnSite = options.services.hadoop.yarnSite.default // yarnSiteHA;
···
};
};
rm2 = {pkgs, options, ...}: {
-
virtualisation.memorySize = 1024;
services.hadoop = {
inherit package coreSite hdfsSite;
yarnSite = options.services.hadoop.yarnSite.default // yarnSiteHA;
-1
nixos/tests/hadoop/hdfs.nix
···
import ../make-test-python.nix ({...}: {
nodes = {
namenode = {pkgs, ...}: {
-
virtualisation.memorySize = 1024;
services.hadoop = {
package = pkgs.hadoop;
hdfs = {
-1
nixos/tests/installed-tests/fwupd.nix
···
services.fwupd.enable = true;
services.fwupd.disabledPlugins = lib.mkForce []; # don't disable test plugin
services.fwupd.enableTestRemote = true;
-
virtualisation.memorySize = 768;
};
}
+1 -1
nixos/tests/installer.nix
···
let iface = if grubVersion == 1 then "ide" else "virtio";
isEfi = bootLoader == "systemd-boot" || (bootLoader == "grub" && grubUseEfi);
bios = if pkgs.stdenv.isAarch64 then "QEMU_EFI.fd" else "OVMF.fd";
-
in if !isEfi && !(pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then
+
in if !isEfi && !pkgs.stdenv.hostPlatform.isx86 then
throw "Non-EFI boot methods are only supported on i686 / x86_64"
else ''
def assemble_qemu_flags():
-1
nixos/tests/jitsi-meet.nix
···
client = { nodes, pkgs, ... }: {
};
server = { config, pkgs, ... }: {
-
virtualisation.memorySize = 512;
services.jitsi-meet = {
enable = true;
hostName = "server";
-1
nixos/tests/kafka.nix
···
};
networking.firewall.allowedTCPPorts = [ 2181 ];
-
virtualisation.memorySize = 1024;
};
kafka = { ... }: {
services.apache-kafka = {
-1
nixos/tests/keycloak.nix
···
nodes = {
keycloak = { ... }: {
-
virtualisation.memorySize = 1024;
security.pki.certificateFiles = [
certs.ca.cert
-2
nixos/tests/lxd-image.nix
···
machine = { lib, ... }: {
virtualisation = {
-
# OOMs otherwise
-
memorySize = 1024;
# disk full otherwise
diskSize = 2048;
-1
nixos/tests/metabase.nix
···
nodes = {
machine = { ... }: {
services.metabase.enable = true;
-
virtualisation.memorySize = 1024;
};
};
-4
nixos/tests/mysql/mysql.nix
···
{
imports = [ users ];
-
# prevent oom:
-
# Kernel panic - not syncing: Out of memory: compulsory panic_on_oom is enabled
-
virtualisation.memorySize = 1024;
-
services.mysql.enable = true;
services.mysql.initialDatabases = [
{ name = "testdb3"; schema = ./testdb.sql; }
-1
nixos/tests/networking-proxy.nix
···
services.xserver.enable = false;
-
virtualisation.memorySize = 128;
};
in import ./make-test-python.nix ({ pkgs, ...} : {
name = "networking-proxy";
-1
nixos/tests/nginx-etag.nix
···
};
client = { pkgs, lib, ... }: {
-
virtualisation.memorySize = 512;
environment.systemPackages = let
testRunner = pkgs.writers.writePython3Bin "test-runner" {
libraries = [ pkgs.python3Packages.selenium ];
-1
nixos/tests/nixops/default.nix
···
nix.binaryCaches = lib.mkForce [ ];
users.users.person.isNormalUser = true;
virtualisation.writableStore = true;
-
virtualisation.memorySize = 1024 /*MiB*/;
virtualisation.additionalPaths = [
pkgs.hello
pkgs.figlet
-1
nixos/tests/opensmtpd-rspamd.nix
···
smtp2 = { pkgs, ... }: {
imports = [ common/user-account.nix ];
-
virtualisation.memorySize = 512;
networking = {
firewall.allowedTCPPorts = [ 25 143 ];
useDHCP = false;
-1
nixos/tests/pantheon.nix
···
services.xserver.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
-
virtualisation.memorySize = 1024;
};
enableOCR = true;
-1
nixos/tests/paperless-ng.nix
···
enable = true;
passwordFile = builtins.toFile "password" "admin";
};
-
virtualisation.memorySize = 1024;
};
testScript = ''
-1
nixos/tests/plasma5-systemd-start.nix
···
user = "alice";
};
};
-
virtualisation.memorySize = 1024;
};
testScript = { nodes, ... }: let
-1
nixos/tests/plasma5.nix
···
user = "alice";
};
hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
-
virtualisation.memorySize = 1024;
};
testScript = { nodes, ... }: let
-1
nixos/tests/pleroma.nix
···
security.pki.certificateFiles = [ "${tls-cert}/cert.pem" ];
networking.extraHosts = hosts nodes;
networking.firewall.enable = false;
-
virtualisation.memorySize = 512;
environment.systemPackages = with pkgs; [
provision-db
provision-secrets
-1
nixos/tests/privacyidea.nix
···
machine = { ... }: {
virtualisation.cores = 2;
-
virtualisation.memorySize = 512;
services.privacyidea = {
enable = true;
-2
nixos/tests/prometheus-exporters.nix
···
extraFlags = [ "--lnd.network=regtest" ];
};
metricProvider = {
-
virtualisation.memorySize = 1024;
systemd.services.prometheus-lnd-exporter.serviceConfig.RestartSec = 15;
systemd.services.prometheus-lnd-exporter.after = [ "lnd.service" ];
services.bitcoind.regtest = {
···
};
metricProvider = {
services.rspamd.enable = true;
-
virtualisation.memorySize = 1024;
};
exporterTest = ''
wait_for_unit("rspamd.service")
-1
nixos/tests/prometheus.nix
···
# Minio requires at least 1GiB of free disk space to run.
virtualisation = {
diskSize = 2 * 1024;
-
memorySize = 1024;
};
networking.firewall.allowedTCPPorts = [ minioPort ];
-5
nixos/tests/rspamd.nix
···
machine = {
services.rspamd.enable = true;
networking.enableIPv6 = enableIPv6;
-
virtualisation.memorySize = 1024;
};
testScript = ''
start_all()
···
group = "rspamd";
}];
};
-
virtualisation.memorySize = 1024;
};
testScript = ''
···
'';
};
};
-
virtualisation.memorySize = 1024;
};
testScript = ''
···
rspamd_logger.infox(rspamd_config, 'Work dammit!!!')
'';
};
-
virtualisation.memorySize = 1024;
};
testScript = ''
${initMachine}
···
postfix.enable = true;
workers.rspamd_proxy.type = "rspamd_proxy";
};
-
virtualisation.memorySize = 1024;
};
testScript = ''
${initMachine}
-2
nixos/tests/seafile.nix
···
import ./make-test-python.nix ({ pkgs, ... }:
let
client = { config, pkgs, ... }: {
-
virtualisation.memorySize = 256;
environment.systemPackages = [ pkgs.seafile-shared pkgs.curl ];
};
in {
···
nodes = {
server = { config, pkgs, ... }: {
-
virtualisation.memorySize = 512;
services.seafile = {
enable = true;
ccnetSettings.General.SERVICE_URL = "http://server";
-1
nixos/tests/signal-desktop.nix
···
environment.systemPackages = with pkgs; [
signal-desktop file sqlite sqlcipher-signal
];
-
virtualisation.memorySize = 1024;
};
enableOCR = true;
-1
nixos/tests/spark/default.nix
···
nodes = {
worker = { nodes, pkgs, ... }: {
-
virtualisation.memorySize = 1024;
services.spark.worker = {
enable = true;
master = "master:7077";
-1
nixos/tests/sway.nix
···
# To test pinentry via gpg-agent:
programs.gnupg.agent.enable = true;
-
virtualisation.memorySize = 1024;
# Need to switch to a different GPU driver than the default one (-vga std) so that Sway can launch:
virtualisation.qemu.options = [ "-vga none -device virtio-gpu-pci" ];
};
-1
nixos/tests/sympa.nix
···
machine =
{ ... }:
{
-
virtualisation.memorySize = 1024;
services.sympa = {
enable = true;
-1
nixos/tests/systemd-cryptenroll.nix
···
environment.systemPackages = [ pkgs.cryptsetup ];
virtualisation = {
emptyDiskImages = [ 512 ];
-
memorySize = 1024;
qemu.options = [
"-chardev socket,id=chrtpm,path=/tmp/swtpm-sock"
"-tpmdev emulator,id=tpm0,chardev=chrtpm"
-1
nixos/tests/systemd.nix
···
imports = [ common/user-account.nix common/x11.nix ];
virtualisation.emptyDiskImages = [ 512 512 ];
-
virtualisation.memorySize = 1024;
environment.systemPackages = [ pkgs.cryptsetup ];
-1
nixos/tests/vault-postgresql.nix
···
maintainers = [ lnl7 roberth ];
};
machine = { lib, pkgs, ... }: {
-
virtualisation.memorySize = 512;
environment.systemPackages = [ pkgs.vault ];
environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
services.vault.enable = true;
-1
nixos/tests/vault.nix
···
environment.systemPackages = [ pkgs.vault ];
environment.variables.VAULT_ADDR = "http://127.0.0.1:8200";
services.vault.enable = true;
-
virtualisation.memorySize = 512;
};
testScript =
-1
nixos/tests/vaultwarden.nix
···
in
[ pkgs.firefox-unwrapped pkgs.geckodriver testRunner ];
-
virtualisation.memorySize = 768;
}
];
-1
nixos/tests/xfce.nix
···
hardware.pulseaudio.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then
-
virtualisation.memorySize = 1024;
};
testScript = { nodes, ... }: let
+1 -1
pkgs/applications/graphics/krita/generic.nix
···
openjpeg opencolorio_1 poppler curl ilmbase
qtmultimedia qtx11extras quazip
python3Packages.pyqt5
-
] ++ lib.optional (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) vc;
+
] ++ lib.optional stdenv.hostPlatform.isx86 vc;
NIX_CFLAGS_COMPILE = [ "-I${ilmbase.dev}/include/OpenEXR" ]
++ lib.optional stdenv.cc.isGNU "-Wno-deprecated-copy";
+7 -5
pkgs/applications/graphics/qvge/default.nix
···
{ lib
-
, mkDerivation
+
, stdenv
, fetchFromGitHub
, substituteAll
+
, wrapQtAppsHook
, qmake
+
, qtsvg
, qtx11extras
, graphviz
}:
-
mkDerivation rec {
+
stdenv.mkDerivation rec {
pname = "qvge";
version = "0.6.3";
···
inherit graphviz;
});
-
nativeBuildInputs = [ qmake ];
+
nativeBuildInputs = [ wrapQtAppsHook qmake ];
-
buildInputs = [ qtx11extras ];
+
buildInputs = if stdenv.isDarwin then [ qtsvg ] else [ qtx11extras ];
meta = with lib; {
description = "Qt Visual Graph Editor";
homepage = "https://github.com/ArsMasiuk/qvge";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
-
platforms = with platforms; linux;
+
platforms = platforms.unix;
};
}
+59 -24
pkgs/applications/networking/browsers/firefox/common.nix
···
, ltoSupport ? (stdenv.isLinux && stdenv.is64bit), overrideCC, buildPackages
, gssSupport ? true, libkrb5
, pipewireSupport ? waylandSupport && webrtcSupport, pipewire
-
, jemallocSupport ? true, jemalloc
+
# Workaround: disabled since currently jemalloc causes crashes with LLVM 13.
+
# https://bugzilla.mozilla.org/show_bug.cgi?id=1741454
+
, jemallocSupport ? false, jemalloc
## privacy-related options
···
# > the experience of Firefox users, you won't have any issues using the
# > official branding.
, enableOfficialBranding ? true
+
+
# On 32bit platforms, we disable adding "-g" for easier linking.
+
, enableDebugSymbols ? !stdenv.is32bit
}:
assert stdenv.cc.libc or null != null;
···
})
else stdenv;
-
# --enable-release adds -ffunction-sections & LTO that require a big amount of
-
# RAM and the 32-bit memory space cannot handle that linking
-
# We also disable adding "-g" for easier linking
-
releaseFlags = if stdenv.is32bit
-
then [ "--disable-release" "--disable-debug-symbols" ]
-
else [ "--enable-release" ];
in
buildStdenv.mkDerivation ({
···
AVFoundation MediaToolbox CoreLocation
Foundation libobjc AddressBook cups ];
-
NIX_LDFLAGS = lib.optionalString ltoSupport ''
-
-rpath ${llvmPackages.libunwind.out}/lib
-
'';
-
MACH_USE_SYSTEM_PYTHON = "1";
postPatch = ''
···
++ lib.optionals buildStdenv.isDarwin [ xcbuild rsync ]
++ extraNativeBuildInputs;
+
separateDebugInfo = enableDebugSymbols;
+
setOutputFlags = false; # `./mach configure` doesn't understand `--*dir=` flags.
+
preConfigure = ''
# remove distributed configuration files
rm -f configure
···
${lib.optionalString buildStdenv.cc.isClang "-idirafter ${buildStdenv.cc.cc.lib}/lib/clang/${lib.getVersion buildStdenv.cc.cc}/include"} \
${lib.optionalString buildStdenv.cc.isGNU "-isystem ${lib.getDev buildStdenv.cc.cc}/include/c++/${lib.getVersion buildStdenv.cc.cc} -isystem ${buildStdenv.cc.cc}/include/c++/${lib.getVersion buildStdenv.cc.cc}/${buildStdenv.hostPlatform.config}"} \
$NIX_CFLAGS_COMPILE"
-
+
${
+
# Bindgen doesn't like the flag added by `separateDebugInfo`.
+
lib.optionalString enableDebugSymbols ''
+
BINDGEN_CFLAGS="''${BINDGEN_CFLAGS/ -Wa,--compress-debug-sections/}"
+
''}
echo "ac_add_options BINDGEN_CFLAGS='$BINDGEN_CFLAGS'" >> $MOZCONFIG
'' + (lib.optionalString googleAPISupport ''
# Google API key used by Chromium and Firefox.
···
# https://bugzilla.mozilla.org/show_bug.cgi?id=1538724
# elf-hack is broken when using clang+lld:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1482204
-
++ lib.optional ltoSupport "--enable-lto"
+
++ lib.optional ltoSupport "--enable-lto=cross" # Cross-language LTO.
++ lib.optional (ltoSupport && (buildStdenv.isAarch32 || buildStdenv.isi686 || buildStdenv.isx86_64)) "--disable-elf-hack"
++ lib.optional (ltoSupport && !buildStdenv.isDarwin) "--enable-linker=lld"
···
++ lib.optional drmSupport "--enable-eme=widevine"
++ (if debugBuild then [ "--enable-debug" "--enable-profiling" ]
-
else ([ "--disable-debug"
-
"--enable-optimize"
-
"--enable-strip" ] ++ releaseFlags))
+
else [ "--disable-debug" "--enable-optimize" ])
+
# --enable-release adds -ffunction-sections & LTO that require a big amount of
+
# RAM and the 32-bit memory space cannot handle that linking
+
++ flag (!debugBuild && !stdenv.is32bit) "release"
+
++ flag enableDebugSymbols "debug-symbols"
+
++ lib.optionals enableDebugSymbols [ "--disable-strip" "--disable-install-strip" ]
+
++ lib.optional enableOfficialBranding "--enable-official-branding"
++ extraConfigureFlags;
···
cd obj-*
'';
-
makeFlags = lib.optionals ltoSupport [
-
"AR=${buildStdenv.cc.bintools.bintools}/bin/llvm-ar"
-
"LLVM_OBJDUMP=${buildStdenv.cc.bintools.bintools}/bin/llvm-objdump"
-
"NM=${buildStdenv.cc.bintools.bintools}/bin/llvm-nm"
-
"RANLIB=${buildStdenv.cc.bintools.bintools}/bin/llvm-ranlib"
-
"STRIP=${buildStdenv.cc.bintools.bintools}/bin/llvm-strip"
-
]
-
++ extraMakeFlags;
+
makeFlags = extraMakeFlags;
enableParallelBuilding = true;
doCheck = false; # "--disable-tests" above
···
# Needed to find Mozilla runtime
gappsWrapperArgs+=(--argv0 "$out/bin/.${binaryName}-wrapped")
+
'';
+
+
# Workaround: The separateDebugInfo hook skips artifacts whose build ID's length is not 40.
+
# But we got 16-length build ID here. The function body is mainly copied from pkgs/build-support/setup-hooks/separate-debug-info.sh
+
# Remove it when PR #146275 is merged.
+
preFixup = lib.optionalString enableDebugSymbols ''
+
_separateDebugInfo() {
+
[ -e "$prefix" ] || return 0
+
+
local dst="''${debug:-$out}"
+
if [ "$prefix" = "$dst" ]; then return 0; fi
+
+
dst="$dst/lib/debug/.build-id"
+
+
# Find executables and dynamic libraries.
+
local i
+
while IFS= read -r -d $'\0' i; do
+
if ! isELF "$i"; then continue; fi
+
+
# Extract the Build ID. FIXME: there's probably a cleaner way.
+
local id="$($READELF -n "$i" | sed 's/.*Build ID: \([0-9a-f]*\).*/\1/; t; d')"
+
if [[ -z "$id" ]]; then
+
echo "could not find build ID of $i, skipping" >&2
+
continue
+
fi
+
+
# Extract the debug info.
+
header "separating debug info from $i (build ID $id)"
+
mkdir -p "$dst/''${id:0:2}"
+
$OBJCOPY --only-keep-debug "$i" "$dst/''${id:0:2}/''${id:2}.debug"
+
$STRIP --strip-debug "$i"
+
+
# Also a create a symlink <original-name>.debug.
+
ln -sfn ".build-id/''${id:0:2}/''${id:2}.debug" "$dst/../$(basename "$i")"
+
done < <(find "$prefix" -type f -print0)
+
}
'';
doInstallCheck = true;
+2 -1
pkgs/applications/science/biology/hmmer/default.nix
···
homepage = "http://hmmer.org/";
license = licenses.gpl3;
maintainers = [ maintainers.iimog ];
-
platforms = platforms.unix;
+
# at least SSE is *required*
+
platforms = platforms.x86_64;
};
}
+1 -1
pkgs/applications/science/logic/monosat/default.nix
···
# source behind __linux__ check assumes system is also x86 and
# tries to disable x86/x87-specific extended precision mode
# https://github.com/sambayless/monosat/issues/33
-
commonPostPatch = lib.optionalString (!(stdenv.isi686 || stdenv.isx86_64)) ''
+
commonPostPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
substituteInPlace src/monosat/Main.cc \
--replace 'defined(__linux__)' '0'
'';
+1 -1
pkgs/applications/video/mplayer/default.nix
···
(useUnfreeCodecs && codecs != null && !crossBuild)
"--codecsdir=${codecs}"
++ optional
-
((stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) && !crossBuild)
+
(stdenv.hostPlatform.isx86 && !crossBuild)
"--enable-runtime-cpudetection"
++ optional fribidiSupport "--enable-fribidi"
++ optional stdenv.isLinux "--enable-vidix"
+4
pkgs/build-support/fetchurl/mirrors.nix
···
cpan = [
"https://cpan.metacpan.org/"
"https://cpan.perl.org/"
+
"https://mirrors.kernel.org/CPAN/"
"https://backpan.perl.org/" # for old releases
];
···
debian = [
"https://httpredir.debian.org/debian/"
"https://ftp.debian.org/debian/"
+
"https://mirrors.edge.kernel.org/debian/"
"ftp://ftp.de.debian.org/debian/"
"ftp://ftp.fr.debian.org/debian/"
"ftp://ftp.nl.debian.org/debian/"
···
ubuntu = [
"https://nl.archive.ubuntu.com/ubuntu/"
"https://old-releases.ubuntu.com/ubuntu/"
+
"https://mirrors.edge.kernel.org/ubuntu/"
"http://de.archive.ubuntu.com/ubuntu/"
"http://archive.ubuntu.com/ubuntu/"
];
···
"https://ftp.funet.fi/pub/linux/mirrors/opensuse/distribution/"
"https://ftp.opensuse.org/pub/opensuse/distribution/"
"https://ftp5.gwdg.de/pub/opensuse/discontinued/distribution/"
+
"https://mirrors.edge.kernel.org/opensuse/distribution/"
"http://ftp.hosteurope.de/mirror/ftp.opensuse.org/discontinued/"
];
+1 -1
pkgs/build-support/trivial-builders.nix
···
{ package,
command ? "${package.meta.mainProgram or package.pname or package.name} --version",
version ? package.version,
-
}: runCommand "test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } ''
+
}: runCommand "${package.name}-test-version" { nativeBuildInputs = [ package ]; meta.timeout = 60; } ''
${command} |& grep -Fw ${version}
touch $out
'';
+1 -1
pkgs/build-support/vm/default.nix
···
, storeDir ? builtins.storeDir
, rootModules ?
[ "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "crc32c_generic" ]
-
++ pkgs.lib.optional (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) "rtc_cmos"
+
++ pkgs.lib.optional pkgs.stdenv.hostPlatform.isx86 "rtc_cmos"
}:
let
+1 -1
pkgs/desktops/gnome/core/gnome-software/default.nix
···
}:
let
-
withFwupd = stdenv.isx86_64 || stdenv.isi686;
+
withFwupd = stdenv.hostPlatform.isx86;
in
stdenv.mkDerivation rec {
+1 -1
pkgs/development/compilers/ocaml/ber-metaocaml.nix
···
}:
let
-
useX11 = stdenv.isi686 || stdenv.isx86_64;
+
useX11 = stdenv.hostPlatform.isx86;
x11deps = [ libX11 xorgproto ];
inherit (lib) optionals;
+2 -2
pkgs/development/compilers/sbcl/common.nix
···
{ lib, stdenv, fetchurl, fetchpatch, writeText, sbclBootstrap
, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
-
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system)
-
, linkableRuntime ? (stdenv.isi686 || stdenv.isx86_64)
+
, threadSupport ? (stdenv.hostPlatform.isx86 || "aarch64-linux" == stdenv.hostPlatform.system || "aarch64-darwin" == stdenv.hostPlatform.system)
+
, linkableRuntime ? stdenv.hostPlatform.isx86
, disableImmobileSpace ? false
# Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
# Note that the created binaries still need `patchelf --set-interpreter ...`
+2 -2
pkgs/development/interpreters/clisp/default.nix
···
, libffcall
, coreutils
# build options
-
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64)
-
, x11Support ? (stdenv.isi686 || stdenv.isx86_64)
+
, threadSupport ? stdenv.hostPlatform.isx86
+
, x11Support ? stdenv.hostPlatform.isx86
, dllSupport ? true
, withModules ? [
"pcre"
+2 -2
pkgs/development/interpreters/clisp/hg.nix
···
, libffi, libffcall, automake
, coreutils
# build options
-
, threadSupport ? (stdenv.isi686 || stdenv.isx86_64)
-
, x11Support ? (stdenv.isi686 || stdenv.isx86_64)
+
, threadSupport ? stdenv.hostPlatform.isx86
+
, x11Support ? stdenv.hostPlatform.isx86
, dllSupport ? true
, withModules ? [
"pcre"
+1 -1
pkgs/development/libraries/SDL2_gfx/default.nix
···
buildInputs = [ SDL2 ]
++ lib.optional stdenv.isDarwin darwin.libobjc;
-
configureFlags = [(if stdenv.isi686 || stdenv.isx86_64 then "--enable-mmx" else "--disable-mmx")]
+
configureFlags = [(if stdenv.hostPlatform.isx86 then "--enable-mmx" else "--disable-mmx")]
++ lib.optional stdenv.isDarwin "--disable-sdltest";
meta = with lib; {
+1 -1
pkgs/development/libraries/glibc/common.nix
···
"--enable-bind-now"
(lib.withFeatureAs withLinuxHeaders "headers" "${linuxHeaders}/include")
(lib.enableFeature profilingLibraries "profile")
-
] ++ lib.optionals (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isAarch64) [
+
] ++ lib.optionals (stdenv.hostPlatform.isx86 || stdenv.hostPlatform.isAarch64) [
# This feature is currently supported on
# i386, x86_64 and x32 with binutils 2.29 or later,
# and on aarch64 with binutils 2.30 or later.
+14 -5
pkgs/development/libraries/libgphoto2/default.nix
···
-
{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gettext
+
{ lib, stdenv, fetchFromGitHub, buildPackages
+
, autoreconfHook, pkg-config, gettext
, libusb1
, libtool
, libexif
+
, libgphoto2
, libjpeg
}:
···
sha256 = "sha256-c7fBl6GBLAU+RL5WFC4PL+n/nEHZUfqIJ9qq1+qNNCg=";
};
-
patches = [];
+
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [
autoreconfHook
-
pkg-config
gettext
libtool
];
buildInputs = [
libjpeg
+
libtool # for libltdl
libusb1
];
···
hardeningDisable = [ "format" ];
-
postInstall = ''
+
postInstall = let
+
executablePrefix = if stdenv.buildPlatform == stdenv.hostPlatform then
+
"$out"
+
else
+
buildPackages.libgphoto2;
+
in ''
mkdir -p $out/lib/udev/rules.d
-
$out/lib/libgphoto2/print-camera-list udev-rules version 175 group camera >$out/lib/udev/rules.d/40-gphoto2.rules
+
${executablePrefix}/lib/libgphoto2/print-camera-list \
+
udev-rules version 175 group camera \
+
>$out/lib/udev/rules.d/40-gphoto2.rules
'';
meta = {
+1 -1
pkgs/development/libraries/libimagequant/default.nix
···
patchShebangs ./configure
'';
-
configureFlags = lib.optionals (!stdenv.isi686 && !stdenv.isx86_64) [ "--disable-sse" ];
+
configureFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "--disable-sse" ];
meta = with lib; {
homepage = "https://pngquant.org/lib/";
+2 -2
pkgs/development/libraries/libite/default.nix
···
buildInputs = [ libconfuse ];
meta = with lib; {
-
inherit (src.meta) homepage;
description = "Lightweight library of frog DNA";
longDescription = ''
Libite is a lightweight library of frog DNA. It can be used to fill
···
_SAFE macros in the BSD sys/queue.h API — highly recommended when
traversing lists to delete/free nodes.
'';
-
platforms = platforms.unix;
+
homepage = "https://github.com/troglobit/libite";
+
platforms = with platforms; linux ++ netbsd;
maintainers = with maintainers; [ fpletz ];
license = with licenses; [ mit isc bsd2 bsd3 ];
};
+1 -1
pkgs/development/libraries/libtsm/default.nix
···
homepage = "http://www.freedesktop.org/wiki/Software/kmscon/libtsm/";
license = licenses.mit;
maintainers = with maintainers; [ cstrahan ];
-
platforms = with platforms; unix;
+
platforms = platforms.linux;
};
}
+1 -1
pkgs/development/libraries/opencolorio/1.x.nix
···
# External libyamlcpp 0.6.* not compatible: https://github.com/imageworks/OpenColorIO/issues/517
"-DUSE_EXTERNAL_YAML=OFF"
] ++ lib.optional stdenv.isDarwin "-DOCIO_USE_BOOST_PTR=ON"
-
++ lib.optional (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isx86_64) "-DOCIO_USE_SSE=OFF";
+
++ lib.optional (!stdenv.hostPlatform.isx86) "-DOCIO_USE_SSE=OFF";
postInstall = ''
mkdir -p $bin/bin; mv $out/bin $bin/
+1 -1
pkgs/development/libraries/pcl/default.nix
···
# remove attempt to prevent (x86/x87-specific) extended precision use
# when SSE not detected
-
postPatch = lib.optionalString (!(stdenv.isi686 || stdenv.isx86_64)) ''
+
postPatch = lib.optionalString (!stdenv.hostPlatform.isx86) ''
sed -i '/-ffloat-store/d' cmake/pcl_find_sse.cmake
'';
+1 -1
pkgs/development/libraries/x264/default.nix
···
++ lib.optional (!stdenv.isi686) "--enable-pic"
++ lib.optional (stdenv.buildPlatform != stdenv.hostPlatform) "--cross-prefix=${stdenv.cc.targetPrefix}";
-
nativeBuildInputs = lib.optional (stdenv.hostPlatform.isx86_64 || stdenv.hostPlatform.isi686) nasm;
+
nativeBuildInputs = lib.optional stdenv.hostPlatform.isx86 nasm;
meta = with lib; {
description = "Library for encoding H264/AVC video streams";
+2 -2
pkgs/development/python-modules/casbin/default.nix
···
buildPythonPackage rec {
pname = "casbin";
-
version = "1.9.7";
+
version = "1.11.1";
format = "setuptools";
disabled = pythonOlder "3.6";
···
owner = pname;
repo = "pycasbin";
rev = "v${version}";
-
sha256 = "sha256-wNygKs37PtMLij3f+pAh6PNLqQ45cvrpF43Aj+cO8p8=";
+
sha256 = "sha256-gFGYpHd1kp4JMtoe47VbJ0uDnuGQegggbjXaw6nEMR4=";
};
propagatedBuildInputs = [
+9 -3
pkgs/development/python-modules/env-canada/default.nix
···
, pillow
, pytestCheckHook
, python-dateutil
+
, pythonOlder
, voluptuous
}:
buildPythonPackage rec {
pname = "env-canada";
-
version = "0.5.16";
+
version = "0.5.17";
+
format = "setuptools";
+
+
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "michaeldavie";
repo = "env_canada";
rev = "v${version}";
-
sha256 = "sha256-5Cxpl5iwbBtpwQ9//yhEZNCIzBZgTm/fqAo9PNNxoG4=";
+
sha256 = "sha256-viuBuyGzAUcfb4qSecZsDvoAU++FNhuwNJET/s0qyOI=";
};
propagatedBuildInputs = [
···
"test_ecradar"
];
-
pythonImportsCheck = [ "env_canada" ];
+
pythonImportsCheck = [
+
"env_canada"
+
];
meta = with lib; {
description = "Python library to get Environment Canada weather data";
+4 -3
pkgs/development/python-modules/flux-led/default.nix
···
}:
buildPythonPackage rec {
-
pname = "flux_led";
-
version = "0.24.24";
+
pname = "flux-led";
+
version = "0.24.25";
+
format = "setuptools";
disabled = pythonOlder "3.7";
···
owner = "Danielhiversen";
repo = "flux_led";
rev = version;
-
sha256 = "sha256-99EHmhyc6lAjYPHFvvqnd5r8HeEEJM6W3VK0/yLsz7I=";
+
sha256 = "sha256-HhoqsdaqNKdKH63glYEl5mRBFImu6Nxw5gwF7JAJABk=";
};
propagatedBuildInputs = [
+4
pkgs/development/python-modules/keyutils/default.nix
···
sha256 = "0pfqfr5xqgsqkxzrmj8xl2glyl4nbq0irs0k6ik7iy3gd3mxf5g1";
};
+
postPatch = ''
+
substituteInPlace setup.py --replace '"pytest-runner"' ""
+
'';
+
buildInputs = [ keyutils ];
checkInputs = [ pytest pytest-runner ];
+11 -2
pkgs/development/python-modules/oath/default.nix
···
{ lib
, buildPythonPackage
, fetchPypi
+
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "oath";
-
version = "1.4.3";
+
version = "1.4.4";
+
format = "setuptools";
src = fetchPypi {
inherit pname version;
-
sha256 = "1xqgcqgx6aa0j21hwsdb3aqpqhviwj756bcqjjjcm1h1aij11p6m";
+
sha256 = "sha256-vWsg0g8sTj9TUj7pACEdynWu7KcvT1qf2NyswXX+HAs=";
};
+
checkInputs = [
+
pytestCheckHook
+
];
+
+
pythonImportsCheck = [
+
"oath"
+
];
meta = with lib; {
description = "Python implementation of the three main OATH specifications: HOTP, TOTP and OCRA";
+8 -4
pkgs/development/python-modules/pyads/default.nix
···
buildPythonPackage rec {
pname = "pyads";
-
version = "3.3.8";
-
disabled = pythonOlder "3.6";
+
version = "3.3.9";
+
format = "setuptools";
+
+
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "stlehmann";
repo = pname;
rev = version;
-
sha256 = "sha256-jhEVBndUOKM8rBX0LEqPTMLqbpizCiD7T+OCzbVgLM8=";
+
sha256 = "sha256-eNouFJQDgp56fgkA7wZKfosKWOKU6OvXRjFwjCMvZqI=";
};
buildInputs = [
···
pytestCheckHook
];
-
pythonImportsCheck = [ "pyads" ];
+
pythonImportsCheck = [
+
"pyads"
+
];
meta = with lib; {
description = "Python wrapper for TwinCAT ADS library";
+5
pkgs/development/python-modules/pyahocorasick/default.nix
···
sha256 = "13x3718if28l50474xrz1b9709kvnvdg3nzm6y8bh7mc9a4zyss5";
};
+
postPatch = ''
+
substituteInPlace unittests.py \
+
--replace '(tmp, "test.dat")' "(\"$TMPDIR\", \"test.dat\")"
+
'';
+
checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "unittests.py" ];
+1 -1
pkgs/development/python-modules/pyqtgraph/default.nix
···
export FONTCONFIG_FILE=${fontsConf}
'';
-
disabledTests = lib.optionals (!(stdenv.isi686 || stdenv.isx86_64)) [
+
disabledTests = lib.optionals (!stdenv.hostPlatform.isx86) [
# small precision-related differences on other architectures,
# upstream doesn't consider it serious.
# https://github.com/pyqtgraph/pyqtgraph/issues/2110
+2 -2
pkgs/development/python-modules/qcs-api-client/default.nix
···
buildPythonPackage rec {
pname = "qcs-api-client";
-
version = "0.19.0";
+
version = "0.20.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
-
sha256 = "sha256-OfhOYvGcBzbirsD05D206b+mAOVvDVAwBvDgCKfXxSw=";
+
sha256 = "sha256-l6n/DUEWIBmnPvt5+TAZ2RnFrYEUwh4nIZa6aQG2lJ0=";
};
propagatedBuildInputs = [
+1 -1
pkgs/os-specific/linux/fbterm/default.nix
···
sha256 = "0pciv5by989vzvjxsv1jsv4bdp4m8j0nfbl29jm5fwi12w4603vj";
};
buildInputs = [ gpm freetype fontconfig ncurses ]
-
++ lib.optional (stdenv.isi686 || stdenv.isx86_64) libx86;
+
++ lib.optional stdenv.hostPlatform.isx86 libx86;
in
stdenv.mkDerivation {
inherit (s) pname version;
+1 -1
pkgs/os-specific/linux/firmware/fwupd/default.nix
···
setuptools
]);
-
isx86 = stdenv.isx86_64 || stdenv.isi686;
+
isx86 = stdenv.hostPlatform.isx86;
# Dell isn't supported on Aarch64
haveDell = isx86;
+2 -2
pkgs/os-specific/linux/read-edid/default.nix
···
};
nativeBuildInputs = [ cmake ];
-
buildInputs = lib.optional (stdenv.isi686 || stdenv.isx86_64) libx86;
+
buildInputs = lib.optional stdenv.hostPlatform.isx86 libx86;
-
cmakeFlags = [ "-DCLASSICBUILD=${if stdenv.isi686 || stdenv.isx86_64 then "ON" else "OFF"}" ];
+
cmakeFlags = [ "-DCLASSICBUILD=${if stdenv.hostPlatform.isx86 then "ON" else "OFF"}" ];
patchPhase = ''
substituteInPlace CMakeLists.txt --replace 'COPYING' 'LICENSE'
+1 -1
pkgs/os-specific/linux/rtl8812au/default.nix
···
makeFlags = [
"ARCH=${stdenv.hostPlatform.linuxArch}"
"KSRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
-
("CONFIG_PLATFORM_I386_PC=" + (if (stdenv.hostPlatform.isi686 || stdenv.hostPlatform.isx86_64) then "y" else "n"))
+
("CONFIG_PLATFORM_I386_PC=" + (if stdenv.hostPlatform.isx86 then "y" else "n"))
("CONFIG_PLATFORM_ARM_RPI=" + (if (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) then "y" else "n"))
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
+2 -2
pkgs/servers/icingaweb2/default.nix
···
stdenvNoCC.mkDerivation rec {
pname = "icingaweb2";
-
version = "2.9.3";
+
version = "2.9.4";
src = fetchFromGitHub {
owner = "Icinga";
repo = "icingaweb2";
rev = "v${version}";
-
sha256 = "sha256-nPzf/SGyjEXuy0Q/Lofe1rSbW+4E6LXKzyi4np3jvF4=";
+
sha256 = "sha256:1fd5d2vhiq3s7qr4hnvnh9vv4ns7dvqwq8s67av89hjf3sqgw13j";
};
nativeBuildInputs = [ makeWrapper ];
+2 -2
pkgs/servers/icingaweb2/ipl.nix
···
stdenvNoCC.mkDerivation rec {
pname = "icingaweb2-ipl";
-
version = "0.6.1";
+
version = "0.7.0";
src = fetchFromGitHub {
owner = "Icinga";
repo = "icinga-php-library";
rev = "v${version}";
-
sha256 = "sha256-5xlvwB1o6d3mWd0TSybQW9s88q6A7KrledY1L8xaxLU=";
+
sha256 = "sha256:118bg9mxjxajm2ydbycgqdmdx8przwxblsaxc373r0g1dp1lv0fz";
};
installPhase = ''
+384
pkgs/tools/compression/bsdiff/CVE-2020-14315.patch
···
+
Description: patch for CVE-2020-14315
+
A memory corruption vulnerability is present in bspatch as shipped in
+
Colin Percival’s bsdiff tools version 4.3. Insufficient checks when
+
handling external inputs allows an attacker to bypass the sanity checks
+
in place and write out of a dynamically allocated buffer boundaries.
+
Source: https://svnweb.freebsd.org/base/head/usr.bin/bsdiff/bspatch/bspatch.c?revision=352742&view=co
+
Author: tony mancill <tmancill@debian.org>
+
Comment: The patch was created by comparing the Debian sources to the
+
"Confirmed Patched Version" [1] documented in the
+
X41 D-SEC GmbH Security Advisory: X41-2020-006 [2].
+
References to FreeBSD capsicum have been dropped. Definitions for
+
TYPE_MINIMUM and TYPE_MAXIMUM have been borrowed from the Debian
+
coreutils package sources but originate in gnulib [3] and are used to
+
define OFF_MIN and OFF_MAX (limits of off_t). Whitespace changes from
+
the confirmed patched version are also included and keep the difference
+
between the Debian sources and the confirmed patched version minimal.
+
.
+
[1] https://svnweb.freebsd.org/base/head/usr.bin/bsdiff/bspatch/bspatch.c?revision=352742&view=co
+
[2] https://www.openwall.com/lists/oss-security/2020/07/09/2
+
[3] https://www.gnu.org/software/gnulib/
+
Last-Update: 2021-04-03
+
Forwarded: not-needed
+
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964796
+
+
--- a/bspatch.c
+
+++ b/bspatch.c
+
@@ -1,4 +1,6 @@
+
/*-
+
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+
+ *
+
* Copyright 2003-2005 Colin Percival
+
* All rights reserved
+
*
+
@@ -24,56 +26,148 @@
+
* POSSIBILITY OF SUCH DAMAGE.
+
*/
+
+
+#include <sys/cdefs.h>
+
#if 0
+
-__FBSDID("$FreeBSD: src/usr.bin/bsdiff/bspatch/bspatch.c,v 1.1 2005/08/06 01:59:06 cperciva Exp $");
+
+__FBSDID("$FreeBSD$");
+
#endif
+
+
#include <bzlib.h>
+
-#include <stdlib.h>
+
+#include <err.h>
+
+#include <fcntl.h>
+
+#include <libgen.h>
+
+#include <limits.h>
+
+#include <stdint.h>
+
#include <stdio.h>
+
+#include <stdlib.h>
+
#include <string.h>
+
-#include <err.h>
+
#include <unistd.h>
+
-#include <fcntl.h>
+
+
+
+#ifndef O_BINARY
+
+#define O_BINARY 0
+
+#endif
+
+#define HEADER_SIZE 32
+
+
+
+/* TYPE_MINIMUM and TYPE_MAXIMUM taken from coreutils */
+
+#ifndef TYPE_MINIMUM
+
+#define TYPE_MINIMUM(t) \
+
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
+
+#endif
+
+#ifndef TYPE_MAXIMUM
+
+#define TYPE_MAXIMUM(t) \
+
+ ((t) ((t) 0 < (t) -1 \
+
+ ? (t) -1 \
+
+ : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+#endif
+
+
+
+#ifndef OFF_MAX
+
+#define OFF_MAX TYPE_MAXIMUM(off_t)
+
+#endif
+
+
+
+#ifndef OFF_MIN
+
+#define OFF_MIN TYPE_MINIMUM(off_t)
+
+#endif
+
+
+
+static char *newfile;
+
+static int dirfd = -1;
+
+
+
+static void
+
+exit_cleanup(void)
+
+{
+
+
+
+ if (dirfd != -1 && newfile != NULL)
+
+ if (unlinkat(dirfd, newfile, 0))
+
+ warn("unlinkat");
+
+}
+
+
+
+static inline off_t
+
+add_off_t(off_t a, off_t b)
+
+{
+
+ off_t result;
+
+
+
+#if __GNUC__ >= 5
+
+ if (__builtin_add_overflow(a, b, &result))
+
+ errx(1, "Corrupt patch");
+
+#else
+
+ if ((b > 0 && a > OFF_MAX - b) || (b < 0 && a < OFF_MIN - b))
+
+ errx(1, "Corrupt patch");
+
+ result = a + b;
+
+#endif
+
+ return result;
+
+}
+
+
static off_t offtin(u_char *buf)
+
{
+
off_t y;
+
+
- y=buf[7]&0x7F;
+
- y=y*256;y+=buf[6];
+
- y=y*256;y+=buf[5];
+
- y=y*256;y+=buf[4];
+
- y=y*256;y+=buf[3];
+
- y=y*256;y+=buf[2];
+
- y=y*256;y+=buf[1];
+
- y=y*256;y+=buf[0];
+
+ y = buf[7] & 0x7F;
+
+ y = y * 256; y += buf[6];
+
+ y = y * 256; y += buf[5];
+
+ y = y * 256; y += buf[4];
+
+ y = y * 256; y += buf[3];
+
+ y = y * 256; y += buf[2];
+
+ y = y * 256; y += buf[1];
+
+ y = y * 256; y += buf[0];
+
+
- if(buf[7]&0x80) y=-y;
+
+ if (buf[7] & 0x80)
+
+ y = -y;
+
+
- return y;
+
+ return (y);
+
}
+
+
-int main(int argc,char * argv[])
+
+static void
+
+usage(void)
+
{
+
- FILE * f, * cpf, * dpf, * epf;
+
- BZFILE * cpfbz2, * dpfbz2, * epfbz2;
+
+
+
+ fprintf(stderr, "usage: bspatch oldfile newfile patchfile\n");
+
+ exit(1);
+
+}
+
+
+
+int main(int argc, char *argv[])
+
+{
+
+ FILE *f, *cpf, *dpf, *epf;
+
+ BZFILE *cpfbz2, *dpfbz2, *epfbz2;
+
+ char *directory, *namebuf;
+
int cbz2err, dbz2err, ebz2err;
+
- int fd;
+
- ssize_t oldsize,newsize;
+
- ssize_t bzctrllen,bzdatalen;
+
- u_char header[32],buf[8];
+
+ int newfd, oldfd;
+
+ off_t oldsize, newsize;
+
+ off_t bzctrllen, bzdatalen;
+
+ u_char header[HEADER_SIZE], buf[8];
+
u_char *old, *new;
+
- off_t oldpos,newpos;
+
+ off_t oldpos, newpos;
+
off_t ctrl[3];
+
- off_t lenread;
+
- off_t i;
+
+ off_t i, lenread, offset;
+
+
- if(argc!=4) errx(1,"usage: %s oldfile newfile patchfile\n",argv[0]);
+
+ if (argc != 4)
+
+ usage();
+
+
/* Open patch file */
+
- if ((f = fopen(argv[3], "r")) == NULL)
+
+ if ((f = fopen(argv[3], "rb")) == NULL)
+
+ err(1, "fopen(%s)", argv[3]);
+
+ /* Open patch file for control block */
+
+ if ((cpf = fopen(argv[3], "rb")) == NULL)
+
+ err(1, "fopen(%s)", argv[3]);
+
+ /* open patch file for diff block */
+
+ if ((dpf = fopen(argv[3], "rb")) == NULL)
+
err(1, "fopen(%s)", argv[3]);
+
+ /* open patch file for extra block */
+
+ if ((epf = fopen(argv[3], "rb")) == NULL)
+
+ err(1, "fopen(%s)", argv[3]);
+
+ /* open oldfile */
+
+ if ((oldfd = open(argv[1], O_RDONLY | O_BINARY, 0)) < 0)
+
+ err(1, "open(%s)", argv[1]);
+
+ /* open directory where we'll write newfile */
+
+ if ((namebuf = strdup(argv[2])) == NULL ||
+
+ (directory = dirname(namebuf)) == NULL ||
+
+ (dirfd = open(directory, O_DIRECTORY)) < 0)
+
+ err(1, "open %s", argv[2]);
+
+ free(namebuf);
+
+ if ((newfile = basename(argv[2])) == NULL)
+
+ err(1, "basename");
+
+ /* open newfile */
+
+ if ((newfd = openat(dirfd, newfile,
+
+ O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0666)) < 0)
+
+ err(1, "open(%s)", argv[2]);
+
+ atexit(exit_cleanup);
+
+
/*
+
File format:
+
@@ -90,104 +185,104 @@
+
*/
+
+
/* Read header */
+
- if (fread(header, 1, 32, f) < 32) {
+
+ if (fread(header, 1, HEADER_SIZE, f) < HEADER_SIZE) {
+
if (feof(f))
+
- errx(1, "Corrupt patch\n");
+
+ errx(1, "Corrupt patch");
+
err(1, "fread(%s)", argv[3]);
+
}
+
+
/* Check for appropriate magic */
+
if (memcmp(header, "BSDIFF40", 8) != 0)
+
- errx(1, "Corrupt patch\n");
+
+ errx(1, "Corrupt patch");
+
+
/* Read lengths from header */
+
- bzctrllen=offtin(header+8);
+
- bzdatalen=offtin(header+16);
+
- newsize=offtin(header+24);
+
- if((bzctrllen<0) || (bzdatalen<0) || (newsize<0))
+
- errx(1,"Corrupt patch\n");
+
+ bzctrllen = offtin(header + 8);
+
+ bzdatalen = offtin(header + 16);
+
+ newsize = offtin(header + 24);
+
+ if (bzctrllen < 0 || bzctrllen > OFF_MAX - HEADER_SIZE ||
+
+ bzdatalen < 0 || bzctrllen + HEADER_SIZE > OFF_MAX - bzdatalen ||
+
+ newsize < 0 || newsize > SSIZE_MAX)
+
+ errx(1, "Corrupt patch");
+
+
/* Close patch file and re-open it via libbzip2 at the right places */
+
if (fclose(f))
+
err(1, "fclose(%s)", argv[3]);
+
- if ((cpf = fopen(argv[3], "r")) == NULL)
+
- err(1, "fopen(%s)", argv[3]);
+
- if (fseeko(cpf, 32, SEEK_SET))
+
- err(1, "fseeko(%s, %lld)", argv[3],
+
- (long long)32);
+
+ offset = HEADER_SIZE;
+
+ if (fseeko(cpf, offset, SEEK_SET))
+
+ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
+
if ((cpfbz2 = BZ2_bzReadOpen(&cbz2err, cpf, 0, 0, NULL, 0)) == NULL)
+
errx(1, "BZ2_bzReadOpen, bz2err = %d", cbz2err);
+
- if ((dpf = fopen(argv[3], "r")) == NULL)
+
- err(1, "fopen(%s)", argv[3]);
+
- if (fseeko(dpf, 32 + bzctrllen, SEEK_SET))
+
- err(1, "fseeko(%s, %lld)", argv[3],
+
- (long long)(32 + bzctrllen));
+
+ offset = add_off_t(offset, bzctrllen);
+
+ if (fseeko(dpf, offset, SEEK_SET))
+
+ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
+
if ((dpfbz2 = BZ2_bzReadOpen(&dbz2err, dpf, 0, 0, NULL, 0)) == NULL)
+
errx(1, "BZ2_bzReadOpen, bz2err = %d", dbz2err);
+
- if ((epf = fopen(argv[3], "r")) == NULL)
+
- err(1, "fopen(%s)", argv[3]);
+
- if (fseeko(epf, 32 + bzctrllen + bzdatalen, SEEK_SET))
+
- err(1, "fseeko(%s, %lld)", argv[3],
+
- (long long)(32 + bzctrllen + bzdatalen));
+
+ offset = add_off_t(offset, bzdatalen);
+
+ if (fseeko(epf, offset, SEEK_SET))
+
+ err(1, "fseeko(%s, %jd)", argv[3], (intmax_t)offset);
+
if ((epfbz2 = BZ2_bzReadOpen(&ebz2err, epf, 0, 0, NULL, 0)) == NULL)
+
errx(1, "BZ2_bzReadOpen, bz2err = %d", ebz2err);
+
+
- if(((fd=open(argv[1],O_RDONLY,0))<0) ||
+
- ((oldsize=lseek(fd,0,SEEK_END))==-1) ||
+
- ((old=malloc(oldsize+1))==NULL) ||
+
- (lseek(fd,0,SEEK_SET)!=0) ||
+
- (read(fd,old,oldsize)!=oldsize) ||
+
- (close(fd)==-1)) err(1,"%s",argv[1]);
+
- if((new=malloc(newsize+1))==NULL) err(1,NULL);
+
-
+
- oldpos=0;newpos=0;
+
- while(newpos<newsize) {
+
+ if ((oldsize = lseek(oldfd, 0, SEEK_END)) == -1 ||
+
+ oldsize > SSIZE_MAX ||
+
+ (old = malloc(oldsize)) == NULL ||
+
+ lseek(oldfd, 0, SEEK_SET) != 0 ||
+
+ read(oldfd, old, oldsize) != oldsize ||
+
+ close(oldfd) == -1)
+
+ err(1, "%s", argv[1]);
+
+ if ((new = malloc(newsize)) == NULL)
+
+ err(1, NULL);
+
+
+
+ oldpos = 0;
+
+ newpos = 0;
+
+ while (newpos < newsize) {
+
/* Read control data */
+
- for(i=0;i<=2;i++) {
+
+ for (i = 0; i <= 2; i++) {
+
lenread = BZ2_bzRead(&cbz2err, cpfbz2, buf, 8);
+
if ((lenread < 8) || ((cbz2err != BZ_OK) &&
+
(cbz2err != BZ_STREAM_END)))
+
- errx(1, "Corrupt patch\n");
+
- ctrl[i]=offtin(buf);
+
- };
+
+ errx(1, "Corrupt patch");
+
+ ctrl[i] = offtin(buf);
+
+ }
+
+
/* Sanity-check */
+
- if ((ctrl[0] < 0) || (ctrl[1] < 0))
+
- errx(1,"Corrupt patch\n");
+
+ if (ctrl[0] < 0 || ctrl[0] > INT_MAX ||
+
+ ctrl[1] < 0 || ctrl[1] > INT_MAX)
+
+ errx(1, "Corrupt patch");
+
+
/* Sanity-check */
+
- if(newpos+ctrl[0]>newsize)
+
- errx(1,"Corrupt patch\n");
+
+ if (add_off_t(newpos, ctrl[0]) > newsize)
+
+ errx(1, "Corrupt patch");
+
+
/* Read diff string */
+
lenread = BZ2_bzRead(&dbz2err, dpfbz2, new + newpos, ctrl[0]);
+
if ((lenread < ctrl[0]) ||
+
((dbz2err != BZ_OK) && (dbz2err != BZ_STREAM_END)))
+
- errx(1, "Corrupt patch\n");
+
+ errx(1, "Corrupt patch");
+
+
/* Add old data to diff string */
+
- for(i=0;i<ctrl[0];i++)
+
- if((oldpos+i>=0) && (oldpos+i<oldsize))
+
- new[newpos+i]+=old[oldpos+i];
+
+ for (i = 0; i < ctrl[0]; i++)
+
+ if (add_off_t(oldpos, i) < oldsize)
+
+ new[newpos + i] += old[oldpos + i];
+
+
/* Adjust pointers */
+
- newpos+=ctrl[0];
+
- oldpos+=ctrl[0];
+
+ newpos = add_off_t(newpos, ctrl[0]);
+
+ oldpos = add_off_t(oldpos, ctrl[0]);
+
+
/* Sanity-check */
+
- if(newpos+ctrl[1]>newsize)
+
- errx(1,"Corrupt patch\n");
+
+ if (add_off_t(newpos, ctrl[1]) > newsize)
+
+ errx(1, "Corrupt patch");
+
+
/* Read extra string */
+
lenread = BZ2_bzRead(&ebz2err, epfbz2, new + newpos, ctrl[1]);
+
if ((lenread < ctrl[1]) ||
+
((ebz2err != BZ_OK) && (ebz2err != BZ_STREAM_END)))
+
- errx(1, "Corrupt patch\n");
+
+ errx(1, "Corrupt patch");
+
+
/* Adjust pointers */
+
- newpos+=ctrl[1];
+
- oldpos+=ctrl[2];
+
- };
+
+ newpos = add_off_t(newpos, ctrl[1]);
+
+ oldpos = add_off_t(oldpos, ctrl[2]);
+
+ }
+
+
/* Clean up the bzip2 reads */
+
BZ2_bzReadClose(&cbz2err, cpfbz2);
+
@@ -197,12 +292,13 @@
+
err(1, "fclose(%s)", argv[3]);
+
+
/* Write the new file */
+
- if(((fd=open(argv[2],O_CREAT|O_TRUNC|O_WRONLY,0666))<0) ||
+
- (write(fd,new,newsize)!=newsize) || (close(fd)==-1))
+
- err(1,"%s",argv[2]);
+
+ if (write(newfd, new, newsize) != newsize || close(newfd) == -1)
+
+ err(1, "%s", argv[2]);
+
+ /* Disable atexit cleanup */
+
+ newfile = NULL;
+
+
free(new);
+
free(old);
+
+
- return 0;
+
+ return (0);
+
}
+22 -2
pkgs/tools/compression/bsdiff/default.nix
···
-
{ lib, stdenv, fetchurl, bzip2 }:
+
{ lib, stdenv, fetchurl, fetchpatch, bzip2 }:
stdenv.mkDerivation rec {
pname = "bsdiff";
···
};
buildInputs = [ bzip2 ];
-
patches = [ ./include-systypes.patch ];
+
patches = [
+
(fetchpatch {
+
url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/20-CVE-2014-9862.patch";
+
sha256 = "sha256-3UuUfNvShQ8fLqxCKUTb/n4BmjL4+Nl7aEqCxYrrERQ=";
+
})
+
./CVE-2020-14315.patch
+
./include-systypes.patch
+
] ++ lib.optional stdenv.hostPlatform.isLinux [
+
(fetchpatch {
+
url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/30-bug-632585-mmap-src-file-instead-of-malloc-read-it.patch";
+
sha256 = "sha256-esbhz2/efUiuQDuF7LGfSeEn3/f1WbqCxQpTs2A0ulI=";
+
})
+
(fetchpatch {
+
url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/31-bug-632585-mmap-dst-file-instead-of-malloc-read-it.patch";
+
sha256 = "sha256-Of4aOcI0rsgdRzPqyw2VRn2p9wQuo3hdlgDTBdXGzoc=";
+
})
+
(fetchpatch {
+
url = "https://sources.debian.org/data/main/b/bsdiff/4.3-22/debian/patches/32-bug-632585-use-int32_t-instead-off_t-for-file-size.patch";
+
sha256 = "sha256-SooFnFK4uKNXvXQb/LEcH8GocnRtkryExI4b3BZTsAY=";
+
})
+
];
buildPhase = ''
$CC -O3 -lbz2 bspatch.c -o bspatch
+1 -1
pkgs/tools/graphics/pngquant/default.nix
···
preConfigure = "patchShebangs .";
-
configureFlags = lib.optionals (!stdenv.isi686 && !stdenv.isx86_64) [ "--disable-sse" ];
+
configureFlags = lib.optionals (!stdenv.hostPlatform.isx86) [ "--disable-sse" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libpng zlib lcms2 ];
+5 -2
pkgs/tools/misc/fluent-bit/default.nix
···
sha256 = "sha256-b+MZuZQB/sl0HcioU1KCxH3TNiXYSPBfC9dBKqCVeXk=";
};
+
patches = lib.optionals stdenv.isDarwin [
+
./fix-cmetrics-darwin.patch
+
./fix-luajit-darwin.patch
+
];
+
nativeBuildInputs = [ cmake flex bison ];
buildInputs = lib.optionals stdenv.isLinux [ systemd ];
cmakeFlags = [ "-DFLB_METRICS=ON" "-DFLB_HTTP_SERVER=ON" ];
-
-
patches = lib.optionals stdenv.isDarwin [ ./fix-luajit-darwin.patch ];
# _FORTIFY_SOURCE requires compiling with optimization (-O)
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-O";
+23
pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch
···
+
diff --git i/lib/cmetrics/src/cmt_time.c w/lib/cmetrics/src/cmt_time.c
+
--- i/lib/cmetrics/src/cmt_time.c
+
+++ w/lib/cmetrics/src/cmt_time.c
+
@@ -20,7 +20,7 @@
+
#include <cmetrics/cmt_info.h>
+
+
/* MacOS */
+
-#ifdef FLB_HAVE_CLOCK_GET_TIME
+
+#ifdef CMT_HAVE_CLOCK_GET_TIME
+
#include <mach/clock.h>
+
#include <mach/mach.h>
+
#endif
+
@@ -41,8 +41,8 @@
+
mach_timespec_t mts;
+
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
+
clock_get_time(cclock, &mts);
+
- tm->tv_sec = mts.tv_sec;
+
- tm->tv_nsec = mts.tv_nsec;
+
+ tm.tv_sec = mts.tv_sec;
+
+ tm.tv_nsec = mts.tv_nsec;
+
mach_port_deallocate(mach_task_self(), cclock);
+
#else /* __STDC_VERSION__ */
+
clock_gettime(CLOCK_REALTIME, &tm);
+23 -8
pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch
···
diff -Naur fluent-bit.old/cmake/luajit.cmake fluent-bit.new/cmake/luajit.cmake
--- fluent-bit.old/cmake/luajit.cmake
+++ fluent-bit.new/cmake/luajit.cmake
-
@@ -11,10 +11,6 @@
-
set(LUAJIT_SRC ${CMAKE_CURRENT_SOURCE_DIR}/${FLB_PATH_LIB_LUAJIT})
+
@@ -12,15 +12,7 @@
set(LUAJIT_DEST ${CMAKE_CURRENT_BINARY_DIR})
-
-if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
-
- set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT}")
-
-endif()
-
-
+
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
+
- set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} -fno-stack-check")
+
- if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20
+
- AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 21)
+
- set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=11.0")
+
- else()
+
- set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=10.15")
+
- endif()
+
-else()
+
- set(DEPLOYMENT_TARGET "")
+
+ set(CFLAGS "${CFLAGS} -fno-stack-check")
+
endif()
+
# luajit (UNIX)
-
# =============
-
ExternalProject_Add(luajit
+
@@ -30,7 +22,7 @@
+
EXCLUDE_FROM_ALL TRUE
+
SOURCE_DIR ${LUAJIT_SRC}
+
CONFIGURE_COMMAND ./configure
+
- BUILD_COMMAND $(MAKE) CROSS=${CROSS_PREFIX} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC" ${DEPLOYMENT_TARGET}
+
+ BUILD_COMMAND $(MAKE) DEFAULT_CC=cc CROSS=${CROSS_PREFIX} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC"
+
INSTALL_COMMAND cp src/libluajit.a "${LUAJIT_DEST}/lib/libluajit.a")
+
+
# luajit (Windows)
+3 -3
pkgs/tools/misc/ipxe/default.nix
···
"bin-x86_64-efi/ipxe.efi" = null;
"bin-x86_64-efi/ipxe.efirom" = null;
"bin-x86_64-efi/ipxe.usb" = "ipxe-efi.usb";
-
} // lib.optionalAttrs (stdenv.isi686 || stdenv.isx86_64) {
+
} // lib.optionalAttrs stdenv.hostPlatform.isx86 {
"bin/ipxe.dsk" = null;
"bin/ipxe.usb" = null;
"bin/ipxe.iso" = null;
···
pname = "ipxe";
version = "1.21.1";
-
nativeBuildInputs = [ perl cdrkit xz openssl gnu-efi mtools ] ++ lib.optional (stdenv.isi686 || stdenv.isx86_64) syslinux;
+
nativeBuildInputs = [ perl cdrkit xz openssl gnu-efi mtools ] ++ lib.optional stdenv.hostPlatform.isx86 syslinux;
src = fetchFromGitHub {
owner = "ipxe";
···
makeFlags =
[ "ECHO_E_BIN_ECHO=echo" "ECHO_E_BIN_ECHO_E=echo" # No /bin/echo here.
-
] ++ lib.optionals (stdenv.isi686 || stdenv.isx86_64) [
+
] ++ lib.optionals stdenv.hostPlatform.isx86 [
"ISOLINUX_BIN_LIST=${syslinux}/share/syslinux/isolinux.bin"
"LDLINUX_C32=${syslinux}/share/syslinux/ldlinux.c32"
] ++ lib.optional (embedScript != null) "EMBED=${embedScript}";
+1 -1
pkgs/tools/networking/fastd/default.nix
···
];
# some options are only available on x86
-
mesonFlags = lib.optionals (!stdenv.isx86_64 && !stdenv.isi686) [
+
mesonFlags = lib.optionals (!stdenv.hostPlatform.isx86) [
"-Dcipher_salsa20_xmm=disabled"
"-Dcipher_salsa2012_xmm=disabled"
"-Dmac_ghash_pclmulqdq=disabled"
+1 -1
pkgs/tools/security/mkp224o/default.nix
···
variants = [
{ suffix = "ref10"; configureFlags = ["--enable-ref10"]; }
{ suffix = "donna"; configureFlags = ["--enable-donna"]; }
-
] ++ lib.optionals (stdenv.isi686 || stdenv.isx86_64) [
+
] ++ lib.optionals stdenv.hostPlatform.isx86 [
{ suffix = "donna-sse2"; configureFlags = ["--enable-donna-sse2"]; }
] ++ lib.optionals stdenv.isx86_64 [
{ suffix = "amd64-51-30k"; configureFlags = ["--enable-amd64-51-30k"]; }
+2 -4
pkgs/top-level/all-packages.nix
···
icu = icu63;
};
-
fluent-bit = callPackage ../tools/misc/fluent-bit {
-
stdenv = gccStdenv;
-
};
+
fluent-bit = callPackage ../tools/misc/fluent-bit { };
flux = callPackage ../development/compilers/flux { };
···
if ccWrapper.isGNU then ccWrapper.overrideAttrs(old: {
cc = old.cc.override {
reproducibleBuild = false;
-
profiledCompiler = with stdenv; (!isDarwin && (isi686 || isx86_64));
+
profiledCompiler = with stdenv; (!isDarwin && hostPlatform.isx86);
}) else ccWrapper;