diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index cbed76919bdb..efcb9eb7509f 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -10587,6 +10587,12 @@ githubId = 251028; name = "Shell Turner"; }; + shikanime = { + name = "William Phetsinorath"; + email = "deva.shikanime@protonmail.com"; + github = "shikanime"; + githubId = 22115108; + }; shlevy = { email = "shea@shealevy.com"; github = "shlevy"; @@ -13244,4 +13250,10 @@ github = "sei40kr"; githubId = 11665236; }; + vdot0x23 = { + name = "Victor Büttner"; + email = "nix.victor@0x23.dk"; + github = "vdot0x23"; + githubId = 40716069; + }; } diff --git a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml index a64379b19ef6..f1d803136aa0 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2111.section.xml @@ -1365,6 +1365,17 @@ Superuser created successfully. gnat11 instead of gnat9. + + + retroArchCores has been removed. This means + that using nixpkgs.config.retroarch to + customize RetroArch cores is not supported anymore. Instead, + use package overrides, for example: + retroarch.override { cores = with libretro; [ citra snes9x ]; };. + Also, retroarchFull derivation is available + for those who want to have all RetroArch cores available. + +
@@ -1966,6 +1977,16 @@ Superuser created successfully. 1.5.4. + + + RetroArch has been upgraded from version + 1.8.5 to 1.9.13.2. Since + the previous release was quite old, if you’re having issues + after the upgrade, please delete your + $XDG_CONFIG_HOME/retroarch/retroarch.cfg + file. + +
diff --git a/nixos/doc/manual/release-notes/rl-2111.section.md b/nixos/doc/manual/release-notes/rl-2111.section.md index 9a76b4cca449..275ee7142d0e 100644 --- a/nixos/doc/manual/release-notes/rl-2111.section.md +++ b/nixos/doc/manual/release-notes/rl-2111.section.md @@ -407,6 +407,8 @@ In addition to numerous new and upgraded packages, this release has the followin - The default GNAT version has been changed: The `gnat` attribute now points to `gnat11` instead of `gnat9`. +- `retroArchCores` has been removed. This means that using `nixpkgs.config.retroarch` to customize RetroArch cores is not supported anymore. Instead, use package overrides, for example: `retroarch.override { cores = with libretro; [ citra snes9x ]; };`. Also, `retroarchFull` derivation is available for those who want to have all RetroArch cores available. + ## Other Notable Changes {#sec-release-21.11-notable-changes} @@ -539,3 +541,5 @@ In addition to numerous new and upgraded packages, this release has the followin - Loki has had another release. Some default values have been changed for the configuration and some configuration options have been renamed. For more details, please check [the upgrade guide](https://grafana.com/docs/loki/latest/upgrading/#240). - `julia` now refers to `julia-stable` instead of `julia-lts`. In practice this means it has been upgraded from `1.0.4` to `1.5.4`. + +- RetroArch has been upgraded from version `1.8.5` to `1.9.13.2`. Since the previous release was quite old, if you're having issues after the upgrade, please delete your `$XDG_CONFIG_HOME/retroarch/retroarch.cfg` file. diff --git a/nixos/lib/make-zfs-image.nix b/nixos/lib/make-zfs-image.nix index 40648ca24d4d..a84732aa1171 100644 --- a/nixos/lib/make-zfs-image.nix +++ b/nixos/lib/make-zfs-image.nix @@ -241,7 +241,7 @@ let 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 ( diff --git a/nixos/lib/qemu-common.nix b/nixos/lib/qemu-common.nix index 84f9060acd63..1a1f7531feb0 100644 --- a/nixos/lib/qemu-common.nix +++ b/nixos/lib/qemu-common.nix @@ -17,7 +17,7 @@ rec { ''-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}'"; diff --git a/nixos/modules/hardware/all-firmware.nix b/nixos/modules/hardware/all-firmware.nix index bdf90816740c..ce87f9e8be8a 100644 --- a/nixos/modules/hardware/all-firmware.nix +++ b/nixos/modules/hardware/all-firmware.nix @@ -83,7 +83,7 @@ in { 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 ]; diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 4812cacabaf3..30610b4f4260 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -467,7 +467,7 @@ let 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 diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix index caf329c2536a..c64e01a20cb3 100644 --- a/nixos/modules/programs/sway.nix +++ b/nixos/modules/programs/sway.nix @@ -123,6 +123,8 @@ in { ]; environment = { systemPackages = [ swayPackage ] ++ cfg.extraPackages; + # Needed for the default wallpaper: + pathsToLink = [ "/share/backgrounds/sway" ]; etc = { "sway/config".source = mkOptionDefault "${swayPackage}/etc/sway/config"; "sway/config.d/nixos.conf".source = pkgs.writeText "nixos.conf" '' diff --git a/nixos/modules/services/databases/clickhouse.nix b/nixos/modules/services/databases/clickhouse.nix index f2f4e9d25542..3a161d56107e 100644 --- a/nixos/modules/services/databases/clickhouse.nix +++ b/nixos/modules/services/databases/clickhouse.nix @@ -13,6 +13,15 @@ with lib; enable = mkEnableOption "ClickHouse database server"; + package = mkOption { + type = types.package; + default = pkgs.clickhouse; + defaultText = "pkgs.clickhouse"; + description = '' + ClickHouse package to use. + ''; + }; + }; }; @@ -45,21 +54,21 @@ with lib; AmbientCapabilities = "CAP_SYS_NICE"; StateDirectory = "clickhouse"; LogsDirectory = "clickhouse"; - ExecStart = "${pkgs.clickhouse}/bin/clickhouse-server --config-file=${pkgs.clickhouse}/etc/clickhouse-server/config.xml"; + ExecStart = "${cfg.package}/bin/clickhouse-server --config-file=${cfg.package}/etc/clickhouse-server/config.xml"; }; }; environment.etc = { "clickhouse-server/config.xml" = { - source = "${pkgs.clickhouse}/etc/clickhouse-server/config.xml"; + source = "${cfg.package}/etc/clickhouse-server/config.xml"; }; "clickhouse-server/users.xml" = { - source = "${pkgs.clickhouse}/etc/clickhouse-server/users.xml"; + source = "${cfg.package}/etc/clickhouse-server/users.xml"; }; }; - environment.systemPackages = [ pkgs.clickhouse ]; + environment.systemPackages = [ cfg.package ]; # startup requires a `/etc/localtime` which only if exists if `time.timeZone != null` time.timeZone = mkDefault "UTC"; diff --git a/nixos/modules/services/mail/dovecot.nix b/nixos/modules/services/mail/dovecot.nix index 223f3bef77db..c39827c5b867 100644 --- a/nixos/modules/services/mail/dovecot.nix +++ b/nixos/modules/services/mail/dovecot.nix @@ -103,11 +103,12 @@ let plugin { quota_rule = *:storage=${cfg.quotaGlobalPerUser} - quota = maildir:User quota # per virtual mail user quota # BUG/FIXME broken, we couldn't get this working + quota = count:User quota # per virtual mail user quota quota_status_success = DUNNO quota_status_nouser = DUNNO quota_status_overquota = "552 5.2.2 Mailbox is full" quota_grace = 10%% + quota_vsizes = yes } '' ) diff --git a/nixos/modules/services/networking/nomad.nix b/nixos/modules/services/networking/nomad.nix index 3bd15bd5c808..43333af5e2fe 100644 --- a/nixos/modules/services/networking/nomad.nix +++ b/nixos/modules/services/networking/nomad.nix @@ -51,7 +51,7 @@ in extraSettingsPaths = mkOption { type = types.listOf types.path; - default = []; + default = [ ]; description = '' Additional settings paths used to configure nomad. These can be files or directories. ''; @@ -60,9 +60,21 @@ in ''; }; + extraSettingsPlugins = mkOption { + type = types.listOf (types.either types.package types.path); + default = [ ]; + description = '' + Additional plugins dir used to configure nomad. + ''; + example = literalExpression '' + [ "" "pkgs."] + ''; + }; + + settings = mkOption { type = format.type; - default = {}; + default = { }; description = '' Configuration for Nomad. See the documentation for supported values. @@ -128,7 +140,8 @@ in DynamicUser = cfg.dropPrivileges; ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; ExecStart = "${cfg.package}/bin/nomad agent -config=/etc/nomad.json" + - concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths; + concatMapStrings (path: " -config=${path}") cfg.extraSettingsPaths + + concatMapStrings (path: " -plugin-dir=${path}/bin") cfg.extraSettingsPlugins; KillMode = "process"; KillSignal = "SIGINT"; LimitNOFILE = 65536; diff --git a/nixos/modules/services/networking/sabnzbd.nix b/nixos/modules/services/networking/sabnzbd.nix index 43566dfd25c5..54eeba1a9ec1 100644 --- a/nixos/modules/services/networking/sabnzbd.nix +++ b/nixos/modules/services/networking/sabnzbd.nix @@ -17,6 +17,13 @@ in services.sabnzbd = { enable = mkEnableOption "the sabnzbd server"; + package = mkOption { + type = types.package; + default = pkgs.sabnzbd; + defaultText = "pkgs.sabnzbd"; + description = "The sabnzbd executable package run by the service."; + }; + configFile = mkOption { type = types.path; default = "/var/lib/sabnzbd/sabnzbd.ini"; @@ -63,7 +70,7 @@ in GuessMainPID = "no"; User = "${cfg.user}"; Group = "${cfg.group}"; - ExecStart = "${sabnzbd}/bin/sabnzbd -d -f ${cfg.configFile}"; + ExecStart = "${lib.getBin cfg.package}/bin/sabnzbd -d -f ${cfg.configFile}"; }; }; }; diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix index 4a9da9394519..d147155d796c 100644 --- a/nixos/modules/system/boot/kernel.nix +++ b/nixos/modules/system/boot/kernel.nix @@ -243,7 +243,7 @@ in "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" diff --git a/nixos/modules/tasks/network-interfaces.nix b/nixos/modules/tasks/network-interfaces.nix index 75fc5a14a800..49901cda848d 100644 --- a/nixos/modules/tasks/network-interfaces.nix +++ b/nixos/modules/tasks/network-interfaces.nix @@ -417,7 +417,11 @@ in network node hostname (uname --nodename) the option boot.kernel.sysctl."kernel.hostname" can be used as a workaround (but the 64 character limit still applies). + + WARNING: Do not use underscores (_) or you may run into unexpected issues. ''; + # warning until the issues in https://github.com/NixOS/nixpkgs/pull/138978 + # are resolved }; networking.fqdn = mkOption { diff --git a/nixos/modules/virtualisation/azure-agent.nix b/nixos/modules/virtualisation/azure-agent.nix index 41f3fa0e6642..bd8c7f8c1eea 100644 --- a/nixos/modules/virtualisation/azure-agent.nix +++ b/nixos/modules/virtualisation/azure-agent.nix @@ -76,7 +76,7 @@ in 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; diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index 0c2782d3e027..493c407222f7 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -97,7 +97,7 @@ let 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"; @@ -296,7 +296,7 @@ in virtualisation.memorySize = mkOption { type = types.ints.positive; - default = 384; + default = 1024; description = '' The memory size in megabytes of the virtual machine. @@ -833,7 +833,7 @@ in # 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) [ diff --git a/nixos/modules/virtualisation/virtualbox-guest.nix b/nixos/modules/virtualisation/virtualbox-guest.nix index 486951983d30..f702fb4e525c 100644 --- a/nixos/modules/virtualisation/virtualbox-guest.nix +++ b/nixos/modules/virtualisation/virtualbox-guest.nix @@ -33,7 +33,7 @@ in 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}"; }]; diff --git a/nixos/modules/virtualisation/vmware-guest.nix b/nixos/modules/virtualisation/vmware-guest.nix index 480a9703cef3..09b26eeb33a9 100644 --- a/nixos/modules/virtualisation/vmware-guest.nix +++ b/nixos/modules/virtualisation/vmware-guest.nix @@ -23,7 +23,7 @@ in 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}"; } ]; diff --git a/nixos/tests/airsonic.nix b/nixos/tests/airsonic.nix index 59bd84877c61..d8df092c2ecf 100644 --- a/nixos/tests/airsonic.nix +++ b/nixos/tests/airsonic.nix @@ -11,10 +11,6 @@ import ./make-test-python.nix ({ pkgs, ... }: { enable = true; maxMemory = 800; }; - - # Airsonic is a Java application, and unfortunately requires a significant - # amount of memory. - virtualisation.memorySize = 1024; }; testScript = '' diff --git a/nixos/tests/cage.nix b/nixos/tests/cage.nix index e6bef374d303..83bae3deeeab 100644 --- a/nixos/tests/cage.nix +++ b/nixos/tests/cage.nix @@ -17,7 +17,6 @@ import ./make-test-python.nix ({ pkgs, ...} : 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" ]; }; diff --git a/nixos/tests/cagebreak.nix b/nixos/tests/cagebreak.nix index 242e59f5d7ab..c6c2c632b61a 100644 --- a/nixos/tests/cagebreak.nix +++ b/nixos/tests/cagebreak.nix @@ -35,7 +35,6 @@ in 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" ]; }; diff --git a/nixos/tests/cassandra.nix b/nixos/tests/cassandra.nix index bef3105f0a9e..a19d525c3431 100644 --- a/nixos/tests/cassandra.nix +++ b/nixos/tests/cassandra.nix @@ -41,7 +41,6 @@ let ]; }; services.cassandra = cassandraCfg ipAddress // extra; - virtualisation.memorySize = 1024; }; in { diff --git a/nixos/tests/ceph-multi-node.nix b/nixos/tests/ceph-multi-node.nix index 33736e27b984..29e7c279d69a 100644 --- a/nixos/tests/ceph-multi-node.nix +++ b/nixos/tests/ceph-multi-node.nix @@ -37,7 +37,6 @@ let generateHost = { pkgs, cephConfig, networkConfig, ... }: { virtualisation = { - memorySize = 1024; emptyDiskImages = [ 20480 ]; vlans = [ 1 ]; }; diff --git a/nixos/tests/ceph-single-node-bluestore.nix b/nixos/tests/ceph-single-node-bluestore.nix index f706d4d56fcf..acaae4cf300e 100644 --- a/nixos/tests/ceph-single-node-bluestore.nix +++ b/nixos/tests/ceph-single-node-bluestore.nix @@ -34,7 +34,6 @@ let generateHost = { pkgs, cephConfig, networkConfig, ... }: { virtualisation = { - memorySize = 1024; emptyDiskImages = [ 20480 20480 20480 ]; vlans = [ 1 ]; }; diff --git a/nixos/tests/ceph-single-node.nix b/nixos/tests/ceph-single-node.nix index d1d56ea6708c..4fe5dc59ff8f 100644 --- a/nixos/tests/ceph-single-node.nix +++ b/nixos/tests/ceph-single-node.nix @@ -34,7 +34,6 @@ let generateHost = { pkgs, cephConfig, networkConfig, ... }: { virtualisation = { - memorySize = 1024; emptyDiskImages = [ 20480 20480 20480 ]; vlans = [ 1 ]; }; diff --git a/nixos/tests/common/wayland-cage.nix b/nixos/tests/common/wayland-cage.nix index 55aeb858d7a4..fd0700941392 100644 --- a/nixos/tests/common/wayland-cage.nix +++ b/nixos/tests/common/wayland-cage.nix @@ -8,7 +8,6 @@ }; virtualisation = { - memorySize = 1024; qemu.options = [ "-vga virtio" ]; }; } diff --git a/nixos/tests/containers-bridge.nix b/nixos/tests/containers-bridge.nix index a1b0c9469d83..b8661fd7997c 100644 --- a/nixos/tests/containers-bridge.nix +++ b/nixos/tests/containers-bridge.nix @@ -15,7 +15,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { { pkgs, ... }: { imports = [ ../modules/installer/cd-dvd/channel.nix ]; virtualisation.writableStore = true; - virtualisation.memorySize = 768; networking.bridges = { br0 = { diff --git a/nixos/tests/containers-ephemeral.nix b/nixos/tests/containers-ephemeral.nix index fabf0593f23a..db1631cf5b5d 100644 --- a/nixos/tests/containers-ephemeral.nix +++ b/nixos/tests/containers-ephemeral.nix @@ -5,7 +5,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { }; machine = { pkgs, ... }: { - virtualisation.memorySize = 768; virtualisation.writableStore = true; containers.webserver = { diff --git a/nixos/tests/containers-extra_veth.nix b/nixos/tests/containers-extra_veth.nix index 172409f56e89..b8f3d9844064 100644 --- a/nixos/tests/containers-extra_veth.nix +++ b/nixos/tests/containers-extra_veth.nix @@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { { pkgs, ... }: { imports = [ ../modules/installer/cd-dvd/channel.nix ]; virtualisation.writableStore = true; - virtualisation.memorySize = 768; virtualisation.vlans = []; networking.useDHCP = false; diff --git a/nixos/tests/containers-hosts.nix b/nixos/tests/containers-hosts.nix index 1f24ed1f3c2c..3c6a15710027 100644 --- a/nixos/tests/containers-hosts.nix +++ b/nixos/tests/containers-hosts.nix @@ -7,7 +7,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { machine = { lib, ... }: { - virtualisation.memorySize = 256; virtualisation.vlans = []; networking.bridges.br0.interfaces = []; diff --git a/nixos/tests/containers-imperative.nix b/nixos/tests/containers-imperative.nix index 34103ef7586b..a126a5480c03 100644 --- a/nixos/tests/containers-imperative.nix +++ b/nixos/tests/containers-imperative.nix @@ -14,7 +14,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { 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 diff --git a/nixos/tests/containers-ip.nix b/nixos/tests/containers-ip.nix index 8fc42dab6241..91fdda0392a9 100644 --- a/nixos/tests/containers-ip.nix +++ b/nixos/tests/containers-ip.nix @@ -22,7 +22,6 @@ in import ./make-test-python.nix ({ pkgs, lib, ... }: { imports = [ ../modules/installer/cd-dvd/channel.nix ]; virtualisation = { writableStore = true; - memorySize = 768; }; containers.webserver4 = webserverFor "10.231.136.1" "10.231.136.2"; diff --git a/nixos/tests/containers-macvlans.nix b/nixos/tests/containers-macvlans.nix index d0f41be8c125..a0cea8db4a1a 100644 --- a/nixos/tests/containers-macvlans.nix +++ b/nixos/tests/containers-macvlans.nix @@ -15,7 +15,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { machine1 = { lib, ... }: { - virtualisation.memorySize = 256; virtualisation.vlans = [ 1 ]; # To be able to ping containers from the host, it is necessary @@ -55,7 +54,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { machine2 = { ... }: { - virtualisation.memorySize = 256; virtualisation.vlans = [ 1 ]; }; diff --git a/nixos/tests/containers-physical_interfaces.nix b/nixos/tests/containers-physical_interfaces.nix index 57bd0eedcc33..e203f88786a3 100644 --- a/nixos/tests/containers-physical_interfaces.nix +++ b/nixos/tests/containers-physical_interfaces.nix @@ -7,7 +7,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { nodes = { server = { ... }: { - virtualisation.memorySize = 256; virtualisation.vlans = [ 1 ]; containers.server = { @@ -23,7 +22,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { }; }; bridged = { ... }: { - virtualisation.memorySize = 128; virtualisation.vlans = [ 1 ]; containers.bridged = { @@ -41,7 +39,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { }; bonded = { ... }: { - virtualisation.memorySize = 128; virtualisation.vlans = [ 1 ]; containers.bonded = { @@ -62,7 +59,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { }; bridgedbond = { ... }: { - virtualisation.memorySize = 128; virtualisation.vlans = [ 1 ]; containers.bridgedbond = { diff --git a/nixos/tests/containers-portforward.nix b/nixos/tests/containers-portforward.nix index e21f6cee76a9..6cecd72f1bda 100644 --- a/nixos/tests/containers-portforward.nix +++ b/nixos/tests/containers-portforward.nix @@ -15,7 +15,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { { pkgs, ... }: { imports = [ ../modules/installer/cd-dvd/channel.nix ]; virtualisation.writableStore = true; - virtualisation.memorySize = 768; containers.webserver = { privateNetwork = true; diff --git a/nixos/tests/containers-tmpfs.nix b/nixos/tests/containers-tmpfs.nix index 0185c2d91f23..d95178d1ff58 100644 --- a/nixos/tests/containers-tmpfs.nix +++ b/nixos/tests/containers-tmpfs.nix @@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { { pkgs, ... }: { imports = [ ../modules/installer/cd-dvd/channel.nix ]; virtualisation.writableStore = true; - virtualisation.memorySize = 768; containers.tmpfs = { diff --git a/nixos/tests/custom-ca.nix b/nixos/tests/custom-ca.nix index 4480519c7edc..0ab49f3b3430 100644 --- a/nixos/tests/custom-ca.nix +++ b/nixos/tests/custom-ca.nix @@ -81,8 +81,6 @@ in # 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" ]; diff --git a/nixos/tests/enlightenment.nix b/nixos/tests/enlightenment.nix index c5f0e208906b..8506c348246d 100644 --- a/nixos/tests/enlightenment.nix +++ b/nixos/tests/enlightenment.nix @@ -19,7 +19,6 @@ import ./make-test-python.nix ({ pkgs, ...} : }; }; 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; diff --git a/nixos/tests/fcitx/default.nix b/nixos/tests/fcitx/default.nix index cbeb95d33b0c..a243be8dc19b 100644 --- a/nixos/tests/fcitx/default.nix +++ b/nixos/tests/fcitx/default.nix @@ -11,7 +11,6 @@ import ../make-test-python.nix ( ... }: { - virtualisation.memorySize = 1024; imports = [ ../common/user-account.nix diff --git a/nixos/tests/fenics.nix b/nixos/tests/fenics.nix index 56f09d6a27e4..f0a8c32c7cd8 100644 --- a/nixos/tests/fenics.nix +++ b/nixos/tests/fenics.nix @@ -38,7 +38,6 @@ in gcc (python3.withPackages (ps: with ps; [ fenics ])) ]; - virtualisation.memorySize = 512; }; }; testScript = diff --git a/nixos/tests/firefox.nix b/nixos/tests/firefox.nix index 7216ad43b8e9..6101fc973564 100644 --- a/nixos/tests/firefox.nix +++ b/nixos/tests/firefox.nix @@ -13,9 +13,6 @@ import ./make-test-python.nix ({ pkgs, firefoxPackage, ... }: { 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" ]; diff --git a/nixos/tests/gerrit.nix b/nixos/tests/gerrit.nix index b6b6486fae86..8ae9e89cf6b0 100644 --- a/nixos/tests/gerrit.nix +++ b/nixos/tests/gerrit.nix @@ -18,7 +18,6 @@ in { { config, pkgs, ... }: { networking.firewall.allowedTCPPorts = [ 80 2222 ]; - virtualisation.memorySize = 1024; services.gerrit = { enable = true; diff --git a/nixos/tests/gnome-xorg.nix b/nixos/tests/gnome-xorg.nix index b9ff5e682875..6264b87af4ec 100644 --- a/nixos/tests/gnome-xorg.nix +++ b/nixos/tests/gnome-xorg.nix @@ -40,7 +40,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : { }; }; - virtualisation.memorySize = 1024; }; testScript = { nodes, ... }: let diff --git a/nixos/tests/gnome.nix b/nixos/tests/gnome.nix index 1da97f733cfd..06f387ecad67 100644 --- a/nixos/tests/gnome.nix +++ b/nixos/tests/gnome.nix @@ -45,7 +45,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : { }; }; - virtualisation.memorySize = 1024; }; testScript = { nodes, ... }: let diff --git a/nixos/tests/graphite.nix b/nixos/tests/graphite.nix index 137be2d89c8b..496f16846ea6 100644 --- a/nixos/tests/graphite.nix +++ b/nixos/tests/graphite.nix @@ -4,7 +4,6 @@ import ./make-test-python.nix ({ pkgs, ... } : nodes = { one = { ... }: { - virtualisation.memorySize = 1024; time.timeZone = "UTC"; services.graphite = { web = { diff --git a/nixos/tests/hadoop/hadoop.nix b/nixos/tests/hadoop/hadoop.nix index b4ed0e17a852..48737debab54 100644 --- a/nixos/tests/hadoop/hadoop.nix +++ b/nixos/tests/hadoop/hadoop.nix @@ -95,7 +95,6 @@ import ../make-test-python.nix ({pkgs, ...}: { # YARN cluster rm1 = {pkgs, options, ...}: { - virtualisation.memorySize = 1024; services.hadoop = { inherit package coreSite hdfsSite; yarnSite = options.services.hadoop.yarnSite.default // yarnSiteHA; @@ -103,7 +102,6 @@ import ../make-test-python.nix ({pkgs, ...}: { }; }; rm2 = {pkgs, options, ...}: { - virtualisation.memorySize = 1024; services.hadoop = { inherit package coreSite hdfsSite; yarnSite = options.services.hadoop.yarnSite.default // yarnSiteHA; diff --git a/nixos/tests/hadoop/hdfs.nix b/nixos/tests/hadoop/hdfs.nix index 360dbd60ed27..b63cbf480327 100644 --- a/nixos/tests/hadoop/hdfs.nix +++ b/nixos/tests/hadoop/hdfs.nix @@ -2,7 +2,6 @@ import ../make-test-python.nix ({...}: { nodes = { namenode = {pkgs, ...}: { - virtualisation.memorySize = 1024; services.hadoop = { package = pkgs.hadoop; hdfs = { diff --git a/nixos/tests/installed-tests/fwupd.nix b/nixos/tests/installed-tests/fwupd.nix index a8a683a1af7b..65614e2689d8 100644 --- a/nixos/tests/installed-tests/fwupd.nix +++ b/nixos/tests/installed-tests/fwupd.nix @@ -7,6 +7,5 @@ makeInstalledTest { services.fwupd.enable = true; services.fwupd.disabledPlugins = lib.mkForce []; # don't disable test plugin services.fwupd.enableTestRemote = true; - virtualisation.memorySize = 768; }; } diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 73dc676ca32d..0748a74ee176 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -70,14 +70,14 @@ let 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(): flags = "-cpu max" ${if (system == "x86_64-linux" || system == "i686-linux") - then ''flags += " -m 1024"'' - else ''flags += " -m 768 -enable-kvm -machine virt,gic-version=host"'' + then ''flags += " -m 1500"'' + else ''flags += " -m 1000 -enable-kvm -machine virt,gic-version=host"'' } return flags @@ -288,7 +288,7 @@ let # builds stuff in the VM, needs more juice virtualisation.diskSize = 8 * 1024; virtualisation.cores = 8; - virtualisation.memorySize = 1536; + virtualisation.memorySize = 3096; # Use a small /dev/vdb as the root disk for the # installer. This ensures the target disk (/dev/vda) is diff --git a/nixos/tests/jitsi-meet.nix b/nixos/tests/jitsi-meet.nix index f9a0b121a2bf..d95f7c2ea9ea 100644 --- a/nixos/tests/jitsi-meet.nix +++ b/nixos/tests/jitsi-meet.nix @@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, ... }: { client = { nodes, pkgs, ... }: { }; server = { config, pkgs, ... }: { - virtualisation.memorySize = 512; services.jitsi-meet = { enable = true; hostName = "server"; diff --git a/nixos/tests/kafka.nix b/nixos/tests/kafka.nix index 95711808a2c3..5def759ca24d 100644 --- a/nixos/tests/kafka.nix +++ b/nixos/tests/kafka.nix @@ -19,7 +19,6 @@ let }; networking.firewall.allowedTCPPorts = [ 2181 ]; - virtualisation.memorySize = 1024; }; kafka = { ... }: { services.apache-kafka = { diff --git a/nixos/tests/keycloak.nix b/nixos/tests/keycloak.nix index fc321b8902f1..1be3fed6acc9 100644 --- a/nixos/tests/keycloak.nix +++ b/nixos/tests/keycloak.nix @@ -17,7 +17,6 @@ let nodes = { keycloak = { ... }: { - virtualisation.memorySize = 1024; security.pki.certificateFiles = [ certs.ca.cert diff --git a/nixos/tests/lxd-image.nix b/nixos/tests/lxd-image.nix index bc8274eebedd..096b9d9aba90 100644 --- a/nixos/tests/lxd-image.nix +++ b/nixos/tests/lxd-image.nix @@ -46,8 +46,6 @@ in { machine = { lib, ... }: { virtualisation = { - # OOMs otherwise - memorySize = 1024; # disk full otherwise diskSize = 2048; diff --git a/nixos/tests/metabase.nix b/nixos/tests/metabase.nix index 370114e92223..1b25071902e9 100644 --- a/nixos/tests/metabase.nix +++ b/nixos/tests/metabase.nix @@ -7,7 +7,6 @@ import ./make-test-python.nix ({ pkgs, ... }: { nodes = { machine = { ... }: { services.metabase.enable = true; - virtualisation.memorySize = 1024; }; }; diff --git a/nixos/tests/mysql/mysql.nix b/nixos/tests/mysql/mysql.nix index dce5fa26acf7..2ac2b34a18e2 100644 --- a/nixos/tests/mysql/mysql.nix +++ b/nixos/tests/mysql/mysql.nix @@ -64,10 +64,6 @@ in { 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; } diff --git a/nixos/tests/networking-proxy.nix b/nixos/tests/networking-proxy.nix index 62b5e690f6d1..fcb2558cf3b0 100644 --- a/nixos/tests/networking-proxy.nix +++ b/nixos/tests/networking-proxy.nix @@ -8,7 +8,6 @@ let default-config = { services.xserver.enable = false; - virtualisation.memorySize = 128; }; in import ./make-test-python.nix ({ pkgs, ...} : { name = "networking-proxy"; diff --git a/nixos/tests/nginx-etag.nix b/nixos/tests/nginx-etag.nix index a7bfc0d26958..b69511d081d4 100644 --- a/nixos/tests/nginx-etag.nix +++ b/nixos/tests/nginx-etag.nix @@ -37,7 +37,6 @@ import ./make-test-python.nix { }; client = { pkgs, lib, ... }: { - virtualisation.memorySize = 512; environment.systemPackages = let testRunner = pkgs.writers.writePython3Bin "test-runner" { libraries = [ pkgs.python3Packages.selenium ]; diff --git a/nixos/tests/nixops/default.nix b/nixos/tests/nixops/default.nix index 3fb81906a522..ec3d028aabae 100644 --- a/nixos/tests/nixops/default.nix +++ b/nixos/tests/nixops/default.nix @@ -26,7 +26,6 @@ let nix.binaryCaches = lib.mkForce [ ]; users.users.person.isNormalUser = true; virtualisation.writableStore = true; - virtualisation.memorySize = 1024 /*MiB*/; virtualisation.additionalPaths = [ pkgs.hello pkgs.figlet diff --git a/nixos/tests/opensmtpd-rspamd.nix b/nixos/tests/opensmtpd-rspamd.nix index 9cb2624e6c4e..19969a7b47dd 100644 --- a/nixos/tests/opensmtpd-rspamd.nix +++ b/nixos/tests/opensmtpd-rspamd.nix @@ -39,7 +39,6 @@ import ./make-test-python.nix { smtp2 = { pkgs, ... }: { imports = [ common/user-account.nix ]; - virtualisation.memorySize = 512; networking = { firewall.allowedTCPPorts = [ 25 143 ]; useDHCP = false; diff --git a/nixos/tests/pantheon.nix b/nixos/tests/pantheon.nix index aebf6b534476..989d29a966df 100644 --- a/nixos/tests/pantheon.nix +++ b/nixos/tests/pantheon.nix @@ -15,7 +15,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : services.xserver.enable = true; services.xserver.desktopManager.pantheon.enable = true; - virtualisation.memorySize = 1024; }; enableOCR = true; diff --git a/nixos/tests/paperless-ng.nix b/nixos/tests/paperless-ng.nix index a4b2f348ec32..618eeec6b125 100644 --- a/nixos/tests/paperless-ng.nix +++ b/nixos/tests/paperless-ng.nix @@ -8,7 +8,6 @@ import ./make-test-python.nix ({ lib, ... }: { enable = true; passwordFile = builtins.toFile "password" "admin"; }; - virtualisation.memorySize = 1024; }; testScript = '' diff --git a/nixos/tests/plasma5-systemd-start.nix b/nixos/tests/plasma5-systemd-start.nix index ac6fad7da6c6..72de19af70ce 100644 --- a/nixos/tests/plasma5-systemd-start.nix +++ b/nixos/tests/plasma5-systemd-start.nix @@ -21,7 +21,6 @@ import ./make-test-python.nix ({ pkgs, ...} : user = "alice"; }; }; - virtualisation.memorySize = 1024; }; testScript = { nodes, ... }: let diff --git a/nixos/tests/plasma5.nix b/nixos/tests/plasma5.nix index 281c9843e901..5c7ea602f79e 100644 --- a/nixos/tests/plasma5.nix +++ b/nixos/tests/plasma5.nix @@ -19,7 +19,6 @@ import ./make-test-python.nix ({ pkgs, ...} : 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 diff --git a/nixos/tests/pleroma.nix b/nixos/tests/pleroma.nix index d0ae1488d134..bf3623fce38b 100644 --- a/nixos/tests/pleroma.nix +++ b/nixos/tests/pleroma.nix @@ -202,7 +202,6 @@ import ./make-test-python.nix ({ pkgs, ... }: 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 diff --git a/nixos/tests/privacyidea.nix b/nixos/tests/privacyidea.nix index 4a94f0727946..c1141465ec24 100644 --- a/nixos/tests/privacyidea.nix +++ b/nixos/tests/privacyidea.nix @@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, ...} : rec { machine = { ... }: { virtualisation.cores = 2; - virtualisation.memorySize = 512; services.privacyidea = { enable = true; diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 38b93c4087c0..d069854328a2 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -464,7 +464,6 @@ let 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 = { @@ -953,7 +952,6 @@ let }; metricProvider = { services.rspamd.enable = true; - virtualisation.memorySize = 1024; }; exporterTest = '' wait_for_unit("rspamd.service") diff --git a/nixos/tests/prometheus.nix b/nixos/tests/prometheus.nix index 20f8c4459e10..a075cfc1f1b7 100644 --- a/nixos/tests/prometheus.nix +++ b/nixos/tests/prometheus.nix @@ -188,7 +188,6 @@ in import ./make-test-python.nix { # Minio requires at least 1GiB of free disk space to run. virtualisation = { diskSize = 2 * 1024; - memorySize = 1024; }; networking.firewall.allowedTCPPorts = [ minioPort ]; diff --git a/nixos/tests/rspamd.nix b/nixos/tests/rspamd.nix index 3fd55444fd8a..f0ccfe7ea0e6 100644 --- a/nixos/tests/rspamd.nix +++ b/nixos/tests/rspamd.nix @@ -25,7 +25,6 @@ let machine = { services.rspamd.enable = true; networking.enableIPv6 = enableIPv6; - virtualisation.memorySize = 1024; }; testScript = '' start_all() @@ -69,7 +68,6 @@ in group = "rspamd"; }]; }; - virtualisation.memorySize = 1024; }; testScript = '' @@ -118,7 +116,6 @@ in ''; }; }; - virtualisation.memorySize = 1024; }; testScript = '' @@ -224,7 +221,6 @@ in rspamd_logger.infox(rspamd_config, 'Work dammit!!!') ''; }; - virtualisation.memorySize = 1024; }; testScript = '' ${initMachine} @@ -291,7 +287,6 @@ in postfix.enable = true; workers.rspamd_proxy.type = "rspamd_proxy"; }; - virtualisation.memorySize = 1024; }; testScript = '' ${initMachine} diff --git a/nixos/tests/seafile.nix b/nixos/tests/seafile.nix index 70b9ba55457e..6eec8b1fbe55 100644 --- a/nixos/tests/seafile.nix +++ b/nixos/tests/seafile.nix @@ -1,7 +1,6 @@ import ./make-test-python.nix ({ pkgs, ... }: let client = { config, pkgs, ... }: { - virtualisation.memorySize = 256; environment.systemPackages = [ pkgs.seafile-shared pkgs.curl ]; }; in { @@ -12,7 +11,6 @@ import ./make-test-python.nix ({ pkgs, ... }: nodes = { server = { config, pkgs, ... }: { - virtualisation.memorySize = 512; services.seafile = { enable = true; ccnetSettings.General.SERVICE_URL = "http://server"; diff --git a/nixos/tests/signal-desktop.nix b/nixos/tests/signal-desktop.nix index 7bc7cfe18cf8..8c7230629923 100644 --- a/nixos/tests/signal-desktop.nix +++ b/nixos/tests/signal-desktop.nix @@ -29,7 +29,6 @@ in { environment.systemPackages = with pkgs; [ signal-desktop file sqlite sqlcipher-signal ]; - virtualisation.memorySize = 1024; }; enableOCR = true; diff --git a/nixos/tests/spark/default.nix b/nixos/tests/spark/default.nix index 254cdec6e6b0..025c5a5222e7 100644 --- a/nixos/tests/spark/default.nix +++ b/nixos/tests/spark/default.nix @@ -3,7 +3,6 @@ import ../make-test-python.nix ({...}: { nodes = { worker = { nodes, pkgs, ... }: { - virtualisation.memorySize = 1024; services.spark.worker = { enable = true; master = "master:7077"; diff --git a/nixos/tests/sway.nix b/nixos/tests/sway.nix index 01240ef572a6..3476ebab3e26 100644 --- a/nixos/tests/sway.nix +++ b/nixos/tests/sway.nix @@ -44,7 +44,6 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : # 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" ]; }; diff --git a/nixos/tests/sympa.nix b/nixos/tests/sympa.nix index eb38df180a78..aad7c95b6c99 100644 --- a/nixos/tests/sympa.nix +++ b/nixos/tests/sympa.nix @@ -5,7 +5,6 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { machine = { ... }: { - virtualisation.memorySize = 1024; services.sympa = { enable = true; diff --git a/nixos/tests/systemd-cryptenroll.nix b/nixos/tests/systemd-cryptenroll.nix index 2c436f2de890..49634ef65672 100644 --- a/nixos/tests/systemd-cryptenroll.nix +++ b/nixos/tests/systemd-cryptenroll.nix @@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, ... }: { 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" diff --git a/nixos/tests/systemd.nix b/nixos/tests/systemd.nix index e0685f53a945..6561f7efe1a5 100644 --- a/nixos/tests/systemd.nix +++ b/nixos/tests/systemd.nix @@ -5,7 +5,6 @@ import ./make-test-python.nix ({ pkgs, ... }: { imports = [ common/user-account.nix common/x11.nix ]; virtualisation.emptyDiskImages = [ 512 512 ]; - virtualisation.memorySize = 1024; environment.systemPackages = [ pkgs.cryptsetup ]; diff --git a/nixos/tests/vault-postgresql.nix b/nixos/tests/vault-postgresql.nix index a563aead22a3..071cfd106ffb 100644 --- a/nixos/tests/vault-postgresql.nix +++ b/nixos/tests/vault-postgresql.nix @@ -12,7 +12,6 @@ import ./make-test-python.nix ({ pkgs, ... }: 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; diff --git a/nixos/tests/vault.nix b/nixos/tests/vault.nix index c3b28b62695a..e86acd5b593f 100644 --- a/nixos/tests/vault.nix +++ b/nixos/tests/vault.nix @@ -8,7 +8,6 @@ import ./make-test-python.nix ({ pkgs, ... }: environment.systemPackages = [ pkgs.vault ]; environment.variables.VAULT_ADDR = "http://127.0.0.1:8200"; services.vault.enable = true; - virtualisation.memorySize = 512; }; testScript = diff --git a/nixos/tests/vaultwarden.nix b/nixos/tests/vaultwarden.nix index b5343f5cad2d..56f1d245d505 100644 --- a/nixos/tests/vaultwarden.nix +++ b/nixos/tests/vaultwarden.nix @@ -140,7 +140,6 @@ let in [ pkgs.firefox-unwrapped pkgs.geckodriver testRunner ]; - virtualisation.memorySize = 768; } ]; diff --git a/nixos/tests/xfce.nix b/nixos/tests/xfce.nix index 148eccdbe308..9051deebae76 100644 --- a/nixos/tests/xfce.nix +++ b/nixos/tests/xfce.nix @@ -23,7 +23,6 @@ import ./make-test-python.nix ({ pkgs, ...} : { 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 diff --git a/pkgs/applications/blockchains/bitcoin-knots/default.nix b/pkgs/applications/blockchains/bitcoin-knots/default.nix index eea836ac62d3..803e27969e7a 100644 --- a/pkgs/applications/blockchains/bitcoin-knots/default.nix +++ b/pkgs/applications/blockchains/bitcoin-knots/default.nix @@ -1,41 +1,83 @@ -{ lib, stdenv -, fetchFromGitHub -, pkg-config +{ lib +, stdenv +, fetchurl , autoreconfHook -, db5 -, openssl -, boost -, zlib -, miniupnpc -, libevent -, protobuf +, pkg-config , util-linux +, hexdump +, autoSignDarwinBinariesHook +, wrapQtAppsHook ? null +, boost +, libevent +, miniupnpc +, zeromq +, zlib +, db48 +, sqlite +, qrencode +, qtbase ? null +, qttools ? null +, python3 +, nixosTests +, withGui +, withWallet ? true }: +with lib; stdenv.mkDerivation rec { - pname = "bitcoind-knots"; - version = "0.20.0"; - versionDate = "20200614"; + pname = if withGui then "bitcoin-knots" else "bitcoind-knots"; + version = "22.0.knots20211108"; - src = fetchFromGitHub { - owner = "bitcoinknots"; - repo = "bitcoin"; - rev = "v${version}.knots${versionDate}"; - sha256 = "0c8k1154kcwz6q2803wx0zigvqaij1fi5akgfqlj3yl57jjw48jj"; + src = fetchurl { + url = "https://bitcoinknots.org/files/22.x/${version}/guix/bitcoin-${version}.tar.gz"; + sha256 = "04sqbx4sp3bzwbl8z53nz96n3s0590h327ih0mbgyvfvl3b8pj4i"; }; - nativeBuildInputs = [ pkg-config autoreconfHook ]; - buildInputs = [ openssl db5 openssl util-linux - protobuf boost zlib miniupnpc libevent ]; + nativeBuildInputs = + [ autoreconfHook pkg-config ] + ++ optionals stdenv.isLinux [ util-linux ] + ++ optionals stdenv.isDarwin [ hexdump ] + ++ optionals (stdenv.isDarwin && stdenv.isAarch64) [ autoSignDarwinBinariesHook ] + ++ optionals withGui [ wrapQtAppsHook ]; - configureFlags = [ "--with-incompatible-bdb" - "--with-boost-libdir=${boost.out}/lib" ]; + buildInputs = [ boost libevent miniupnpc zeromq zlib ] + ++ optionals withWallet [ db48 sqlite ] + ++ optionals withGui [ qrencode qtbase qttools ]; - meta = with lib; { - description = "An enhanced Bitcoin node software"; + configureFlags = [ + "--with-boost-libdir=${boost.out}/lib" + "--disable-bench" + ] ++ optionals (!doCheck) [ + "--disable-tests" + "--disable-gui-tests" + ] ++ optionals (!withWallet) [ + "--disable-wallet" + ] ++ optionals withGui [ + "--with-gui=qt5" + "--with-qt-bindir=${qtbase.dev}/bin:${qttools.dev}/bin" + ]; + + checkInputs = [ python3 ]; + + doCheck = true; + + checkFlags = + [ "LC_ALL=en_US.UTF-8" ] + # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. + # See also https://github.com/NixOS/nixpkgs/issues/24256 + ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; + + enableParallelBuilding = true; + + passthru.tests = { + smoke-test = nixosTests.bitcoind-knots; + }; + + meta = { + description = "A derivative of Bitcoin Core with a collection of improvements"; homepage = "https://bitcoinknots.org/"; + maintainers = with maintainers; [ prusnak mmahut ]; license = licenses.mit; - maintainers = [ maintainers.mmahut ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/pkgs/applications/blockchains/bitcoin/default.nix b/pkgs/applications/blockchains/bitcoin/default.nix index 7253d3dff377..e1a0dd207a0a 100644 --- a/pkgs/applications/blockchains/bitcoin/default.nix +++ b/pkgs/applications/blockchains/bitcoin/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { doCheck = true; checkFlags = - [ "LC_ALL=C.UTF-8" ] + [ "LC_ALL=en_US.UTF-8" ] # QT_PLUGIN_PATH needs to be set when executing QT, which is needed when testing Bitcoin's GUI. # See also https://github.com/NixOS/nixpkgs/issues/24256 ++ optional withGui "QT_PLUGIN_PATH=${qtbase}/${qtbase.qtPluginPrefix}"; diff --git a/pkgs/applications/graphics/fluxus/default.nix b/pkgs/applications/graphics/fluxus/default.nix index 3db183b2531a..70d35ed671bb 100644 --- a/pkgs/applications/graphics/fluxus/default.nix +++ b/pkgs/applications/graphics/fluxus/default.nix @@ -17,7 +17,7 @@ , ode , openal , openssl -, racket +, racket_7_9 , sconsPackages , zlib }: @@ -42,6 +42,7 @@ let openssl zlib ]; + racket = racket_7_9; in stdenv.mkDerivation rec { pname = "fluxus"; @@ -67,7 +68,7 @@ stdenv.mkDerivation rec { ode openal openssl.dev - racket + racket_7_9 ]; nativeBuildInputs = [ sconsPackages.scons_3_1_2 ]; diff --git a/pkgs/applications/graphics/hdr-plus/default.nix b/pkgs/applications/graphics/hdr-plus/default.nix index 15042e6877ff..0d2f19660062 100644 --- a/pkgs/applications/graphics/hdr-plus/default.nix +++ b/pkgs/applications/graphics/hdr-plus/default.nix @@ -22,6 +22,10 @@ stdenv.mkDerivation rec { }) ]; + postPatch = '' + sed -i '2a #include ' src/InputSource.h + ''; + nativeBuildInputs = [ cmake ]; buildInputs = [ halide libpng libjpeg libtiff libraw ]; diff --git a/pkgs/applications/graphics/krita/generic.nix b/pkgs/applications/graphics/krita/generic.nix index efaf341b1f64..a0819a203e72 100644 --- a/pkgs/applications/graphics/krita/generic.nix +++ b/pkgs/applications/graphics/krita/generic.nix @@ -32,7 +32,7 @@ mkDerivation rec { 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"; diff --git a/pkgs/applications/graphics/qvge/default.nix b/pkgs/applications/graphics/qvge/default.nix index f50e87d1eddb..442e3200e469 100644 --- a/pkgs/applications/graphics/qvge/default.nix +++ b/pkgs/applications/graphics/qvge/default.nix @@ -1,13 +1,15 @@ { lib -, mkDerivation +, stdenv , fetchFromGitHub , substituteAll +, wrapQtAppsHook , qmake +, qtsvg , qtx11extras , graphviz }: -mkDerivation rec { +stdenv.mkDerivation rec { pname = "qvge"; version = "0.6.3"; @@ -25,15 +27,15 @@ mkDerivation rec { 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; }; } diff --git a/pkgs/applications/networking/browsers/firefox/common.nix b/pkgs/applications/networking/browsers/firefox/common.nix index 1c0832e32ca2..b0d11bd835b6 100644 --- a/pkgs/applications/networking/browsers/firefox/common.nix +++ b/pkgs/applications/networking/browsers/firefox/common.nix @@ -27,7 +27,9 @@ , 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 @@ -71,6 +73,9 @@ # > 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; @@ -116,12 +121,6 @@ let }) 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 ({ @@ -174,10 +173,6 @@ 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 = '' @@ -206,6 +201,9 @@ buildStdenv.mkDerivation ({ ++ 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 @@ -229,7 +227,11 @@ buildStdenv.mkDerivation ({ ${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. @@ -273,7 +275,7 @@ buildStdenv.mkDerivation ({ # 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" @@ -287,9 +289,13 @@ buildStdenv.mkDerivation ({ ++ 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; @@ -297,14 +303,7 @@ buildStdenv.mkDerivation ({ 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 @@ -322,6 +321,42 @@ buildStdenv.mkDerivation ({ 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 .debug. + ln -sfn ".build-id/''${id:0:2}/''${id:2}.debug" "$dst/../$(basename "$i")" + done < <(find "$prefix" -type f -print0) + } + ''; + doInstallCheck = true; installCheckPhase = '' # Some basic testing diff --git a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix index 0e1f67800a20..c36d37ccfdf7 100644 --- a/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix +++ b/pkgs/applications/networking/browsers/tor-browser-bundle-bin/default.nix @@ -23,7 +23,7 @@ , pango , audioSupport ? mediaSupport -, pulseaudioSupport ? false +, pulseaudioSupport ? mediaSupport , libpulseaudio , apulse diff --git a/pkgs/applications/networking/droopy/default.nix b/pkgs/applications/networking/droopy/default.nix index 63afa5ce76f1..e6dca02dace7 100644 --- a/pkgs/applications/networking/droopy/default.nix +++ b/pkgs/applications/networking/droopy/default.nix @@ -18,6 +18,10 @@ stdenv.mkDerivation { url = "https://patch-diff.githubusercontent.com/raw/stackp/Droopy/pull/30.patch"; sha256 = "Y6jBraKvVQAiScbvLwezSKeWY3vaAbhaNXEGNaItigQ="; }) + (fetchpatch { + url = "https://patch-diff.githubusercontent.com/raw/stackp/Droopy/pull/31.patch"; + sha256 = "1ig054rxn5r0ph4w4fhmrxlh158c97iqqc7dbnc819adn9nw96l5"; + }) ]; nativeBuildInputs = [ wrapPython ]; diff --git a/pkgs/applications/networking/instant-messengers/jami/config/pjsip_patches b/pkgs/applications/networking/instant-messengers/jami/config/pjsip_patches index 2e106289a962..5b9579f8f94e 100644 --- a/pkgs/applications/networking/instant-messengers/jami/config/pjsip_patches +++ b/pkgs/applications/networking/instant-messengers/jami/config/pjsip_patches @@ -1,20 +1 @@ -0001-rfc6544.patch -0002-rfc2466.patch -0003-add-tcp-keep-alive.patch -0004-multiple_listeners.patch -0005-fix_ebusy_turn.patch -0006-ignore_ipv6_on_transport_check.patch -0007-upnp-srflx-nat-assisted-cand.patch -0008-fix_ioqueue_ipv6_sendto.patch 0009-add-config-site.patch -0010-fix-tcp-death-detection.patch -0011-fix-turn-shutdown-crash.patch -0012-ignore-down-interfaces.patch -0013-ignore-addresses-for-RFC7335.patch -0014-fix-socket-leak.patch -0015-fix-socktype-and-duplicate-checking.patch -0016-use-larger-Ta-interval.patch -0017-auto-register-thread.patch -0018-fix-ioqueue-lock-acquire.patch -0019-resort-check-list-after-adding-prflx.patch -0020-avoid-immediate-nominating-triggered-check.patch diff --git a/pkgs/applications/networking/instant-messengers/jami/daemon.nix b/pkgs/applications/networking/instant-messengers/jami/daemon.nix index 2fe6d7191e74..a324d061aa73 100644 --- a/pkgs/applications/networking/instant-messengers/jami/daemon.nix +++ b/pkgs/applications/networking/instant-messengers/jami/daemon.nix @@ -3,6 +3,7 @@ , jami-meta , stdenv , lib +, fetchFromGitHub , autoreconfHook , pkg-config , perl # for pod2man @@ -57,9 +58,15 @@ let pjsip-jami = pjsip.overrideAttrs (old: let + src-args = import ./pjproject-src.nix; + version = lib.concatStrings (lib.lists.take 7 (lib.stringToCharacters src-args.rev)); patch-src = src + "/daemon/contrib/src/pjproject/"; in { + inherit version; + + src = fetchFromGitHub src-args; + patches = old.patches ++ (map (x: patch-src + x) (readLinesToList ./config/pjsip_patches)); }); @@ -68,7 +75,8 @@ let enablePushNotifications = true; }; -in stdenv.mkDerivation { +in +stdenv.mkDerivation { pname = "jami-daemon"; inherit src version; sourceRoot = "source/daemon"; diff --git a/pkgs/applications/networking/instant-messengers/jami/default.nix b/pkgs/applications/networking/instant-messengers/jami/default.nix index ee9762a8f032..e3bf7054949d 100644 --- a/pkgs/applications/networking/instant-messengers/jami/default.nix +++ b/pkgs/applications/networking/instant-messengers/jami/default.nix @@ -8,11 +8,11 @@ }: rec { - version = "20211005.2.251ac7d"; + version = "20211104.2.e80361d"; src = fetchzip { url = "https://dl.jami.net/release/tarballs/jami_${version}.tar.gz"; - sha256 = "12ppbwhnk5zajb73szd04sz80bp17q577bkb9j8p45apvq201db3"; + sha256 = "1l48svppshh8mg7y1dymnh0rgwswy4qwdyl7qlg25mmh4y1li21f"; stripRoot = false; extraPostFetch = '' diff --git a/pkgs/applications/networking/instant-messengers/jami/pjproject-src.nix b/pkgs/applications/networking/instant-messengers/jami/pjproject-src.nix new file mode 100644 index 000000000000..168176924871 --- /dev/null +++ b/pkgs/applications/networking/instant-messengers/jami/pjproject-src.nix @@ -0,0 +1,6 @@ +{ + owner = "savoirfairelinux"; + repo = "pjproject"; + rev = "e1f389d0b905011e0cb62cbdf7a8b37fc1bcde1a"; + sha256 = "sha256-6t+3b7pvvwi+VD05vxtujabEJmWmJTAeyD/Dapav10Y="; +} diff --git a/pkgs/applications/networking/instant-messengers/jami/update.sh b/pkgs/applications/networking/instant-messengers/jami/update.sh index 22233a81bf8d..10d9bb885c35 100755 --- a/pkgs/applications/networking/instant-messengers/jami/update.sh +++ b/pkgs/applications/networking/instant-messengers/jami/update.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p coreutils curl gnused common-updater-scripts +#!nix-shell -i bash -p coreutils curl gnused common-updater-scripts nix-prefetch set -e @@ -40,3 +40,11 @@ echo "${ffmpeg_args_x86}" > "$config_dir/ffmpeg_args_x86" pjsip_patches=$(sed -n '/UNPACK/,/HAVE_ANDROID/p' ${src}/daemon/contrib/src/pjproject/rules.mak | sed -n -E 's/.*pjproject\/(00.*patch).*/\1/p') echo -e "Patches for pjsip:\n${pjsip_patches}\n" echo "${pjsip_patches}" > "$config_dir/pjsip_patches" + +# Update pjsip version +pjsip_version=$(sed -n -E 's/.*PJPROJECT_VERSION := ([0-9a-f]+).*/\1/p' ${src}/daemon/contrib/src/pjproject/rules.mak) +nix-prefetch fetchFromGitHub \ + --owner savoirfairelinux \ + --repo pjproject \ + --rev ${pjsip_version} \ + --output nix > "${jami_dir}/pjproject-src.nix" diff --git a/pkgs/applications/science/biology/hmmer/default.nix b/pkgs/applications/science/biology/hmmer/default.nix index 0f83178626bf..2a4df9d21dba 100644 --- a/pkgs/applications/science/biology/hmmer/default.nix +++ b/pkgs/applications/science/biology/hmmer/default.nix @@ -20,6 +20,7 @@ stdenv.mkDerivation rec { homepage = "http://hmmer.org/"; license = licenses.gpl3; maintainers = [ maintainers.iimog ]; - platforms = platforms.unix; + # at least SSE is *required* + platforms = platforms.x86_64; }; } diff --git a/pkgs/applications/science/logic/monosat/default.nix b/pkgs/applications/science/logic/monosat/default.nix index b26c122064a8..1356c88d478f 100644 --- a/pkgs/applications/science/logic/monosat/default.nix +++ b/pkgs/applications/science/logic/monosat/default.nix @@ -31,7 +31,7 @@ let # 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' ''; diff --git a/pkgs/applications/science/math/R/default.nix b/pkgs/applications/science/math/R/default.nix index 815d108ce412..d08078c356e1 100644 --- a/pkgs/applications/science/math/R/default.nix +++ b/pkgs/applications/science/math/R/default.nix @@ -35,7 +35,7 @@ stdenv.mkDerivation rec { # Test of the examples for package 'tcltk' fails in Darwin sandbox. See: # https://github.com/NixOS/nixpkgs/issues/146131 - prePatch = lib.optionalString stdenv.isDarwin '' + postPatch = lib.optionalString stdenv.isDarwin '' substituteInPlace configure \ --replace "-install_name libRblas.dylib" "-install_name $out/lib/R/lib/libRblas.dylib" \ --replace "-install_name libRlapack.dylib" "-install_name $out/lib/R/lib/libRlapack.dylib" \ diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix index fc1a2e0abf8c..4ba1d5c6b474 100644 --- a/pkgs/applications/science/math/pari/default.nix +++ b/pkgs/applications/science/math/pari/default.nix @@ -1,10 +1,11 @@ -{ lib, stdenv +{ lib +, stdenv , fetchurl , gmp -, readline , libX11 -, tex , perl +, readline +, tex , withThread ? true, libpthreadstubs }: @@ -12,7 +13,7 @@ assert withThread -> libpthreadstubs != null; stdenv.mkDerivation rec { pname = "pari"; - version = "2.13.1"; + version = "2.13.3"; src = fetchurl { urls = [ @@ -20,30 +21,25 @@ stdenv.mkDerivation rec { # old versions are at the url below "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/${pname}-${version}.tar.gz" ]; - sha256 = "sha256-gez31wzNquIwFlz/Ynyc4uwpe48i+fQHQiedhfht/LE="; + hash = "sha256-zLp/FgbGhU8UQ2N7tXrQlY1Bx/R1P4roRZ8dZMJnoco="; }; - patches = [ - # rebased version of 3edb98db78, see - # https://pari.math.u-bordeaux.fr/cgi-bin/bugreport.cgi?bug=2284 - ./rnfdisc.patch - ]; - buildInputs = [ gmp - readline libX11 - tex perl + readline + tex ] ++ lib.optionals withThread [ libpthreadstubs ]; configureScript = "./Configure"; configureFlags = [ - "--with-gmp=${gmp.dev}" - "--with-readline=${readline.dev}" - ] ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin" + "--with-gmp=${lib.getDev gmp}" + "--with-readline=${lib.getDev readline}" + ] + ++ lib.optional stdenv.isDarwin "--host=x86_64-darwin" ++ lib.optional withThread "--mt=pthread"; preConfigure = '' @@ -57,6 +53,7 @@ stdenv.mkDerivation rec { makeFlags = [ "all" ]; meta = with lib; { + homepage = "http://pari.math.u-bordeaux.fr"; description = "Computer algebra system for high-performance number theory computations"; longDescription = '' PARI/GP is a widely used computer algebra system designed for fast @@ -81,7 +78,6 @@ stdenv.mkDerivation rec { 3 or 4 times faster.) gp2c currently only understands a subset of the GP language. ''; - homepage = "http://pari.math.u-bordeaux.fr"; downloadPage = "http://pari.math.u-bordeaux.fr/download.html"; license = licenses.gpl2Plus; maintainers = with maintainers; [ ertes AndersonTorres ] ++ teams.sage.members; diff --git a/pkgs/applications/science/math/pari/gp2c.nix b/pkgs/applications/science/math/pari/gp2c.nix index 23183f83b36b..7f31543a925f 100644 --- a/pkgs/applications/science/math/pari/gp2c.nix +++ b/pkgs/applications/science/math/pari/gp2c.nix @@ -1,7 +1,9 @@ -{ lib, stdenv -, pari +{ lib +, stdenv , fetchurl -, perl }: +, pari +, perl +}: stdenv.mkDerivation rec { pname = "gp2c"; @@ -12,11 +14,15 @@ stdenv.mkDerivation rec { sha256 = "039ip7qkwwv46wrcdrz7y12m30kazzkjr44kqbc0h137g4wzd7zf"; }; - buildInputs = [ pari perl ]; + buildInputs = [ + pari + perl + ]; configureFlags = [ "--with-paricfg=${pari}/lib/pari/pari.cfg" - "--with-perl=${perl}/bin/perl" ]; + "--with-perl=${perl}/bin/perl" + ]; meta = with lib; { description = "A compiler to translate GP scripts to PARI programs"; diff --git a/pkgs/applications/science/math/pari/rnfdisc.patch b/pkgs/applications/science/math/pari/rnfdisc.patch deleted file mode 100644 index 6acac96481d5..000000000000 --- a/pkgs/applications/science/math/pari/rnfdisc.patch +++ /dev/null @@ -1,51 +0,0 @@ -commit 0d8a3ac970291c62b56104172418b3f2ca30927c -Author: Bill Allombert -Date: Sun Mar 28 13:27:24 2021 +0200 - - rnfdisc_factored: remove spurious Q_primpart [#2284] - -diff --git a/src/basemath/base2.c b/src/basemath/base2.c -index 7e7d0db9d..c461826f4 100644 ---- a/src/basemath/base2.c -+++ b/src/basemath/base2.c -@@ -3582,7 +3582,7 @@ rnfdisc_factored(GEN nf, GEN pol, GEN *pd) - - nf = checknf(nf); - pol = rnfdisc_get_T(nf, pol, &lim); -- disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, Q_primpart(pol))); -+ disc = nf_to_scalar_or_basis(nf, nfX_disc(nf, pol)); - pol = nfX_to_monic(nf, pol, NULL); - fa = idealfactor_partial(nf, disc, lim); - P = gel(fa,1); l = lg(P); -diff --git a/src/test/32/rnf b/src/test/32/rnf -index 1e743f415..c016dce00 100644 ---- a/src/test/32/rnf -+++ b/src/test/32/rnf -@@ -853,9 +853,10 @@ error("inconsistent dimensions in idealtwoelt.") - 0 - 0 - 1 --[[7361, 3786, 318, 5823; 0, 1, 0, 0; 0, 0, 1, 0; 0, 0, 0, 1], [-3, 6, -2, 0] --~] --[2, -1] -+[[433, 322, 318, 1318/17; 0, 1, 0, 12/17; 0, 0, 1, 5/17; 0, 0, 0, 1/17], [25 -+/17, -12/17, 12/17, 16/17]~] -+[1, -1] -+[[12, 0, 0, 0; 0, 12, 4, 0; 0, 0, 4, 0; 0, 0, 0, 4], [6, 5, -1, 2]~] - *** at top-level: rnfdedekind(nf,P,pr2,1) - *** ^----------------------- - *** rnfdedekind: sorry, Dedekind in the difficult case is not yet implemented. -diff --git a/src/test/in/rnf b/src/test/in/rnf -index 7851ae291..318d5349e 100644 ---- a/src/test/in/rnf -+++ b/src/test/in/rnf -@@ -212,6 +212,9 @@ k = nfinit(y^4 + 10*y^2 + 17); - rnfdisc(k, x^2 - x + 1/Mod(y,k.pol)) - rnfdisc(k, x^2 - x + 1/2) - -+k = nfinit(y^4 - 10*y^2 + 1); -+rnfdisc(k,x^2-(y^3/2+y^2-5*y/2+1)) -+ - \\ ERRORS, keep at end of file - rnfdedekind(nf, P, pr2, 1) - rnfdedekind(nf, P) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index ed10121e5cdf..4a912e002d97 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -23,6 +23,12 @@ let # branches (wip patches from tickets), but exports each commit as a separate # patch, so merge commits can lead to conflicts. Used if squashed == false. # + # The above is the preferred option. To use it, find a Trac ticket and pass the + # "Commit" field from the ticket as "rev", choosing "base" as an appropriate + # release tag, i.e. a tag that doesn't cause the patch to include a lot of + # unrelated changes. If there is no such tag (due to nonlinear history, for + # example), there are two other options, listed below. + # # 2) From GitHub's sagemath/sage repo. This lets us use a GH feature that allows # us to choose between a .patch file, with one patch per commit, or a .diff file, # which squashes all commits into a single diff. This is used if squashed == @@ -118,6 +124,14 @@ stdenv.mkDerivation rec { rev = "beed4e16aff32e47d0c3b1c58cb1e2f4c38590f8"; sha256 = "sha256-3eJPfWfCrCAQ5filIn7FbzjRQeO9QyTIVl/HyRuqFtE="; }) + + # https://trac.sagemath.org/ticket/32797 + (fetchSageDiff { + base = "9.5.beta7"; + name = "pari-2.13.3-update.patch"; + rev = "f5f7a86908daf60b25e66e6a189c51ada7e0a732"; + sha256 = "sha256-H/caGx3q4KcdsyGe+ojV9bUTQ5y0siqM+QHgDbeEnbw="; + }) ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; diff --git a/pkgs/applications/video/makemkv/default.nix b/pkgs/applications/video/makemkv/default.nix index 122274930367..26d80b1596c2 100644 --- a/pkgs/applications/video/makemkv/default.nix +++ b/pkgs/applications/video/makemkv/default.nix @@ -3,6 +3,7 @@ , fetchurl , autoPatchelfHook , pkg-config +, curl , ffmpeg , openssl , qtbase @@ -42,6 +43,8 @@ in mkDerivation { buildInputs = [ ffmpeg openssl qtbase zlib ]; + runtimeDependencies = [ (lib.getLib curl) ]; + qtWrapperArgs = let binPath = lib.makeBinPath [ jre_headless ]; diff --git a/pkgs/applications/video/mplayer/default.nix b/pkgs/applications/video/mplayer/default.nix index 644e35468fb5..1715ce4a6a17 100644 --- a/pkgs/applications/video/mplayer/default.nix +++ b/pkgs/applications/video/mplayer/default.nix @@ -174,7 +174,7 @@ stdenv.mkDerivation rec { (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" diff --git a/pkgs/applications/video/vdr/plugins.nix b/pkgs/applications/video/vdr/plugins.nix index 96b3733b02d6..f7eb5f201e85 100644 --- a/pkgs/applications/video/vdr/plugins.nix +++ b/pkgs/applications/video/vdr/plugins.nix @@ -62,6 +62,8 @@ in { postPatch = '' substituteInPlace vaapidev.c --replace /usr/bin/X ${xorgserver}/bin/X + # https://github.com/rofafor/vdr-plugin-vaapidevice/issues/5 + substituteInPlace Makefile --replace libva libva-x11 ''; src = fetchFromGitHub { diff --git a/pkgs/applications/window-managers/sway/default.nix b/pkgs/applications/window-managers/sway/default.nix index fb0cb31fad57..782bd360d730 100644 --- a/pkgs/applications/window-managers/sway/default.nix +++ b/pkgs/applications/window-managers/sway/default.nix @@ -22,19 +22,22 @@ stdenv.mkDerivation rec { }; patches = [ - ./sway-config-no-nix-store-references.patch ./load-configuration-from-etc.patch (substituteAll { src = ./fix-paths.patch; inherit swaybg; }) + ] ++ lib.optionals (!isNixOS) [ + # References to /nix/store/... will get GC'ed which causes problems when + # copying the default configuration: + ./sway-config-no-nix-store-references.patch + ] ++ lib.optionals isNixOS [ + # Use /run/current-system/sw/share and /etc instead of /nix/store + # references: + ./sway-config-nixos-paths.patch ]; - postPatch = lib.optionalString isNixOS '' - echo -e '\ninclude /etc/sway/config.d/*' >> config.in - ''; - nativeBuildInputs = [ meson ninja pkg-config wayland-scanner scdoc ]; @@ -47,7 +50,6 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Ddefault-wallpaper=false" "-Dsd-bus-provider=libsystemd" ] ++ lib.optional (!enableXWayland) "-Dxwayland=disabled" diff --git a/pkgs/applications/window-managers/sway/sway-config-nixos-paths.patch b/pkgs/applications/window-managers/sway/sway-config-nixos-paths.patch new file mode 100644 index 000000000000..bbb0f722b8bc --- /dev/null +++ b/pkgs/applications/window-managers/sway/sway-config-nixos-paths.patch @@ -0,0 +1,21 @@ +diff --git a/config.in b/config.in +index 08703bef..f3872730 100644 +--- a/config.in ++++ b/config.in +@@ -22,8 +22,8 @@ set $menu dmenu_path | dmenu | xargs swaymsg exec -- + + ### Output configuration + # +-# Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/) +-output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill ++# Default wallpaper (more resolutions are available in /run/current-system/sw/share/backgrounds/sway/) ++output * bg /run/current-system/sw/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill + # + # Example configuration: + # +@@ -214,4 +214,4 @@ bar { + } + } + +-include @sysconfdir@/sway/config.d/* ++include /etc/sway/config.d/* diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index 3ab4be4d8be2..e4d6f02a94bd 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -151,6 +151,7 @@ cpan = [ "https://cpan.metacpan.org/" "https://cpan.perl.org/" + "https://mirrors.kernel.org/CPAN/" "https://backpan.perl.org/" # for old releases ]; @@ -171,6 +172,7 @@ 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/" @@ -183,6 +185,7 @@ 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/" ]; @@ -206,6 +209,7 @@ "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/" ]; diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix index 2966675be7ca..3c9f3189d2cf 100644 --- a/pkgs/build-support/trivial-builders.nix +++ b/pkgs/build-support/trivial-builders.nix @@ -749,7 +749,7 @@ rec { { 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 ''; diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 09a56fda7b7f..3f176db36c2b 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -5,7 +5,7 @@ , 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 diff --git a/pkgs/data/themes/nordic/default.nix b/pkgs/data/themes/nordic/default.nix index 3fb2ae45f501..41189b21f499 100644 --- a/pkgs/data/themes/nordic/default.nix +++ b/pkgs/data/themes/nordic/default.nix @@ -2,70 +2,70 @@ stdenv.mkDerivation rec { pname = "nordic"; - version = "unstable-2021-08-13"; + version = "unstable-2021-11-19"; srcs = [ (fetchFromGitHub { owner = "EliverLara"; repo = pname; - rev = "937ca200e8148a61c73228030ec260abecc27fb2"; - sha256 = "0h7z7jh5p0916i9lx4n94r6vbydafnikdi6d9p4djvpyhn5nizgy"; + rev = "0112af91943b8819f7a1af9a508cda7fe3d74051"; + sha256 = "sha256-ccOA5/jXTx20495NpTgVu7DvsjfTEULqL3IyJ+Pd/ug"; name = "Nordic"; }) (fetchFromGitHub { owner = "EliverLara"; repo = pname; - rev = "e736846a130be7907e977b16d0b3a0ab19631015"; - sha256 = "0dv7z31zw1r3iac5bvwapf9lm99y5l0xfzaw93hn8msh10w5crx8"; + rev = "b30d2c844cc6ef5d020308f1c02791de45b607a7"; + sha256 = "sha256-g5yCCFXzipZLmUat+1r6QWHB7DWQvMKhMexHPV/DJHM"; name = "Nordic-standard-buttons"; }) (fetchFromGitHub { owner = "EliverLara"; repo = pname; - rev = "8ff12077f28e25f4e57f055a51e5e3b9b1bf53fd"; - sha256 = "082k0na39qb97kbvc15g3mdfh8d8ricql84i4wdjy3rjfbfwq0pl"; + rev = "6d38d6af363528f42619f663e3ecd4c08dfd2411"; + sha256 = "sha256-jaRiSE6yfTltzZ2vr8w4d+YtSz7REOcL7vOOhQvIMlQ"; name = "Nordic-darker"; }) (fetchFromGitHub { owner = "EliverLara"; repo = pname; - rev = "8c422e4bfdf5680ff323938f49f411680154d3d6"; - sha256 = "1w540zlmsxpwa455wpxy1dpgv2fjr36xwjqbyc8x4y0ya0qfify0"; + rev = "4142817c14c27b371d42796445bedc84dc94672c"; + sha256 = "sha256-FAb1+EREcwYrfSxAl6LrPaJtkHMt67NV3bG87g1cFT4"; name = "Nordic-darker-standard-buttons"; }) (fetchFromGitHub { owner = "EliverLara"; repo = pname; - rev = "ce31d794fe1c6b72d3cff2e9513e08ddce014118"; - sha256 = "09d41wllr9hgxshgvpgngx9rlg8pvx5aqgkk5q8jra4jz2a92fhq"; + rev = "2a91d6f3db70412b0a80ed33546fbe93075627d8"; + sha256 = "sha256-Su+amS7moc2IDONNvqw3bjL6Q0WLJWzHu6WvfcVDcDY"; name = "Nordic-bluish-accent"; }) (fetchFromGitHub { owner = "EliverLara"; repo = pname; - rev = "8ca4fe244c31775effacc77f0a25ae10c6bee60c"; - sha256 = "1cby8wmaqdqpd9c40wiy7i9wmrazwfhb3h818hg0ni7yfcm2fr58"; + rev = "3ebd334f97d638fdc888b16d69851e3ee31131f2"; + sha256 = "sha256-h0IXtWcdDvAEVi/1cLZF4Vacdl6VAY+5uo0LGPNe0bg"; name = "Nordic-bluish-accent-standard-buttons"; }) (fetchFromGitHub { owner = "EliverLara"; repo = "${pname}-polar"; - rev = "a2d1c633ac2bfe261e8f612c8af14af0311c7f67"; - sha256 = "05llvix671i6128vbr3jiik8mipaab7bn0v9i89ydwyfhw822n7v"; + rev = "803926882f8178c72b433466a377aaa33c5b372a"; + sha256 = "sha256-G7Vu03PoFOEU9uxb5JiHR4Tr8qk47fPo7Gg7Vt9Zzns"; name = "Nordic-Polar"; }) (fetchFromGitHub { owner = "EliverLara"; repo = "${pname}-polar"; - rev = "62a1702a17e7ea96e9b692832d68a0a7f26aabb6"; - sha256 = "0r1qn1rj322b44h15hcfbx79hhmb1m4pkv2fpdsn3s2klcxwr1ql"; + rev = "988cb8a16ece3901b8b0e7a5b86503400491cb1e"; + sha256 = "sha256-Zx1mrzJm5o4wQwOR8ZU2OEcjD3/6UXwLrBYpMtCkQbg"; name = "Nordic-Polar-standard-buttons"; }) ]; diff --git a/pkgs/desktops/gnome/core/gnome-software/default.nix b/pkgs/desktops/gnome/core/gnome-software/default.nix index 7ee3a51aba2e..61edbe9679d6 100644 --- a/pkgs/desktops/gnome/core/gnome-software/default.nix +++ b/pkgs/desktops/gnome/core/gnome-software/default.nix @@ -37,7 +37,7 @@ }: let - withFwupd = stdenv.isx86_64 || stdenv.isi686; + withFwupd = stdenv.hostPlatform.isx86; in stdenv.mkDerivation rec { diff --git a/pkgs/development/compilers/ocaml/ber-metaocaml.nix b/pkgs/development/compilers/ocaml/ber-metaocaml.nix index d3ab0d6e1c60..895706312c14 100644 --- a/pkgs/development/compilers/ocaml/ber-metaocaml.nix +++ b/pkgs/development/compilers/ocaml/ber-metaocaml.nix @@ -4,7 +4,7 @@ }: let - useX11 = stdenv.isi686 || stdenv.isx86_64; + useX11 = stdenv.hostPlatform.isx86; x11deps = [ libX11 xorgproto ]; inherit (lib) optionals; diff --git a/pkgs/development/compilers/sbcl/common.nix b/pkgs/development/compilers/sbcl/common.nix index d2450315eb59..9cfb38109f7b 100644 --- a/pkgs/development/compilers/sbcl/common.nix +++ b/pkgs/development/compilers/sbcl/common.nix @@ -2,8 +2,8 @@ { 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 ...` diff --git a/pkgs/development/interpreters/clisp/default.nix b/pkgs/development/interpreters/clisp/default.nix index 137ebbccbc71..2a387d34f470 100644 --- a/pkgs/development/interpreters/clisp/default.nix +++ b/pkgs/development/interpreters/clisp/default.nix @@ -9,8 +9,8 @@ , 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" diff --git a/pkgs/development/interpreters/clisp/hg.nix b/pkgs/development/interpreters/clisp/hg.nix index 83a1870d182b..7ab4134facb9 100644 --- a/pkgs/development/interpreters/clisp/hg.nix +++ b/pkgs/development/interpreters/clisp/hg.nix @@ -8,8 +8,8 @@ , 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" diff --git a/pkgs/development/interpreters/racket/racket_7_9.nix b/pkgs/development/interpreters/racket/racket_7_9.nix new file mode 100644 index 000000000000..8d33962f914c --- /dev/null +++ b/pkgs/development/interpreters/racket/racket_7_9.nix @@ -0,0 +1,111 @@ +{ lib, stdenv, fetchurl, makeFontsConf +, cacert +, cairo, coreutils, fontconfig, freefont_ttf +, glib, gmp +, gtk3 +, libedit, libffi +, libiconv +, libGL +, libGLU +, libjpeg +, libpng, libtool, mpfr, openssl, pango, poppler +, readline, sqlite +, disableDocs ? false +, CoreFoundation +, gsettings-desktop-schemas +, wrapGAppsHook +}: + +let + + fontsConf = makeFontsConf { + fontDirectories = [ freefont_ttf ]; + }; + + libPath = lib.makeLibraryPath [ + cairo + fontconfig + glib + gmp + gtk3 + gsettings-desktop-schemas + libedit + libGL + libGLU + libjpeg + libpng + mpfr + openssl + pango + poppler + readline + sqlite + ]; + +in + +stdenv.mkDerivation rec { + pname = "racket"; + version = "7.9"; # always change at once with ./minimal.nix + + src = (lib.makeOverridable ({ name, sha256 }: + fetchurl { + url = "https://mirror.racket-lang.org/installers/${version}/${name}-src.tgz"; + inherit sha256; + } + )) { + name = "${pname}-${version}"; + sha256 = "0gmp2ahmfd97nn9bwpfx9lznjmjkd042slnrrbdmyh59cqh98y2m"; + }; + + FONTCONFIG_FILE = fontsConf; + LD_LIBRARY_PATH = libPath; + NIX_LDFLAGS = lib.concatStringsSep " " [ + (lib.optionalString (stdenv.cc.isGNU && ! stdenv.isDarwin) "-lgcc_s") + (lib.optionalString stdenv.isDarwin "-framework CoreFoundation") + ]; + + nativeBuildInputs = [ cacert wrapGAppsHook ]; + + buildInputs = [ fontconfig libffi libtool sqlite gsettings-desktop-schemas gtk3 ] + ++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation ]; + + preConfigure = '' + unset AR + for f in src/lt/configure src/cs/c/configure src/bc/src/string.c; do + substituteInPlace "$f" --replace /usr/bin/uname ${coreutils}/bin/uname + done + mkdir src/build + cd src/build + + gappsWrapperArgs+=("--prefix" "LD_LIBRARY_PATH" ":" ${LD_LIBRARY_PATH}) + ''; + + shared = if stdenv.isDarwin then "dylib" else "shared"; + configureFlags = [ "--enable-${shared}" "--enable-lt=${libtool}/bin/libtool" ] + ++ lib.optional disableDocs [ "--disable-docs" ] + ++ lib.optional stdenv.isDarwin [ "--enable-xonx" ]; + + configureScript = "../configure"; + + enableParallelBuilding = false; + + + meta = with lib; { + description = "A programmable programming language"; + longDescription = '' + Racket is a full-spectrum programming language. It goes beyond + Lisp and Scheme with dialects that support objects, types, + laziness, and more. Racket enables programmers to link + components written in different dialects, and it empowers + programmers to create new, project-specific dialects. Racket's + libraries support applications from web servers and databases to + GUIs and charts. + ''; + homepage = "https://racket-lang.org/"; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ kkallio henrytill vrthra ]; + platforms = [ "x86_64-darwin" "x86_64-linux" "aarch64-linux" ]; + broken = stdenv.isDarwin; # No support yet for setting FFI lookup path + }; +} diff --git a/pkgs/development/libraries/SDL2_gfx/default.nix b/pkgs/development/libraries/SDL2_gfx/default.nix index 783dedc5c78d..3d599c39c05b 100644 --- a/pkgs/development/libraries/SDL2_gfx/default.nix +++ b/pkgs/development/libraries/SDL2_gfx/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { 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; { diff --git a/pkgs/development/libraries/adns/default.nix b/pkgs/development/libraries/adns/default.nix index 4b929cdb7f0f..50483758beb5 100644 --- a/pkgs/development/libraries/adns/default.nix +++ b/pkgs/development/libraries/adns/default.nix @@ -15,6 +15,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ gnum4 ]; + configureFlags = lib.optional stdenv.hostPlatform.isStatic "--disable-dynamic"; + preConfigure = lib.optionalString stdenv.isDarwin "sed -i -e 's|-Wl,-soname=$(SHLIBSONAME)||' configure"; diff --git a/pkgs/development/libraries/ctl/default.nix b/pkgs/development/libraries/ctl/default.nix index be643e3a52c6..0a9f50a6aaa6 100644 --- a/pkgs/development/libraries/ctl/default.nix +++ b/pkgs/development/libraries/ctl/default.nix @@ -19,6 +19,16 @@ stdenv.mkDerivation rec { }) ]; + postPatch = '' + # Fix include guard name + substituteInPlace lib/dpx/dpx_raw.hh \ + --replace CRL_DPX_RAW_INTERNAL_INCLUDE CTL_DPX_RAW_INTERNAL_INCLUDE + + # Fix undefined symbols (link with Imath) + substituteInPlace lib/IlmCtlMath/CMakeLists.txt \ + --replace "( IlmCtlMath IlmCtl )" "( IlmCtlMath IlmCtl Imath)" + ''; + nativeBuildInputs = [ cmake pkg-config ]; buildInputs = [ libtiff ilmbase openexr ]; diff --git a/pkgs/development/libraries/glibc/common.nix b/pkgs/development/libraries/glibc/common.nix index 91281f9cd244..57c2e259e066 100644 --- a/pkgs/development/libraries/glibc/common.nix +++ b/pkgs/development/libraries/glibc/common.nix @@ -161,7 +161,7 @@ stdenv.mkDerivation ({ "--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. diff --git a/pkgs/development/libraries/isl/0.11.1.nix b/pkgs/development/libraries/isl/0.11.1.nix index 5beffd1f0d2e..a11d9eca6a6e 100644 --- a/pkgs/development/libraries/isl/0.11.1.nix +++ b/pkgs/development/libraries/isl/0.11.1.nix @@ -1,22 +1,8 @@ -{ lib, stdenv, fetchurl, gmp }: - -stdenv.mkDerivation { - name = "isl-0.11.1"; # CLooG 0.16.3 fails to build with ISL 0.08. - - src = fetchurl { - url = "https://src.fedoraproject.org/repo/pkgs/gcc/isl-0.11.1.tar.bz2/bce1586384d8635a76d2f017fb067cd2/isl-0.11.1.tar.bz2"; - sha256 = "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"; - }; - - buildInputs = [ gmp ]; +import ./generic.nix { + version = "0.11.1"; + urls = [ + "https://src.fedoraproject.org/repo/pkgs/gcc/isl-0.11.1.tar.bz2/bce1586384d8635a76d2f017fb067cd2/isl-0.11.1.tar.bz2" + ]; + sha256 = "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"; patches = [ ./fix-gcc-build.diff ]; - - enableParallelBuilding = true; - - meta = { - homepage = "https://www.kotnet.org/~skimo/isl/"; - license = lib.licenses.lgpl21; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; - platforms = lib.platforms.all; - }; } diff --git a/pkgs/development/libraries/isl/0.14.1.nix b/pkgs/development/libraries/isl/0.14.1.nix index 87243def1796..1a368d2523e0 100644 --- a/pkgs/development/libraries/isl/0.14.1.nix +++ b/pkgs/development/libraries/isl/0.14.1.nix @@ -1,24 +1,8 @@ -{ lib, stdenv, fetchurl, gmp }: - -stdenv.mkDerivation rec { - name = "isl-0.14.1"; - - src = fetchurl { - urls = [ - "mirror://sourceforge/libisl/${name}.tar.xz" - "https://libisl.sourceforge.io/${name}.tar.xz" - ]; - sha256 = "0xa6xagah5rywkywn19rzvbvhfvkmylhcxr6z9z7bz29cpiwk0l8"; - }; - - buildInputs = [ gmp ]; - - enableParallelBuilding = true; - - meta = { - homepage = "https://www.kotnet.org/~skimo/isl/"; - license = lib.licenses.lgpl21; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; - platforms = lib.platforms.all; - }; +import ./generic.nix rec { + version = "0.14.1"; + urls = [ + "mirror://sourceforge/libisl/isl-${version}.tar.xz" + "https://libisl.sourceforge.io/isl-${version}.tar.xz" + ]; + sha256 = "0xa6xagah5rywkywn19rzvbvhfvkmylhcxr6z9z7bz29cpiwk0l8"; } diff --git a/pkgs/development/libraries/isl/0.17.1.nix b/pkgs/development/libraries/isl/0.17.1.nix index a066655d4a05..2e0110df786e 100644 --- a/pkgs/development/libraries/isl/0.17.1.nix +++ b/pkgs/development/libraries/isl/0.17.1.nix @@ -1,24 +1,8 @@ -{ lib, stdenv, fetchurl, gmp }: - -stdenv.mkDerivation rec { - name = "isl-0.17.1"; - - src = fetchurl { - urls = [ - "mirror://sourceforge/libisl/${name}.tar.xz" - "https://libisl.sourceforge.io/${name}.tar.xz" - ]; - sha256 = "be152e5c816b477594f4c6194b5666d8129f3a27702756ae9ff60346a8731647"; - }; - - buildInputs = [ gmp ]; - - enableParallelBuilding = true; - - meta = { - homepage = "https://www.kotnet.org/~skimo/isl/"; - license = lib.licenses.lgpl21; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; - platforms = lib.platforms.all; - }; +import ./generic.nix rec { + version = "0.17.1"; + urls = [ + "mirror://sourceforge/libisl/isl-${version}.tar.xz" + "https://libisl.sourceforge.io/isl-${version}.tar.xz" + ]; + sha256 = "be152e5c816b477594f4c6194b5666d8129f3a27702756ae9ff60346a8731647"; } diff --git a/pkgs/development/libraries/isl/0.20.0.nix b/pkgs/development/libraries/isl/0.20.0.nix index d68637ddbcde..d7567bebf298 100644 --- a/pkgs/development/libraries/isl/0.20.0.nix +++ b/pkgs/development/libraries/isl/0.20.0.nix @@ -1,29 +1,11 @@ -{ lib, stdenv, fetchurl, gmp }: - -stdenv.mkDerivation rec { - name = "isl-0.20"; - - src = fetchurl { - urls = [ - "mirror://sourceforge/libisl/${name}.tar.xz" - "https://libisl.sourceforge.io/${name}.tar.xz" - ]; - - sha256 = "1akpgq0rbqbah5517blg2zlnfvjxfcl9cjrfc75nbcx5p2gnlnd5"; - }; - - buildInputs = [ gmp ]; - +import ./generic.nix rec { + version = "0.20"; + urls = [ + "mirror://sourceforge/libisl/isl-${version}.tar.xz" + "https://libisl.sourceforge.io/isl-${version}.tar.xz" + ]; + sha256 = "1akpgq0rbqbah5517blg2zlnfvjxfcl9cjrfc75nbcx5p2gnlnd5"; configureFlags = [ "--with-gcc-arch=generic" # don't guess -march=/mtune= ]; - - enableParallelBuilding = true; - - meta = { - homepage = "http://isl.gforge.inria.fr/"; - license = lib.licenses.lgpl21; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; - platforms = lib.platforms.all; - }; } diff --git a/pkgs/development/libraries/isl/0.24.0.nix b/pkgs/development/libraries/isl/0.24.0.nix new file mode 100644 index 000000000000..90eb5ec0fac2 --- /dev/null +++ b/pkgs/development/libraries/isl/0.24.0.nix @@ -0,0 +1,11 @@ +import ./generic.nix rec { + version = "0.24"; + urls = [ + "mirror://sourceforge/libisl/isl-${version}.tar.xz" + "https://libisl.sourceforge.io/isl-${version}.tar.xz" + ]; + sha256 = "1bgbk6n93qqn7w8v21kxf4x6dc3z0ypqrzvgfd46nhagak60ac84"; + configureFlags = [ + "--with-gcc-arch=generic" # don't guess -march=/mtune= + ]; +} diff --git a/pkgs/development/libraries/isl/generic.nix b/pkgs/development/libraries/isl/generic.nix new file mode 100644 index 000000000000..eb6fe5f9cd69 --- /dev/null +++ b/pkgs/development/libraries/isl/generic.nix @@ -0,0 +1,32 @@ +{ version +, urls +, sha256 +, configureFlags ? [] +, patches ? [] +}: + +{ lib, stdenv, fetchurl, gmp +}: + +stdenv.mkDerivation { + name = "isl-${version}"; + + src = fetchurl { + inherit urls sha256; + }; + + inherit patches; + + buildInputs = [ gmp ]; + + inherit configureFlags; + + enableParallelBuilding = true; + + meta = { + homepage = "https://libisl.sourceforge.io/"; + license = lib.licenses.lgpl21; + description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/development/libraries/java/gwt-dragdrop/builder.sh b/pkgs/development/libraries/java/gwt-dragdrop/builder.sh deleted file mode 100644 index d37e110011e8..000000000000 --- a/pkgs/development/libraries/java/gwt-dragdrop/builder.sh +++ /dev/null @@ -1,4 +0,0 @@ -source $stdenv/setup - -mkdir -p $out/share/java -cp $src $out/share/java/$name.jar diff --git a/pkgs/development/libraries/java/gwt-dragdrop/default.nix b/pkgs/development/libraries/java/gwt-dragdrop/default.nix index 34a0e8c530a4..a7270bbfa2ba 100644 --- a/pkgs/development/libraries/java/gwt-dragdrop/default.nix +++ b/pkgs/development/libraries/java/gwt-dragdrop/default.nix @@ -1,14 +1,25 @@ -{lib, stdenv, fetchurl}: +{ lib, stdenv, fetchurl }: -stdenv.mkDerivation { - name = "gwt-dnd-2.6.5"; - builder = ./builder.sh; +stdenv.mkDerivation rec { + pname = "gwt-dnd"; + version = "2.6.5"; src = fetchurl { - url = "http://gwt-dnd.googlecode.com/files/gwt-dnd-2.6.5.jar"; + url = "http://gwt-dnd.googlecode.com/files/gwt-dnd-${version}.jar"; sha256 = "07zdlr8afs499asnw0dcjmw1cnjc646v91lflx5dv4qj374c97fw"; }; + dontUnpack = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out/share/java + cp $src $out/share/java/$name.jar + + runHook postInstall + ''; + meta = with lib; { platforms = platforms.unix; license = licenses.asl20; diff --git a/pkgs/development/libraries/java/gwt-widgets/builder.sh b/pkgs/development/libraries/java/gwt-widgets/builder.sh deleted file mode 100644 index 8c2502385f2b..000000000000 --- a/pkgs/development/libraries/java/gwt-widgets/builder.sh +++ /dev/null @@ -1,6 +0,0 @@ -source $stdenv/setup - -tar xfvz $src -cd gwt-widgets-* -mkdir -p $out/share/java -cp gwt-widgets-*.jar $out/share/java diff --git a/pkgs/development/libraries/java/gwt-widgets/default.nix b/pkgs/development/libraries/java/gwt-widgets/default.nix index 692326a21895..ebba8548016e 100644 --- a/pkgs/development/libraries/java/gwt-widgets/default.nix +++ b/pkgs/development/libraries/java/gwt-widgets/default.nix @@ -1,14 +1,23 @@ -{lib, stdenv, fetchurl}: +{ lib, stdenv, fetchurl }: -stdenv.mkDerivation { - name = "gwt-widgets-0.2.0"; - builder = ./builder.sh; +stdenv.mkDerivation rec { + pname = "gwt-widgets"; + version = "0.2.0"; src = fetchurl { - url = "mirror://sourceforge/gwt-widget/gwt-widgets-0.2.0-bin.tar.gz"; + url = "mirror://sourceforge/gwt-widget/gwt-widgets-${version}-bin.tar.gz"; sha256 = "09isj4j6842rj13nv8264irkjjhvmgihmi170ciabc98911bakxb"; }; + installPhase = '' + runHook preInstall + + mkdir -p $out/share/java + cp gwt-widgets-*.jar $out/share/java + + runHook postInstall + ''; + meta = with lib; { platforms = platforms.unix; license = with licenses; [ afl21 lgpl2 ]; diff --git a/pkgs/development/libraries/libasyncns/default.nix b/pkgs/development/libraries/libasyncns/default.nix index c94e1c04e0ba..423b8cca6915 100644 --- a/pkgs/development/libraries/libasyncns/default.nix +++ b/pkgs/development/libraries/libasyncns/default.nix @@ -9,6 +9,11 @@ stdenv.mkDerivation rec { sha256 = "0x5b6lcic4cd7q0bx00x93kvpyzl7n2abbgvqbrlzrfb8vknc6jg"; }; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace libasyncns/asyncns.c \ + --replace '' '' + ''; + configureFlags = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "ac_cv_func_malloc_0_nonnull=yes" "ac_cv_func_realloc_0_nonnull=yes" diff --git a/pkgs/development/libraries/libgphoto2/default.nix b/pkgs/development/libraries/libgphoto2/default.nix index 3e3fa1a725bf..666135f91bb9 100644 --- a/pkgs/development/libraries/libgphoto2/default.nix +++ b/pkgs/development/libraries/libgphoto2/default.nix @@ -1,7 +1,9 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, gettext +{ lib, stdenv, fetchFromGitHub, buildPackages +, autoreconfHook, pkg-config, gettext , libusb1 , libtool , libexif +, libgphoto2 , libjpeg }: @@ -16,17 +18,17 @@ stdenv.mkDerivation rec { sha256 = "sha256-c7fBl6GBLAU+RL5WFC4PL+n/nEHZUfqIJ9qq1+qNNCg="; }; - patches = []; + depsBuildBuild = [ pkg-config ]; nativeBuildInputs = [ autoreconfHook - pkg-config gettext libtool ]; buildInputs = [ libjpeg + libtool # for libltdl libusb1 ]; @@ -35,9 +37,16 @@ stdenv.mkDerivation rec { 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 = { diff --git a/pkgs/development/libraries/libimagequant/default.nix b/pkgs/development/libraries/libimagequant/default.nix index 8a5751411486..348f610bf183 100644 --- a/pkgs/development/libraries/libimagequant/default.nix +++ b/pkgs/development/libraries/libimagequant/default.nix @@ -15,7 +15,7 @@ stdenv.mkDerivation rec { 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/"; diff --git a/pkgs/development/libraries/libite/default.nix b/pkgs/development/libraries/libite/default.nix index 4ffb7a5f7fbc..3c1d1e890207 100644 --- a/pkgs/development/libraries/libite/default.nix +++ b/pkgs/development/libraries/libite/default.nix @@ -15,7 +15,6 @@ stdenv.mkDerivation rec { 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 @@ -29,7 +28,8 @@ stdenv.mkDerivation rec { _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 ]; }; diff --git a/pkgs/development/libraries/libqb/default.nix b/pkgs/development/libraries/libqb/default.nix index 73938bd8f973..bb3f568b1cf8 100644 --- a/pkgs/development/libraries/libqb/default.nix +++ b/pkgs/development/libraries/libqb/default.nix @@ -15,6 +15,10 @@ stdenv.mkDerivation rec { buildInputs = [ libxml2 ]; + postPatch = '' + sed -i '/# --enable-new-dtags:/,/--enable-new-dtags is required/ d' configure.ac + ''; + meta = with lib; { homepage = "https://github.com/clusterlabs/libqb"; description = "A library providing high performance logging, tracing, ipc, and poll"; diff --git a/pkgs/development/libraries/libtsm/default.nix b/pkgs/development/libraries/libtsm/default.nix index d959306c9718..9c8e418fba4f 100644 --- a/pkgs/development/libraries/libtsm/default.nix +++ b/pkgs/development/libraries/libtsm/default.nix @@ -20,6 +20,6 @@ stdenv.mkDerivation rec { homepage = "http://www.freedesktop.org/wiki/Software/kmscon/libtsm/"; license = licenses.mit; maintainers = with maintainers; [ cstrahan ]; - platforms = with platforms; unix; + platforms = platforms.linux; }; } diff --git a/pkgs/development/libraries/opencolorio/1.x.nix b/pkgs/development/libraries/opencolorio/1.x.nix index 041ddf8e8371..1b58faf54438 100644 --- a/pkgs/development/libraries/opencolorio/1.x.nix +++ b/pkgs/development/libraries/opencolorio/1.x.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # 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/ diff --git a/pkgs/development/libraries/pcl/default.nix b/pkgs/development/libraries/pcl/default.nix index 8afcdbf33f23..bbc2bd8cc6f3 100644 --- a/pkgs/development/libraries/pcl/default.nix +++ b/pkgs/development/libraries/pcl/default.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { # 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 ''; diff --git a/pkgs/development/libraries/physics/cernlib/default.nix b/pkgs/development/libraries/physics/cernlib/default.nix index 84657d726797..f953b663143d 100644 --- a/pkgs/development/libraries/physics/cernlib/default.nix +++ b/pkgs/development/libraries/physics/cernlib/default.nix @@ -23,6 +23,8 @@ stdenv.mkDerivation rec { --replace "# define MakeCmd gmake" "# define MakeCmd make" substituteInPlace 2006/src/config/lnxLib.rules \ --replace "# lib" "// lib" + # binutils 2.37 fix + substituteInPlace 2006/src/config/Imake.tmpl --replace "clq" "cq" ''; configurePhase = '' @@ -39,12 +41,12 @@ stdenv.mkDerivation rec { cd $CERN_ROOT/build $CVSCOSRC/config/imake_boot - make bin/kuipc - make scripts/Makefile + make -j $NIX_BUILD_CORES bin/kuipc + make -j $NIX_BUILD_CORES scripts/Makefile pushd scripts - make install.bin + make -j $NIX_BUILD_CORES install.bin popd - make + make -j $NIX_BUILD_CORES ''; installPhase = '' diff --git a/pkgs/development/libraries/x264/default.nix b/pkgs/development/libraries/x264/default.nix index 57d0c0a4d632..2c9f476313ec 100644 --- a/pkgs/development/libraries/x264/default.nix +++ b/pkgs/development/libraries/x264/default.nix @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { ++ 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"; diff --git a/pkgs/development/python-modules/aiopvpc/default.nix b/pkgs/development/python-modules/aiopvpc/default.nix index 74c85eb11a24..b3f24e6051a4 100644 --- a/pkgs/development/python-modules/aiopvpc/default.nix +++ b/pkgs/development/python-modules/aiopvpc/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "aiopvpc"; - version = "2.2.2"; + version = "2.2.4"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -24,7 +24,7 @@ buildPythonPackage rec { owner = "azogue"; repo = pname; rev = "v${version}"; - sha256 = "sha256-wNMHzeKJ1kG0jnoI5fO3d5CBXE0cyoK92BkGunXK3pI="; + sha256 = "sha256-39cGDbaBS5we+WbqvABe6tKwTmbgd+NYLssKQCOuBsc="; }; nativeBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-eventhub/default.nix b/pkgs/development/python-modules/azure-eventhub/default.nix index bf0a27bf1d2c..95910a66e82e 100644 --- a/pkgs/development/python-modules/azure-eventhub/default.nix +++ b/pkgs/development/python-modules/azure-eventhub/default.nix @@ -7,12 +7,12 @@ buildPythonPackage rec { pname = "azure-eventhub"; - version = "5.6.0"; + version = "5.6.1"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "aa6d9e3e9b8b1a5ad211a828de867b85910720722577a4d51cd5aa6889d1d9e9"; + sha256 = "sha256-ssjTesjPFITaB5Uy061podqL14ojeCIVm3LWsF3kY40="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/azure-servicebus/default.nix b/pkgs/development/python-modules/azure-servicebus/default.nix index 99ff8bbb4e68..bf474c031438 100644 --- a/pkgs/development/python-modules/azure-servicebus/default.nix +++ b/pkgs/development/python-modules/azure-servicebus/default.nix @@ -1,29 +1,32 @@ { lib -, buildPythonPackage -, fetchPypi -, uamqp , azure-common , azure-core -, msrestazure +, buildPythonPackage +, fetchPypi , futures ? null +, isodate , isPy3k +, msrestazure +, uamqp }: buildPythonPackage rec { pname = "azure-servicebus"; - version = "7.3.3"; + version = "7.4.0"; + format = "setuptools"; src = fetchPypi { inherit pname version; extension = "zip"; - sha256 = "1c2133909a086bd4329135d6affcc05628e3a7da27afca584a0de8c21fc4e1ac"; + sha256 = "sha256-nlt4wNHI613tK7JB85fBW2LE/FOa8+2aLeT6wzP1PQ4="; }; propagatedBuildInputs = [ - uamqp azure-common azure-core + isodate msrestazure + uamqp ] ++ lib.optionals (!isPy3k) [ futures ]; @@ -32,7 +35,9 @@ buildPythonPackage rec { doCheck = false; # python2 will fail due to pep 420 - pythonImportsCheck = lib.optionals isPy3k [ "azure.servicebus" ]; + pythonImportsCheck = lib.optionals isPy3k [ + "azure.servicebus" + ]; meta = with lib; { description = "Microsoft Azure Service Bus Client Library"; diff --git a/pkgs/development/python-modules/casbin/default.nix b/pkgs/development/python-modules/casbin/default.nix index 9150e1c5298b..64c69ddaa043 100644 --- a/pkgs/development/python-modules/casbin/default.nix +++ b/pkgs/development/python-modules/casbin/default.nix @@ -9,7 +9,7 @@ buildPythonPackage rec { pname = "casbin"; - version = "1.9.7"; + version = "1.11.1"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -18,7 +18,7 @@ buildPythonPackage rec { owner = pname; repo = "pycasbin"; rev = "v${version}"; - sha256 = "sha256-wNygKs37PtMLij3f+pAh6PNLqQ45cvrpF43Aj+cO8p8="; + sha256 = "sha256-gFGYpHd1kp4JMtoe47VbJ0uDnuGQegggbjXaw6nEMR4="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/env-canada/default.nix b/pkgs/development/python-modules/env-canada/default.nix index 23dbf63df691..587dcf149231 100644 --- a/pkgs/development/python-modules/env-canada/default.nix +++ b/pkgs/development/python-modules/env-canada/default.nix @@ -8,18 +8,22 @@ , 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 = [ @@ -49,7 +53,9 @@ buildPythonPackage rec { "test_ecradar" ]; - pythonImportsCheck = [ "env_canada" ]; + pythonImportsCheck = [ + "env_canada" + ]; meta = with lib; { description = "Python library to get Environment Canada weather data"; diff --git a/pkgs/development/python-modules/envisage/default.nix b/pkgs/development/python-modules/envisage/default.nix index 20051804328b..b8513fd1d9ae 100644 --- a/pkgs/development/python-modules/envisage/default.nix +++ b/pkgs/development/python-modules/envisage/default.nix @@ -1,7 +1,12 @@ -{ lib, fetchPypi, isPy27 +{ lib +, fetchPypi +, isPy27 , buildPythonPackage -, traits, apptools, pytestCheckHook -, ipykernel, ipython, setuptools +, traits +, apptools +, pytestCheckHook +, ipython +, setuptools }: buildPythonPackage rec { @@ -15,6 +20,8 @@ buildPythonPackage rec { sha256 = "8864c29aa344f7ac26eeb94788798f2d0cc791dcf95c632da8d79ebc580e114c"; }; + # for the optional dependency ipykernel, only versions < 6 are + # supported, so it's not included in the tests, and not propagated propagatedBuildInputs = [ traits apptools setuptools ]; preCheck = '' @@ -22,7 +29,8 @@ buildPythonPackage rec { ''; checkInputs = [ - ipykernel ipython pytestCheckHook + ipython + pytestCheckHook ]; meta = with lib; { diff --git a/pkgs/development/python-modules/flux-led/default.nix b/pkgs/development/python-modules/flux-led/default.nix index 58f23fba931c..be3dab8bdfd8 100644 --- a/pkgs/development/python-modules/flux-led/default.nix +++ b/pkgs/development/python-modules/flux-led/default.nix @@ -7,8 +7,9 @@ }: buildPythonPackage rec { - pname = "flux_led"; - version = "0.24.24"; + pname = "flux-led"; + version = "0.24.25"; + format = "setuptools"; disabled = pythonOlder "3.7"; @@ -16,7 +17,7 @@ buildPythonPackage rec { owner = "Danielhiversen"; repo = "flux_led"; rev = version; - sha256 = "sha256-99EHmhyc6lAjYPHFvvqnd5r8HeEEJM6W3VK0/yLsz7I="; + sha256 = "sha256-HhoqsdaqNKdKH63glYEl5mRBFImu6Nxw5gwF7JAJABk="; }; propagatedBuildInputs = [ diff --git a/pkgs/development/python-modules/keyutils/default.nix b/pkgs/development/python-modules/keyutils/default.nix index 3d1575d8c37f..21eeb11d136c 100644 --- a/pkgs/development/python-modules/keyutils/default.nix +++ b/pkgs/development/python-modules/keyutils/default.nix @@ -12,6 +12,10 @@ buildPythonPackage rec { sha256 = "0pfqfr5xqgsqkxzrmj8xl2glyl4nbq0irs0k6ik7iy3gd3mxf5g1"; }; + postPatch = '' + substituteInPlace setup.py --replace '"pytest-runner"' "" + ''; + buildInputs = [ keyutils ]; checkInputs = [ pytest pytest-runner ]; diff --git a/pkgs/development/python-modules/libasyncns/default.nix b/pkgs/development/python-modules/libasyncns/default.nix index 38ca9b26360c..bd28c2207340 100644 --- a/pkgs/development/python-modules/libasyncns/default.nix +++ b/pkgs/development/python-modules/libasyncns/default.nix @@ -1,5 +1,10 @@ -{ lib, buildPythonPackage, fetchurl -, libasyncns, pkg-config }: +{ lib +, stdenv +, buildPythonPackage +, fetchurl +, libasyncns +, pkg-config +}: buildPythonPackage rec { pname = "libasyncns-python"; @@ -12,10 +17,17 @@ buildPythonPackage rec { patches = [ ./libasyncns-fix-res-consts.patch ]; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace resquery.c \ + --replace '' '' + ''; + buildInputs = [ libasyncns ]; nativeBuildInputs = [ pkg-config ]; doCheck = false; # requires network access + pythonImportsCheck = [ "libasyncns" ]; + meta = with lib; { description = "libasyncns-python is a python binding for the asynchronous name service query library"; license = licenses.lgpl21; diff --git a/pkgs/development/python-modules/llfuse/default.nix b/pkgs/development/python-modules/llfuse/default.nix index 44aa9136b07c..cbf7e84c7203 100644 --- a/pkgs/development/python-modules/llfuse/default.nix +++ b/pkgs/development/python-modules/llfuse/default.nix @@ -31,8 +31,13 @@ buildPythonPackage rec { propagatedBuildInputs = [ contextlib2 ]; + preConfigure = '' + substituteInPlace setup.py \ + --replace "'pkg-config'" "'${stdenv.cc.targetPrefix}pkg-config'" + ''; + preBuild = '' - ${python.interpreter} setup.py build_cython + ${python.pythonForBuild.interpreter} setup.py build_cython ''; # On Darwin, the test requires macFUSE to be installed outside of Nix. diff --git a/pkgs/development/python-modules/oath/default.nix b/pkgs/development/python-modules/oath/default.nix index fd12a830472b..a8740f685747 100644 --- a/pkgs/development/python-modules/oath/default.nix +++ b/pkgs/development/python-modules/oath/default.nix @@ -1,16 +1,25 @@ { 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"; diff --git a/pkgs/development/python-modules/pyads/default.nix b/pkgs/development/python-modules/pyads/default.nix index 232221365fa4..a22e85154261 100644 --- a/pkgs/development/python-modules/pyads/default.nix +++ b/pkgs/development/python-modules/pyads/default.nix @@ -8,14 +8,16 @@ 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 = [ @@ -31,7 +33,9 @@ buildPythonPackage rec { pytestCheckHook ]; - pythonImportsCheck = [ "pyads" ]; + pythonImportsCheck = [ + "pyads" + ]; meta = with lib; { description = "Python wrapper for TwinCAT ADS library"; diff --git a/pkgs/development/python-modules/pyahocorasick/default.nix b/pkgs/development/python-modules/pyahocorasick/default.nix index 87d1d0c9fc01..7bb2f7c988a9 100644 --- a/pkgs/development/python-modules/pyahocorasick/default.nix +++ b/pkgs/development/python-modules/pyahocorasick/default.nix @@ -15,6 +15,11 @@ buildPythonPackage rec { sha256 = "13x3718if28l50474xrz1b9709kvnvdg3nzm6y8bh7mc9a4zyss5"; }; + postPatch = '' + substituteInPlace unittests.py \ + --replace '(tmp, "test.dat")' "(\"$TMPDIR\", \"test.dat\")" + ''; + checkInputs = [ pytestCheckHook ]; pytestFlagsArray = [ "unittests.py" ]; diff --git a/pkgs/development/python-modules/pyqtgraph/default.nix b/pkgs/development/python-modules/pyqtgraph/default.nix index 854af36e5bcd..af5567acc8d3 100644 --- a/pkgs/development/python-modules/pyqtgraph/default.nix +++ b/pkgs/development/python-modules/pyqtgraph/default.nix @@ -53,7 +53,7 @@ buildPythonPackage rec { 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 diff --git a/pkgs/development/python-modules/qcs-api-client/default.nix b/pkgs/development/python-modules/qcs-api-client/default.nix index 78fc11f150ea..dfb237fe2065 100644 --- a/pkgs/development/python-modules/qcs-api-client/default.nix +++ b/pkgs/development/python-modules/qcs-api-client/default.nix @@ -18,14 +18,14 @@ 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 = [ diff --git a/pkgs/development/python-modules/qmk-dotty-dict/default.nix b/pkgs/development/python-modules/qmk-dotty-dict/default.nix index 07b684beb7c7..4e52dc991795 100644 --- a/pkgs/development/python-modules/qmk-dotty-dict/default.nix +++ b/pkgs/development/python-modules/qmk-dotty-dict/default.nix @@ -14,8 +14,13 @@ buildPythonPackage rec { doCheck = false; meta = with lib; { - description = "Dictionary wrapper for quick access to deeply nested keys"; homepage = "https://github.com/pawelzny/dotty_dict"; + description = "Dictionary wrapper for quick access to deeply nested keys"; + longDescription = '' + This is a version of dotty-dict by QMK (https://qmk.fm) since the original + dotty-dict published to pypi has non-ASCII characters that breaks with + some non-UTF8 locale settings. + ''; license = licenses.mit; maintainers = with maintainers; [ babariviere ]; }; diff --git a/pkgs/development/python-modules/sense-energy/default.nix b/pkgs/development/python-modules/sense-energy/default.nix index d3b027924c52..8d73407c9802 100644 --- a/pkgs/development/python-modules/sense-energy/default.nix +++ b/pkgs/development/python-modules/sense-energy/default.nix @@ -9,13 +9,14 @@ buildPythonPackage rec { pname = "sense-energy"; - version = "0.9.2"; + version = "0.9.3"; + format = "setuptools"; src = fetchFromGitHub { owner = "scottbonline"; repo = "sense"; rev = version; - sha256 = "sha256-XZvx/GWpz49dsiY9pgMfX+6gUfWA8q6IpnzmCRPFHus="; + sha256 = "sha256-LUM7SP03U3mRxCTjgxPRXh/ZLz15R04zBWOxLKnan98="; }; propagatedBuildInputs = [ @@ -28,7 +29,9 @@ buildPythonPackage rec { # no tests implemented doCheck = false; - pythonImportsCheck = [ "sense_energy" ]; + pythonImportsCheck = [ + "sense_energy" + ]; meta = with lib; { description = "API for the Sense Energy Monitor"; diff --git a/pkgs/development/python-modules/termplotlib/default.nix b/pkgs/development/python-modules/termplotlib/default.nix index 06432b673afd..fde1080491e0 100644 --- a/pkgs/development/python-modules/termplotlib/default.nix +++ b/pkgs/development/python-modules/termplotlib/default.nix @@ -1,4 +1,5 @@ { lib +, substituteAll , buildPythonPackage , fetchFromGitHub , pytestCheckHook @@ -19,13 +20,28 @@ buildPythonPackage rec { }; format = "pyproject"; - checkInputs = [ pytestCheckHook numpy exdown gnuplot ]; + checkInputs = [ + pytestCheckHook + exdown + ]; pythonImportsCheck = [ "termplotlib" ]; - # there seems to be a newline in the very front of the output - # which causes the test to fail, since it apparently doesn't - # strip whitespace. might be a gnuplot choice? sigh... - disabledTests = [ "test_plot_lim" ]; + propagatedBuildInputs = [ numpy ]; + + patches = [ + (substituteAll { + src = ./gnuplot-subprocess.patch; + gnuplot = "${gnuplot.out}/bin/gnuplot"; + }) + ]; + + # The current gnuplot version renders slightly different test + # graphs, with emphasis on slightly. The plots are still correct. + # Tests pass on gnuplot 5.4.1, but fail on 5.4.2. + disabledTests = [ + "test_plot" + "test_nolabel" + ]; meta = with lib; { description = "matplotlib for your terminal"; diff --git a/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch b/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch new file mode 100644 index 000000000000..5935dbda1265 --- /dev/null +++ b/pkgs/development/python-modules/termplotlib/gnuplot-subprocess.patch @@ -0,0 +1,26 @@ +diff --git a/src/termplotlib/helpers.py b/src/termplotlib/helpers.py +index 4b67fd0..38a2242 100644 +--- a/src/termplotlib/helpers.py ++++ b/src/termplotlib/helpers.py +@@ -32,7 +32,7 @@ def is_unicode_standard_output(): + + + def get_gnuplot_version(): +- out = subprocess.check_output(["gnuplot", "--version"]).decode() ++ out = subprocess.check_output(["@gnuplot@", "--version"]).decode() + m = re.match("gnuplot (\\d).(\\d) patchlevel (\\d)\n", out) + if m is None: + raise RuntimeError("Couldn't get gnuplot version") +diff --git a/src/termplotlib/plot.py b/src/termplotlib/plot.py +index 0f46b87..1418fd1 100644 +--- a/src/termplotlib/plot.py ++++ b/src/termplotlib/plot.py +@@ -17,7 +17,7 @@ def plot( + ticks_scale: int = 0, + ): + p = subprocess.Popen( +- ["gnuplot"], ++ ["@gnuplot@"], + stdout=subprocess.PIPE, + stdin=subprocess.PIPE, + stderr=subprocess.PIPE, diff --git a/pkgs/development/python-modules/uamqp/default.nix b/pkgs/development/python-modules/uamqp/default.nix index b038eb5316a5..15f098d90e48 100644 --- a/pkgs/development/python-modules/uamqp/default.nix +++ b/pkgs/development/python-modules/uamqp/default.nix @@ -1,28 +1,46 @@ -{ stdenv -, lib +{ lib +, stdenv , buildPythonPackage -, fetchPypi -, fetchpatch -, isPy3k , certifi -, cmake -, enum34 -, openssl -, six , CFNetwork +, cmake , CoreFoundation +, enum34 +, fetchpatch +, fetchPypi +, isPy3k +, openssl , Security +, six }: buildPythonPackage rec { pname = "uamqp"; - version = "1.4.1"; + version = "1.4.3"; src = fetchPypi { inherit pname version; - sha256 = "sha256-JNGlpu2HvwTGV77WnAQFyvJImHesE2R+ZwMAlhlyk2U="; + sha256 = "sha256-L4IQWnxRRL3yopNT91Mk8KKdph9Vg2PHkGH+86uDu7c="; }; + nativeBuildInputs = [ + cmake + ]; + + buildInputs = lib.optionals stdenv.isDarwin [ + CoreFoundation + CFNetwork + Security + ]; + + propagatedBuildInputs = [ + certifi + openssl + six + ] ++ lib.optionals (!isPy3k) [ + enum34 + ]; + patches = [ (fetchpatch { url = "https://github.com/Azure/azure-c-shared-utility/commit/52ab2095649b5951e6af77f68954209473296983.patch"; @@ -32,27 +50,15 @@ buildPythonPackage rec { }) ]; - buildInputs = [ - openssl - certifi - six - ] ++ lib.optionals (!isPy3k) [ - enum34 - ] ++ lib.optionals stdenv.isDarwin [ - CoreFoundation - CFNetwork - Security - ]; - dontUseCmakeConfigure = true; - nativeBuildInputs = [ - cmake - ]; - - # has no tests + # Project has no tests doCheck = false; + pythonImportsCheck = [ + "uamqp" + ]; + meta = with lib; { description = "An AMQP 1.0 client library for Python"; homepage = "https://github.com/Azure/azure-uamqp-python"; diff --git a/pkgs/development/tools/analysis/checkov/default.nix b/pkgs/development/tools/analysis/checkov/default.nix index a2fc83bc2b21..421d9cb8c1ee 100644 --- a/pkgs/development/tools/analysis/checkov/default.nix +++ b/pkgs/development/tools/analysis/checkov/default.nix @@ -56,13 +56,13 @@ with py.pkgs; buildPythonApplication rec { pname = "checkov"; - version = "2.0.591"; + version = "2.0.594"; src = fetchFromGitHub { owner = "bridgecrewio"; repo = pname; rev = version; - sha256 = "sha256-p8pEw3vH3W62MmlZsSqWoUKf7QjEQhlV5bSjYr1Wwm0="; + sha256 = "sha256-wbqFEeqe0RXLfiaIIG6UyBLgFOG3kUWKLVoeKoSktuI="; }; nativeBuildInputs = with py.pkgs; [ diff --git a/pkgs/games/2048-in-terminal/default.nix b/pkgs/games/2048-in-terminal/default.nix index 8ac72db65f5f..8f527534bb44 100644 --- a/pkgs/games/2048-in-terminal/default.nix +++ b/pkgs/games/2048-in-terminal/default.nix @@ -1,28 +1,35 @@ -{ lib, stdenv, fetchFromGitHub, ncurses }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, ncurses, pkg-config }: stdenv.mkDerivation rec { pname = "2048-in-terminal"; - version = "2017-11-29"; + version = "2021-09-12"; src = fetchFromGitHub { - sha256 = "1cqv5z1i5zcrvj0w6pdfnnff8m6kjndqxwkwsw5ma9jz503bmyc6"; - rev = "4e525066b0ef3442e92d2ba8dd373bdc205ece28"; + sha256 = "1jgacyimn59kxqhrk8jp13qayc2mncxhx393spqcxbz0sj6lxq9p"; + rev = "466abe827638598e40cb627d2b017fe8f76b3a14"; repo = "2048-in-terminal"; owner = "alewmoose"; }; - buildInputs = [ ncurses ]; + # Fix pending upstream inclusion for ncurses-6.3 support: + # https://github.com/alewmoose/2048-in-terminal/pull/6 + patches = [ + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/alewmoose/2048-in-terminal/commit/b1c78dc4b3cca3a193b1afea1ab85a75966823cf.patch"; + sha256 = "05ibpgr83r7zxsak2l0gaf33858bp0sp0mjfdpmcmw745z3jw7q1"; + }) + ]; - prePatch = '' - sed -i '1i#include \n' save.c - ''; + buildInputs = [ ncurses ]; + nativeBuildInputs = [ pkg-config ]; enableParallelBuilding = true; preInstall = '' mkdir -p $out/bin ''; - installFlags = [ "DESTDIR=$(out)/bin" ]; + installFlags = [ "PREFIX=$(out)" ]; meta = with lib; { inherit (src.meta) homepage; diff --git a/pkgs/misc/emulators/retroarch/0001-Disable-menu_show_core_updater.patch b/pkgs/misc/emulators/retroarch/0001-Disable-menu_show_core_updater.patch new file mode 100644 index 000000000000..75018dc8c4d1 --- /dev/null +++ b/pkgs/misc/emulators/retroarch/0001-Disable-menu_show_core_updater.patch @@ -0,0 +1,25 @@ +From 546b343294209abbb193883ab76b679b7f99c6d3 Mon Sep 17 00:00:00 2001 +From: Thiago Kenji Okada +Date: Sat, 20 Nov 2021 16:03:50 -0300 +Subject: [PATCH 1/2] Disable "menu_show_core_updater" + +--- + retroarch.cfg | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/retroarch.cfg b/retroarch.cfg +index cdcb199c9f..ab72f3920f 100644 +--- a/retroarch.cfg ++++ b/retroarch.cfg +@@ -681,7 +681,7 @@ + # menu_show_online_updater = true + + # If disabled, will hide the ability to update cores (and core info files) inside the menu. +-# menu_show_core_updater = true ++menu_show_core_updater = false + + # If disabled, the libretro core will keep running in the background when we + # are in the menu. +-- +2.31.1 + diff --git a/pkgs/misc/emulators/retroarch/0002-Use-fixed-paths-on-libretro_info_path.patch b/pkgs/misc/emulators/retroarch/0002-Use-fixed-paths-on-libretro_info_path.patch new file mode 100644 index 000000000000..9aa8db6ab048 --- /dev/null +++ b/pkgs/misc/emulators/retroarch/0002-Use-fixed-paths-on-libretro_info_path.patch @@ -0,0 +1,80 @@ +From 6788718299e1aba3ff8b31cd6ef012e8d3643bd3 Mon Sep 17 00:00:00 2001 +From: Thiago Kenji Okada +Date: Sat, 20 Nov 2021 15:59:23 -0300 +Subject: [PATCH 2/2] Use fixed paths on "libretro_info_path" + +This patch sets "libretro_info_path" to `handle = false`, so instead of +using the values from `retroarch.cfg`, it will always use the default. + +Also, it patches the default "libretro_info_path" to the +`@libretro_info_path` string, so we can substitute it with the full path +to it during build. +--- + configuration.c | 2 +- + frontend/drivers/platform_darwin.m | 9 ++------- + frontend/drivers/platform_unix.c | 8 ++++---- + 3 files changed, 7 insertions(+), 12 deletions(-) + +diff --git a/configuration.c b/configuration.c +index e6a3841324..afb1d6e2ce 100644 +--- a/configuration.c ++++ b/configuration.c +@@ -1456,7 +1456,7 @@ static struct config_path_setting *populate_settings_path( + SETTING_PATH("core_options_path", + settings->paths.path_core_options, false, NULL, true); + SETTING_PATH("libretro_info_path", +- settings->paths.path_libretro_info, false, NULL, true); ++ settings->paths.path_libretro_info, false, NULL, false); + SETTING_PATH("content_database_path", + settings->paths.path_content_database, false, NULL, true); + SETTING_PATH("cheat_database_path", +diff --git a/frontend/drivers/platform_darwin.m b/frontend/drivers/platform_darwin.m +index f922e50c55..52732f65ae 100644 +--- a/frontend/drivers/platform_darwin.m ++++ b/frontend/drivers/platform_darwin.m +@@ -383,14 +383,9 @@ static void frontend_darwin_get_env(int *argc, char *argv[], + home_dir_buf, "shaders_glsl", + sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER])); + #endif +-#ifdef HAVE_UPDATE_CORES + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], +- home_dir_buf, "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); +-#else +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], +- bundle_path_buf, "modules", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); +-#endif +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], home_dir_buf, "info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); ++ "@libretro_directory@", "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], home_dir_buf, "overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY])); + #ifdef HAVE_VIDEO_LAYOUT + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT], home_dir_buf, "layouts", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_LAYOUT])); +diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c +index 722e1c595c..d87e01cf12 100644 +--- a/frontend/drivers/platform_unix.c ++++ b/frontend/drivers/platform_unix.c +@@ -1815,8 +1815,8 @@ static void frontend_unix_get_env(int *argc, + strcpy_literal(base_path, "retroarch"); + #endif + +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], base_path, +- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], "@libretro_directory@", ++ "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); + #if defined(DINGUX) + /* On platforms that require manual core installation/ + * removal, placing core info files in the same directory +@@ -1825,8 +1825,8 @@ static void frontend_unix_get_env(int *argc, + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, + "core_info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #else +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, +- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", ++ "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #endif + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], base_path, + "autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG])); +-- +2.31.1 + diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index c7b94e29589a..ab13e041139c 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -91,6 +91,8 @@ let --add-flags "-L $COREDIR/${d2u core}_libretro${stdenv.hostPlatform.extensions.sharedLibrary} $@" ''; + enableParallelBuilding = true; + passthru = { inherit core; libretroCore = "/lib/retroarch/cores"; @@ -427,7 +429,6 @@ in core = "mame"; description = "Port of MAME to libretro"; license = with lib.licenses; [ bsd3 gpl2Plus ]; - extraBuildInputs = [ alsa-lib libGLU libGL portaudio python3 xorg.libX11 ]; postPatch = '' # Prevent the failure during the parallel building of: @@ -443,6 +444,7 @@ in license = "MAME"; makefile = "Makefile"; makeFlags = lib.optional (!stdenv.hostPlatform.isx86) "IS_X86=0"; + enableParallelBuilding = false; }; mame2003 = mkLibRetroCore { @@ -450,6 +452,7 @@ in description = "Port of MAME ~2003 to libretro"; license = "MAME"; makefile = "Makefile"; + enableParallelBuilding = false; }; mame2003-plus = mkLibRetroCore { @@ -457,6 +460,7 @@ in description = "Port of MAME ~2003+ to libretro"; license = "MAME"; makefile = "Makefile"; + enableParallelBuilding = false; }; mame2010 = mkLibRetroCore { @@ -465,6 +469,7 @@ in license = "MAME"; makefile = "Makefile"; makeFlags = lib.optionals stdenv.hostPlatform.isAarch64 [ "PTR64=1" "ARM_ENABLED=1" "X86_SH2DRC=0" "FORCE_DRC_C_BACKEND=1" ]; + enableParallelBuilding = false; }; mame2015 = mkLibRetroCore { @@ -474,6 +479,7 @@ in extraNativeBuildInputs = [ python27 ]; extraBuildInputs = [ alsa-lib ]; makefile = "Makefile"; + enableParallelBuilding = false; }; mame2016 = mkLibRetroCore { @@ -494,6 +500,7 @@ in # make -C 3rdparty/genie/build/gmake.linux -f genie.make obj/Release/src/host/lua-5.3.0/src/lgc.o mkdir -p 3rdparty/genie/build/gmake.linux/obj/Release/src/host/lua-5.3.0/src ''; + enableParallelBuilding = false; }; mesen = mkLibRetroCore { @@ -523,7 +530,6 @@ in src = getCoreSrc "mupen64plus"; description = "Libretro port of Mupen64 Plus, GL only"; license = lib.licenses.gpl3Only; - extraBuildInputs = [ libGLU libGL libpng nasm xorg.libX11 ]; makefile = "Makefile"; }; diff --git a/pkgs/misc/emulators/retroarch/default.nix b/pkgs/misc/emulators/retroarch/default.nix index 21cbcb801616..b2621ba8cc13 100644 --- a/pkgs/misc/emulators/retroarch/default.nix +++ b/pkgs/misc/emulators/retroarch/default.nix @@ -55,21 +55,21 @@ stdenv.mkDerivation rec { }; patches = [ - # FIXME: The `retroarch.cfg` file is created once in the first run and only - # updated when needed. However, the file may have out-of-date paths - # In case of issues (e.g.: cores are not loading), please delete the - # `$XDG_CONFIG_HOME/retroarch/retroarch.cfg` file - # See: https://github.com/libretro/RetroArch/issues/13251 - ./fix-config.patch + ./0001-Disable-menu_show_core_updater.patch + ./0002-Use-fixed-paths-on-libretro_info_path.patch ]; postPatch = '' - substituteInPlace retroarch.cfg \ + substituteInPlace "frontend/drivers/platform_unix.c" \ --replace "@libretro_directory@" "$out/lib" \ - --replace "@libretro_info_path@" "$out/share/libretro/info" \ + --replace "@libretro_info_path@" "$out/share/libretro/info" + substituteInPlace "frontend/drivers/platform_darwin.m" \ + --replace "@libretro_directory@" "$out/lib" \ + --replace "@libretro_info_path@" "$out/share/libretro/info" ''; - nativeBuildInputs = [ pkg-config wayland ] ++ + nativeBuildInputs = [ pkg-config ] ++ + optional stdenv.isLinux wayland ++ optional withVulkan makeWrapper; buildInputs = [ ffmpeg freetype libxml2 libGLU libGL python3 SDL2 which ] ++ @@ -110,5 +110,8 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; platforms = platforms.all; maintainers = with maintainers; [ MP2E edwtjo matthewbauer kolbycrouch thiagokokada ]; + # FIXME: exits with error on macOS: + # No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting + broken = stdenv.isDarwin; }; } diff --git a/pkgs/misc/emulators/retroarch/disable-menu-show-core-updater.patch b/pkgs/misc/emulators/retroarch/disable-menu-show-core-updater.patch new file mode 100644 index 000000000000..34fea554ef71 --- /dev/null +++ b/pkgs/misc/emulators/retroarch/disable-menu-show-core-updater.patch @@ -0,0 +1,13 @@ +diff --git a/retroarch.cfg b/retroarch.cfg +index cdcb199c9f..ab72f3920f 100644 +--- a/retroarch.cfg ++++ b/retroarch.cfg +@@ -681,7 +681,7 @@ + # menu_show_online_updater = true + + # If disabled, will hide the ability to update cores (and core info files) inside the menu. +-# menu_show_core_updater = true ++menu_show_core_updater = false + + # If disabled, the libretro core will keep running in the background when we + # are in the menu. diff --git a/pkgs/misc/emulators/retroarch/fix-libretro-paths.patch b/pkgs/misc/emulators/retroarch/fix-libretro-paths.patch new file mode 100644 index 000000000000..203ce836533d --- /dev/null +++ b/pkgs/misc/emulators/retroarch/fix-libretro-paths.patch @@ -0,0 +1,28 @@ +diff --git a/configuration.c b/configuration.c +index e6a3841324..afb1d6e2ce 100644 +--- a/configuration.c ++++ b/configuration.c +@@ -1456,7 +1456,7 @@ static struct config_path_setting *populate_settings_path( + SETTING_PATH("core_options_path", + settings->paths.path_core_options, false, NULL, true); + SETTING_PATH("libretro_info_path", +- settings->paths.path_libretro_info, false, NULL, true); ++ settings->paths.path_libretro_info, false, NULL, false); + SETTING_PATH("content_database_path", + settings->paths.path_content_database, false, NULL, true); + SETTING_PATH("cheat_database_path", +diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c +index 722e1c595c..e7313ee038 100644 +--- a/frontend/drivers/platform_unix.c ++++ b/frontend/drivers/platform_unix.c +@@ -1825,8 +1825,8 @@ static void frontend_unix_get_env(int *argc, + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, + "core_info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #else +- fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], base_path, +- "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); ++ fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], "@libretro_info_path@", ++ "", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); + #endif + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG], base_path, + "autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG])); diff --git a/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix b/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix index ee97e6f7493c..9d83c46396c3 100644 --- a/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix +++ b/pkgs/misc/emulators/retroarch/kodi-advanced-launchers.nix @@ -1,6 +1,4 @@ -{ stdenv, pkgs, lib, cores, runtimeShell }: - -assert cores != []; +{ stdenv, pkgs, lib, runtimeShell, cores ? [ ] }: let diff --git a/pkgs/misc/emulators/wine/cert-path-6.21.patch b/pkgs/misc/emulators/wine/cert-path-6.21.patch new file mode 100644 index 000000000000..f0727f422f8c --- /dev/null +++ b/pkgs/misc/emulators/wine/cert-path-6.21.patch @@ -0,0 +1,15 @@ +diff --git a/dlls/crypt32/unixlib.c b/dlls/crypt32/unixlib.c +index 7cb521eb98b..5804b88be84 100644 +--- a/dlls/crypt32/unixlib.c ++++ b/dlls/crypt32/unixlib.c +@@ -654,6 +654,10 @@ static void load_root_certs(void) + + for (i = 0; i < ARRAY_SIZE(CRYPT_knownLocations) && list_empty(&root_cert_list); i++) + import_certs_from_path( CRYPT_knownLocations[i], TRUE ); ++ ++ char *nix_cert_file = getenv("NIX_SSL_CERT_FILE"); ++ if (nix_cert_file != NULL) ++ import_certs_from_path(nix_cert_file, TRUE); + } + + static NTSTATUS enum_root_certs( void *args ) diff --git a/pkgs/misc/emulators/wine/sources.nix b/pkgs/misc/emulators/wine/sources.nix index 647185c8b9ba..df50f068cf22 100644 --- a/pkgs/misc/emulators/wine/sources.nix +++ b/pkgs/misc/emulators/wine/sources.nix @@ -44,9 +44,9 @@ in rec { unstable = fetchurl rec { # NOTE: Don't forget to change the SHA256 for staging as well. - version = "6.20"; + version = "6.22"; url = "https://dl.winehq.org/wine/source/6.x/wine-${version}.tar.xz"; - sha256 = "0wc4a8slb3k859sdw9wwy92zc4pq7xw1kbq4frnxbzbvkiz26a20"; + sha256 = "sha256-gmBCoYGph5cyo9rLv4FnYF8wUpG/z6r16qDslSXXZO8="; inherit (stable) gecko32 gecko64; ## see http://wiki.winehq.org/Mono @@ -58,14 +58,14 @@ in rec { patches = [ # Also look for root certificates at $NIX_SSL_CERT_FILE - ./cert-path.patch + ./cert-path-6.21.patch ]; }; staging = fetchFromGitHub rec { # https://github.com/wine-staging/wine-staging/releases inherit (unstable) version; - sha256 = "12fvfn77rsqwdprkxiylq09jc81lq34bm8p1zhhn85q6yawpjlbn"; + sha256 = "sha256-dGyaos6xITiAQdU65/PJQKRl5Rr5xBpgQhXii9iwb+E="; owner = "wine-staging"; repo = "wine-staging"; rev = "v${version}"; diff --git a/pkgs/os-specific/linux/fbterm/default.nix b/pkgs/os-specific/linux/fbterm/default.nix index 4fdbb06c5217..ecf1b5e2b314 100644 --- a/pkgs/os-specific/linux/fbterm/default.nix +++ b/pkgs/os-specific/linux/fbterm/default.nix @@ -9,7 +9,7 @@ let 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; diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index 0333a9e43105..e6c43c0aa6e4 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -58,7 +58,7 @@ let setuptools ]); - isx86 = stdenv.isx86_64 || stdenv.isi686; + isx86 = stdenv.hostPlatform.isx86; # Dell isn't supported on Aarch64 haveDell = isx86; diff --git a/pkgs/os-specific/linux/read-edid/default.nix b/pkgs/os-specific/linux/read-edid/default.nix index 24ad06749766..7f6d224ff4d5 100644 --- a/pkgs/os-specific/linux/read-edid/default.nix +++ b/pkgs/os-specific/linux/read-edid/default.nix @@ -10,9 +10,9 @@ stdenv.mkDerivation rec { }; 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' diff --git a/pkgs/os-specific/linux/rtl8812au/default.nix b/pkgs/os-specific/linux/rtl8812au/default.nix index 1aab3e03cd95..b385b9a27da0 100644 --- a/pkgs/os-specific/linux/rtl8812au/default.nix +++ b/pkgs/os-specific/linux/rtl8812au/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { 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}" diff --git a/pkgs/servers/clickhouse/default.nix b/pkgs/servers/clickhouse/default.nix index 28a6536cfaed..dc9ec63ce908 100644 --- a/pkgs/servers/clickhouse/default.nix +++ b/pkgs/servers/clickhouse/default.nix @@ -3,6 +3,7 @@ , icu, jemalloc, libcpuid, libxml2, lld, llvm, lz4, libmysqlclient, openssl, perl , poco, protobuf, python3, rapidjson, re2, rdkafka, readline, sparsehash, unixODBC , xxHash, zstd +, nixosTests }: stdenv.mkDerivation rec { @@ -64,6 +65,8 @@ stdenv.mkDerivation rec { # Builds in 7+h with 2 cores, and ~20m with a big-parallel builder. requiredSystemFeatures = [ "big-parallel" ]; + passthru.tests.clickhouse = nixosTests.clickhouse; + meta = with lib; { homepage = "https://clickhouse.tech/"; description = "Column-oriented database management system"; diff --git a/pkgs/servers/http/trafficserver/default.nix b/pkgs/servers/http/trafficserver/default.nix index e7ce72e086e1..eb4af7bf4918 100644 --- a/pkgs/servers/http/trafficserver/default.nix +++ b/pkgs/servers/http/trafficserver/default.nix @@ -63,6 +63,13 @@ stdenv.mkDerivation rec { url = "https://github.com/apache/trafficserver/commit/19d3af481cf74c91fbf713fc9d2f8b138ed5fbaf.diff"; sha256 = "0z1ikgpp00rzrrcqh97931586yn9wbksgai9xlkcjd5cg8gq0150"; }) + + # Fix build against ncurses-6.3: + # https://github.com/apache/trafficserver/pull/8437 + (fetchpatch { + url = "https://github.com/apache/trafficserver/commit/66c86c6b082903a92b9db33c60e3ed947e77d540.patch"; + sha256 = "1hgpp80xnnjr4k5i6gcllrb7dw4q4xcdrkwxpc1xk2np5cbyxd16"; + }) ]; # NOTE: The upstream README indicates that flex is needed for some features, diff --git a/pkgs/servers/icingaweb2/default.nix b/pkgs/servers/icingaweb2/default.nix index cf900ffd7fda..3602f5b01047 100644 --- a/pkgs/servers/icingaweb2/default.nix +++ b/pkgs/servers/icingaweb2/default.nix @@ -2,13 +2,13 @@ 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 ]; diff --git a/pkgs/servers/icingaweb2/ipl.nix b/pkgs/servers/icingaweb2/ipl.nix index 20b29962b7c6..7e67e645be91 100644 --- a/pkgs/servers/icingaweb2/ipl.nix +++ b/pkgs/servers/icingaweb2/ipl.nix @@ -2,13 +2,13 @@ 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 = '' diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index 9c36a023b460..802948474bc3 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -2,7 +2,7 @@ buildGo117Module rec { pname = "grafana"; - version = "8.2.4"; + version = "8.2.5"; excludedPackages = "\\(alert_webhook_listener\\|clean-swagger\\|release_publisher\\|slow_proxy\\|slow_proxy_mac\\|macaron\\)"; @@ -10,15 +10,15 @@ buildGo117Module rec { rev = "v${version}"; owner = "grafana"; repo = "grafana"; - sha256 = "sha256-dOV22xwdNLt0TnONzyDw0skGKuAYmiHafhFwhtRMN5M="; + sha256 = "sha256-Bi4z8HqKUeVOxbkKXazNIzFBFy7lW0T27ROVC6enrZE="; }; srcStatic = fetchurl { url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz"; - sha256 = "sha256-nfHUpAnFc2lDGAoHB1fJjF08ndfNlaMJAlsMH+TJNy0="; + sha256 = "sha256-ngQA8580rvH3C04TfuIsdiStbvk7/HRDDtS04gR92M4="; }; - vendorSha256 = "sha256-VvmSNSChbxeLWEQDE4JPfoZckQZ7nG7ElupNCc175Fk="; + vendorSha256 = "sha256-adWWL2shdsp1hGxhYvxBbr1YFM89Ym1J0kBNGUrj6vc="; nativeBuildInputs = [ wire ]; diff --git a/pkgs/servers/rippled/default.nix b/pkgs/servers/rippled/default.nix index 0655668429a1..835307ae0a00 100644 --- a/pkgs/servers/rippled/default.nix +++ b/pkgs/servers/rippled/default.nix @@ -116,12 +116,12 @@ let }; in stdenv.mkDerivation rec { pname = "rippled"; - version = "1.7.0"; + version = "1.7.3"; src = fetchgit { url = "https://github.com/ripple/rippled.git"; rev = version; - sha256 = "1rr5kxks9hsxyxrz90dw259b6fs9lywdlqv0bj2g21a6f7g60v2v"; + sha256 = "008qzb138r2pi0cqj4d6d5f0grlb2gm87m8j0dj8b0giya22xv6s"; leaveDotGit = true; fetchSubmodules = true; }; diff --git a/pkgs/tools/archivers/arj/default.nix b/pkgs/tools/archivers/arj/default.nix index e09e390fa473..6f365e226e20 100644 --- a/pkgs/tools/archivers/arj/default.nix +++ b/pkgs/tools/archivers/arj/default.nix @@ -128,6 +128,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ autoreconfHook ]; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace environ.c \ + --replace " #include " " #include " + ''; + preAutoreconf = '' cd gnu ''; diff --git a/pkgs/tools/compression/bsdiff/CVE-2020-14315.patch b/pkgs/tools/compression/bsdiff/CVE-2020-14315.patch new file mode 100644 index 000000000000..bb7ff41284eb --- /dev/null +++ b/pkgs/tools/compression/bsdiff/CVE-2020-14315.patch @@ -0,0 +1,384 @@ +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 +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 + #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 +-#include ++#include ++#include ++#include ++#include ++#include + #include ++#include + #include +-#include + #include +-#include ++ ++#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 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=0) && (oldpos+inewsize) +- 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); + } diff --git a/pkgs/tools/compression/bsdiff/default.nix b/pkgs/tools/compression/bsdiff/default.nix index 8f8818781ab4..b8a86eae89bd 100644 --- a/pkgs/tools/compression/bsdiff/default.nix +++ b/pkgs/tools/compression/bsdiff/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, bzip2 }: +{ lib, stdenv, fetchurl, fetchpatch, bzip2 }: stdenv.mkDerivation rec { pname = "bsdiff"; @@ -10,7 +10,27 @@ stdenv.mkDerivation rec { }; 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 diff --git a/pkgs/tools/filesystems/gfs2-utils/default.nix b/pkgs/tools/filesystems/gfs2-utils/default.nix index ba479b87aa92..3f68888776cb 100644 --- a/pkgs/tools/filesystems/gfs2-utils/default.nix +++ b/pkgs/tools/filesystems/gfs2-utils/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl +{ lib, stdenv, fetchurl, fetchpatch , autoreconfHook, bison, flex, pkg-config , bzip2, check, ncurses, util-linux, zlib }: @@ -12,6 +12,20 @@ stdenv.mkDerivation rec { sha256 = "sha256-gwKxBBG5PtG4/RxX4sUC25ZeG8K2urqVkFDKL7NS4ZI="; }; + patches = [ + # pull pending upstream inclusion fix for ncurses-6.3: sent upstream over email. + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://pagure.io/fork/slyfox/gfs2-utils/c/c927b635f380cca77665195a3aaae804d92870a4.patch"; + sha256 = "sha256-0M1xAqRXoUi2el03WODF/nqEe9JEE5GehMWs776QZNI="; + }) + ]; + postPatch = '' + # Apply fix for ncurses-6.3. Upstream development branch already reworked the code. + # To be removed on next reelase. + substituteInPlace gfs2/edit/gfs2hex.c --replace 'printw(title);' 'printw("%s",title);' + ''; + outputs = [ "bin" "doc" "out" "man" ]; nativeBuildInputs = [ autoreconfHook bison flex pkg-config ]; diff --git a/pkgs/tools/filesystems/nilfs-utils/default.nix b/pkgs/tools/filesystems/nilfs-utils/default.nix index 07c2c5292dcf..3c2dfaf2f1d3 100644 --- a/pkgs/tools/filesystems/nilfs-utils/default.nix +++ b/pkgs/tools/filesystems/nilfs-utils/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, libuuid, libselinux }: +{ lib, stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, libuuid, libselinux +, e2fsprogs }: stdenv.mkDerivation rec { pname = "nilfs-utils"; @@ -15,6 +16,12 @@ stdenv.mkDerivation rec { buildInputs = [ libuuid libselinux ]; + postPatch = '' + # Fix up hardcoded paths. + substituteInPlace lib/cleaner_exec.c --replace /sbin/ $out/bin/ + substituteInPlace sbin/mkfs/mkfs.c --replace /sbin/ ${lib.getBin e2fsprogs}/bin/ + ''; + # According to upstream, libmount should be detected automatically but the # build system fails to do this. This is likely a bug with their build system # hence it is explicitly enabled here. diff --git a/pkgs/tools/graphics/pngquant/default.nix b/pkgs/tools/graphics/pngquant/default.nix index bb0ef8581250..dd145d48fc1b 100644 --- a/pkgs/tools/graphics/pngquant/default.nix +++ b/pkgs/tools/graphics/pngquant/default.nix @@ -14,7 +14,7 @@ stdenv.mkDerivation rec { 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 ]; diff --git a/pkgs/tools/misc/czkawka/default.nix b/pkgs/tools/misc/czkawka/default.nix index 9ff6a7aaa9aa..f2a046322d80 100644 --- a/pkgs/tools/misc/czkawka/default.nix +++ b/pkgs/tools/misc/czkawka/default.nix @@ -8,20 +8,22 @@ , gdk-pixbuf , atk , gtk3 +, testVersion +, czkawka }: rustPlatform.buildRustPackage rec { pname = "czkawka"; - version = "3.2.0"; + version = "3.3.0"; src = fetchFromGitHub { owner = "qarmin"; - repo = pname; + repo = "czkawka"; rev = version; - sha256 = "sha256-OBe6nk5C3kO5Lkas9+G+VY3xAzY7SWx8W5CkSbaYJ9Y="; + sha256 = "0mikgnsqxj8dgapr2k7i9i8mmsza15kp4nasyd6l1vp2cqy8aki6"; }; - cargoSha256 = "sha256-Jghkf1mX5ic7zB2KmtOZbSxgF8C6KjRdGG1Yt+dzylI="; + cargoSha256 = "009zfy4lk8y51h1wi71mrjp6kc7xnk3r8jlbxvhyqslhqd9w10fv"; nativeBuildInputs = [ pkg-config @@ -36,10 +38,15 @@ rustPlatform.buildRustPackage rec { gtk3 ]; + passthru.tests.version = testVersion { + package = czkawka; + command = "czkawka_cli --version"; + }; + meta = with lib; { description = "A simple, fast and easy to use app to remove unnecessary files from your computer"; homepage = "https://github.com/qarmin/czkawka"; license = with licenses; [ mit ]; - maintainers = with maintainers; [ yanganto ]; + maintainers = with maintainers; [ yanganto _0x4A6F ]; }; } diff --git a/pkgs/tools/misc/fluent-bit/default.nix b/pkgs/tools/misc/fluent-bit/default.nix index 795e2b39b7b2..713b1df0c4e9 100644 --- a/pkgs/tools/misc/fluent-bit/default.nix +++ b/pkgs/tools/misc/fluent-bit/default.nix @@ -11,14 +11,17 @@ stdenv.mkDerivation rec { 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"; diff --git a/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch b/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch new file mode 100644 index 000000000000..8bd77605cbc0 --- /dev/null +++ b/pkgs/tools/misc/fluent-bit/fix-cmetrics-darwin.patch @@ -0,0 +1,23 @@ +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 + + /* MacOS */ +-#ifdef FLB_HAVE_CLOCK_GET_TIME ++#ifdef CMT_HAVE_CLOCK_GET_TIME + #include + #include + #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); diff --git a/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch b/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch index 21d9c21f5b9b..ef6be0f5ad35 100644 --- a/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch +++ b/pkgs/tools/misc/fluent-bit/fix-luajit-darwin.patch @@ -1,14 +1,29 @@ 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) diff --git a/pkgs/tools/misc/ipxe/default.nix b/pkgs/tools/misc/ipxe/default.nix index 70b1ae48ae9c..76ce66e56864 100644 --- a/pkgs/tools/misc/ipxe/default.nix +++ b/pkgs/tools/misc/ipxe/default.nix @@ -9,7 +9,7 @@ let "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; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { 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"; @@ -46,7 +46,7 @@ stdenv.mkDerivation rec { 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}"; diff --git a/pkgs/tools/misc/qmk/default.nix b/pkgs/tools/misc/qmk/default.nix index ef25a7361c26..5067e1e0fabe 100644 --- a/pkgs/tools/misc/qmk/default.nix +++ b/pkgs/tools/misc/qmk/default.nix @@ -1,16 +1,12 @@ -{ lib, python3, fetchpatch, writeText }: +{ lib +, python3 +}: -let - inherit (python3.pkgs) buildPythonApplication fetchPypi; - setuppy = writeText "setup.py" '' - from setuptools import setup - setup() - ''; -in buildPythonApplication rec { +python3.pkgs.buildPythonApplication rec { pname = "qmk"; version = "1.0.0"; - src = fetchPypi { + src = python3.pkgs.fetchPypi { inherit pname version; sha256 = "sha256-2mLuxzxFSMw3sLm+OTcgLcOjAdwvJmNhDsynUaYQ+co="; }; @@ -36,8 +32,12 @@ in buildPythonApplication rec { pyusb ]; + # buildPythonApplication requires setup.py; the setup.py file crafted below + # acts as a wrapper to setup.cfg postConfigure = '' - cp ${setuppy} setup.py + touch setup.py + echo "from setuptools import setup" >> setup.py + echo "setup()" >> setup.py ''; # no tests implemented diff --git a/pkgs/tools/networking/cdpr/default.nix b/pkgs/tools/networking/cdpr/default.nix index 6ac69b95dba6..0b92fd7aa45c 100644 --- a/pkgs/tools/networking/cdpr/default.nix +++ b/pkgs/tools/networking/cdpr/default.nix @@ -9,6 +9,10 @@ stdenv.mkDerivation rec { sha256 = "1idyvyafkk0ifcbi7mc65b60qia6hpsdb6s66j4ggqp7if6vblrj"; }; + postPatch = '' + substituteInPlace Makefile --replace 'gcc' '"$$CC"' + ''; + buildInputs = [ libpcap ]; installPhase = '' diff --git a/pkgs/tools/networking/fastd/default.nix b/pkgs/tools/networking/fastd/default.nix index 8d1594b8187d..47007e1646ee 100644 --- a/pkgs/tools/networking/fastd/default.nix +++ b/pkgs/tools/networking/fastd/default.nix @@ -42,7 +42,7 @@ stdenv.mkDerivation rec { ]; # 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" diff --git a/pkgs/tools/networking/netdiscover/default.nix b/pkgs/tools/networking/netdiscover/default.nix new file mode 100644 index 000000000000..1a7b93eef8ab --- /dev/null +++ b/pkgs/tools/networking/netdiscover/default.nix @@ -0,0 +1,26 @@ +{ lib, stdenv, fetchFromGitHub, libpcap, libnet, autoreconfHook }: + +stdenv.mkDerivation rec { + pname = "netdiscover"; + version = "0.8.1"; + + src = fetchFromGitHub { + owner = "netdiscover-scanner"; + repo = pname; + rev = version; + sha256 = "13fp9rfr9vh756m5wck76zbcr0296ir52dahzlqdr52ha9vrswbb"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ libpcap libnet ]; + + # Running update-oui-database.sh would probably make the build irreproducible + + meta = with lib; { + description = "A network address discovering tool, developed mainly for those wireless networks without dhcp server, it also works on hub/switched networks"; + homepage = "https://github.com/netdiscover-scanner/netdiscover"; + license = licenses.gpl3Plus; + maintainers = with maintainers; [ vdot0x23 ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/tools/security/fprintd/tod.nix b/pkgs/tools/security/fprintd/tod.nix new file mode 100644 index 000000000000..4900124f8d19 --- /dev/null +++ b/pkgs/tools/security/fprintd/tod.nix @@ -0,0 +1,21 @@ +{ fetchFromGitLab +, fprintd +, libfprint-tod +}: + +(fprintd.override { libfprint = libfprint-tod; }).overrideAttrs (oldAttrs: + let + pname = "fprintd-tod"; + version = "1.90.9"; + in + { + inherit pname version; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "libfprint"; + repo = "${oldAttrs.pname}"; + rev = "v${version}"; + sha256 = "sha256-rOTVThHOY/Q2IIu2RGiv26UE2V/JFfWWnfKZQfKl5Mg="; + }; + }) diff --git a/pkgs/tools/security/jwt-cli/default.nix b/pkgs/tools/security/jwt-cli/default.nix index e1cd9ec359f1..bf9a93f162b9 100644 --- a/pkgs/tools/security/jwt-cli/default.nix +++ b/pkgs/tools/security/jwt-cli/default.nix @@ -2,21 +2,25 @@ rustPlatform.buildRustPackage rec { pname = "jwt-cli"; - version = "4.0.0"; + version = "5.0.0"; src = fetchFromGitHub { owner = "mike-engel"; repo = pname; rev = version; - sha256 = "sha256-82Le0kdt/fnSQwsRRYHy4Jv9rsCPGf5dIWmoZE2cPxY="; + sha256 = "0za4mpzry6i5gki524kp4by0n74pbc96cvzrkq286v8w033wj01i"; }; - cargoSha256 = "sha256-sCauVxc6JPJ4dBi5LOt+v9bdlRW+oF4cd/sfG5Xdv70="; + cargoSha256 = "1l5fhr5c2ygdlnpwsx62fm8di8li0wf15nvvcnnivjcic7f9b5j0"; buildInputs = lib.optional stdenv.isDarwin Security; doInstallCheck = true; - installCheckPhase = "$out/bin/jwt --version"; + installCheckPhase = '' + $out/bin/jwt --version > /dev/null + $out/bin/jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c \ + | grep -q 'John Doe' + ''; meta = with lib; { description = "Super fast CLI tool to decode and encode JWTs"; diff --git a/pkgs/tools/security/mkp224o/default.nix b/pkgs/tools/security/mkp224o/default.nix index dc17cc602764..17d8e8ad4ffb 100644 --- a/pkgs/tools/security/mkp224o/default.nix +++ b/pkgs/tools/security/mkp224o/default.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { 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"]; } diff --git a/pkgs/tools/text/invoice2data/default.nix b/pkgs/tools/text/invoice2data/default.nix index 8007724f4a53..941f2d6f4938 100644 --- a/pkgs/tools/text/invoice2data/default.nix +++ b/pkgs/tools/text/invoice2data/default.nix @@ -1,21 +1,54 @@ -{ lib, python3Packages, xpdf, imagemagick, tesseract }: +{ lib +, fetchFromGitHub +, imagemagick +, python3 +, tesseract +, xpdf +}: -python3Packages.buildPythonPackage rec { +python3.pkgs.buildPythonApplication rec { pname = "invoice2data"; - version = "0.2.93"; + version = "0.3.6"; + format = "setuptools"; - src = python3Packages.fetchPypi { - inherit pname version; - sha256 = "1phz0a8jxg074k0im7shrrdfvdps7bn1fa4zwcf8q3sa2iig26l4"; + src = fetchFromGitHub { + owner = "invoice-x"; + repo = pname; + rev = "v${version}"; + sha256 = "sha256-t1jgLyKtQsLINlnkCdSbVfTM6B/EiD1yGtx9UHjyZVE="; }; - makeWrapperArgs = ["--prefix" "PATH" ":" (lib.makeBinPath [ imagemagick xpdf tesseract ]) ]; + nativeBuildInputs = with python3.pkgs; [ + setuptools-git + ]; - propagatedBuildInputs = with python3Packages; [ unidecode dateparser pyyaml pillow chardet pdfminer ]; + propagatedBuildInputs = with python3.pkgs; [ + chardet + dateparser + pdfminer + pillow + pyyaml + unidecode + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "pytest-runner" "" + ''; + + makeWrapperArgs = ["--prefix" "PATH" ":" (lib.makeBinPath [ + imagemagick + tesseract + xpdf + ])]; # Tests fails even when ran manually on my ubuntu machine !! doCheck = false; + pythonImportsCheck = [ + "invoice2data" + ]; + meta = with lib; { description = "Data extractor for PDF invoices"; homepage = "https://github.com/invoice-x/invoice2data"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 2453aa922086..99e365540a51 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -787,9 +787,10 @@ mapAliases ({ qt-3 = throw "qt-3 has been removed from nixpkgs, as it's unmaintained and insecure"; # added 2021-02-15 rfkill = throw "rfkill has been removed, as it's included in util-linux"; # added 2020-08-23 riak-cs = throw "riak-cs is not maintained anymore"; # added 2020-10-14 - ring-daemon = jami-daemon; #added 2021-10-26 + ring-daemon = jami-daemon; # added 2021-10-26 radare2-cutter = cutter; # added 2021-03-30 redkite = throw "redkite was archived by upstream"; # added 2021-04-12 + retroArchCores = throw "retroArchCores has been removed. Please use overrides instead, e.g.: `retroarch.override { cores = with libretro; [ ... ]; }`"; # added 2021-11-19 rkt = throw "rkt was archived by upstream"; # added 2020-05-16 rpiboot-unstable = rpiboot; # added 2021-07-30 rtv = throw "rtv was archived by upstream. Consider using tuir, an actively maintained fork"; # added 2021-08-08 @@ -992,6 +993,7 @@ mapAliases ({ wireshark-gtk = throw "wireshark-gtk is not supported anymore. Use wireshark-qt or wireshark-cli instead."; # added 2019-11-18 wireguard = wireguard-tools; # added 2018-05-19 morituri = whipper; # added 2018-09-13 + xbmc-retroarch-advanced-launchers = kodi-retroarch-advanced-launchers; # added 2021-11-19 xp-pen-g430 = pentablet-driver; # added 2020-05-03 xdg_utils = xdg-utils; # added 2021-02-01 xfceUnstable = xfce4-14; # added 2019-09-17 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e1dc55d20c1f..5e9159881314 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1281,7 +1281,9 @@ with pkgs; argyllcms = callPackage ../tools/graphics/argyllcms {}; - arj = callPackage ../tools/archivers/arj { }; + arj = callPackage ../tools/archivers/arj { + stdenv = gccStdenv; + }; arp-scan = callPackage ../tools/misc/arp-scan { }; @@ -3266,9 +3268,7 @@ with pkgs; marlin-calc = callPackage ../tools/misc/marlin-calc {}; - masscan = callPackage ../tools/security/masscan { - stdenv = gccStdenv; - }; + masscan = callPackage ../tools/security/masscan { }; massren = callPackage ../tools/misc/massren { }; @@ -5161,9 +5161,7 @@ with pkgs; icu = icu63; }; - fluent-bit = callPackage ../tools/misc/fluent-bit { - stdenv = gccStdenv; - }; + fluent-bit = callPackage ../tools/misc/fluent-bit { }; flux = callPackage ../development/compilers/flux { }; @@ -5307,9 +5305,7 @@ with pkgs; fprintd = callPackage ../tools/security/fprintd { }; - fprintd-tod = callPackage ../tools/security/fprintd { - libfprint = libfprint-tod; - }; + fprintd-tod = callPackage ../tools/security/fprintd/tod.nix { }; ferdi = callPackage ../applications/networking/instant-messengers/ferdi { mkFranzDerivation = callPackage ../applications/networking/instant-messengers/franz/generic.nix { }; @@ -6539,6 +6535,7 @@ with pkgs; isl_0_14 = callPackage ../development/libraries/isl/0.14.1.nix { }; isl_0_17 = callPackage ../development/libraries/isl/0.17.1.nix { }; isl_0_20 = callPackage ../development/libraries/isl/0.20.0.nix { }; + isl_0_24 = callPackage ../development/libraries/isl/0.24.0.nix { }; ispike = callPackage ../development/libraries/science/robotics/ispike { }; @@ -7818,6 +7815,8 @@ with pkgs; netcat-gnu = callPackage ../tools/networking/netcat { }; + netdiscover = callPackage ../tools/networking/netdiscover { }; + nethogs = callPackage ../tools/networking/nethogs { }; netkittftp = callPackage ../tools/networking/netkit/tftp { }; @@ -8834,9 +8833,7 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) Carbon Cocoa IOKit; }; - rig = callPackage ../tools/misc/rig { - stdenv = gccStdenv; - }; + rig = callPackage ../tools/misc/rig { }; riseup-vpn = libsForQt5.callPackage ../tools/networking/bitmask-vpn { provider = "riseup"; @@ -9627,7 +9624,7 @@ with pkgs; synapse-admin = callPackage ../tools/admin/synapse-admin {}; - sl = callPackage ../tools/misc/sl { stdenv = gccStdenv; }; + sl = callPackage ../tools/misc/sl { }; socat = callPackage ../tools/networking/socat { }; @@ -11607,7 +11604,7 @@ with pkgs; 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; @@ -12062,6 +12059,8 @@ with pkgs; purescript-psa = nodePackages.purescript-psa; + purenix = haskell.lib.compose.justStaticExecutables haskellPackages.purenix; + spago = callPackage ../development/tools/purescript/spago { }; pulp = nodePackages.pulp; @@ -13615,6 +13614,10 @@ with pkgs; stdenv = if stdenv.isDarwin then stdenv else gcc7Stdenv; inherit (darwin.apple_sdk.frameworks) CoreFoundation; }; + racket_7_9 = callPackage ../development/interpreters/racket/racket_7_9.nix { + stdenv = if stdenv.isDarwin then stdenv else gcc7Stdenv; + inherit (darwin.apple_sdk.frameworks) CoreFoundation; + }; racket-minimal = callPackage ../development/interpreters/racket/minimal.nix { }; rakudo = callPackage ../development/interpreters/rakudo {}; @@ -29124,94 +29127,6 @@ with pkgs; wp-cli = callPackage ../development/tools/wp-cli { }; - retroArchCores = - let - cfg = config.retroarch or {}; - inherit (lib) optional; - in with libretro; - ([ ] - ++ optional (cfg.enableAtari800 or false) atari800 - ++ optional (cfg.enableBeetleGBA or false) beetle-gba - ++ optional (cfg.enableBeetleLynx or false) beetle-lynx - ++ optional (cfg.enableBeetleNGP or false) beetle-ngp - ++ optional (cfg.enableBeetlePCEFast or false) beetle-pce-fast - ++ optional (cfg.enableBeetlePCFX or false) beetle-pcfx - ++ optional (cfg.enableBeetlePSX or false) beetle-psx - ++ optional (cfg.enableBeetlePSXHW or false) beetle-psx-hw - ++ optional (cfg.enableBeetleSaturn or false) beetle-saturn - ++ optional (cfg.enableBeetleSaturnHW or false) beetle-saturn-hw - ++ optional (cfg.enableBeetleSNES or false) beetle-snes - ++ optional (cfg.enableBeetleSuperGrafx or false) beetle-supergrafx - ++ optional (cfg.enableBeetleWswan or false) beetle-wswan - ++ optional (cfg.enableBeetleVB or false) beetle-vb - ++ optional (cfg.enableBlueMSX or false) bluemsx - ++ optional (cfg.enableBsnesMercury or false) bsnes-mercury - ++ optional (cfg.enableCitra or false) citra - ++ optional (cfg.enableDesmume or false) desmume - ++ optional (cfg.enableDesmume2015 or false) desmume2015 - ++ optional (cfg.enableDolphin or false) dolphin - ++ optional (cfg.enableDOSBox or false) dosbox - ++ optional (cfg.enableEightyOne or false) eightyone - ++ optional (cfg.enableFBAlpha2012 or false) fbalpha2012 - ++ optional (cfg.enableFBNeo or false) fbneo - ++ optional (cfg.enableFceumm or false) fceumm - ++ optional (cfg.enableFlycast or false) flycast - ++ optional (cfg.enableFMSX or false) fmsx - ++ optional (cfg.enableFreeIntv or false) freeintv - ++ optional (cfg.enableGambatte or false) gambatte - ++ optional (cfg.enableGenesisPlusGX or false) genesis-plus-gx - ++ optional (cfg.enableGpsp or false) gpsp - ++ optional (cfg.enableGW or false) gw - ++ optional (cfg.enableHandy or false) handy - ++ optional (cfg.enableHatari or false) hatari - ++ optional (cfg.enableMAME or false) mame - ++ optional (cfg.enableMAME2000 or false) mame2000 - ++ optional (cfg.enableMAME2003 or false) mame2003 - ++ optional (cfg.enableMAME2003Plus or false) mame2003-plus - ++ optional (cfg.enableMAME2010 or false) mame2010 - ++ optional (cfg.enableMAME2015 or false) mame2015 - ++ optional (cfg.enableMAME2016 or false) mame2016 - ++ optional (cfg.enableMesen or false) mesen - ++ optional (cfg.enableMeteor or false) meteor - ++ optional (cfg.enableMGBA or false) mgba - ++ optional (cfg.enableMupen64Plus or false) mupen64plus - ++ optional (cfg.enableNeoCD or false) neocd - ++ optional (cfg.enableNestopia or false) nestopia - ++ optional (cfg.enableNP2kai or false) np2kai - ++ optional (cfg.enableO2EM or false) o2em - ++ optional (cfg.enableOpera or false) opera - ++ optional (cfg.enableParallelN64 or false) parallel-n64 - ++ optional (cfg.enablePCSXRearmed or false) pcsx_rearmed - ++ optional (cfg.enablePicodrive or false) picodrive - ++ optional (cfg.enablePlay or false) play - ++ optional (cfg.enablePPSSPP or false) ppsspp - ++ optional (cfg.enablePrboom or false) prboom - ++ optional (cfg.enableProSystem or false) prosystem - ++ optional (cfg.enableQuickNES or false) quicknes - ++ optional (cfg.enableSameBoy or false) sameboy - ++ optional (cfg.enableScummVM or false) scummvm - ++ optional (cfg.enableSMSPlusGX or false) smsplus-gx - ++ optional (cfg.enableSnes9x or false) snes9x - ++ optional (cfg.enableSnes9x2002 or false) snes9x2002 - ++ optional (cfg.enableSnes9x2005 or false) snes9x2005 - ++ optional (cfg.enableSnes9x2010 or false) snes9x2010 - ++ optional (cfg.enableStella or false) stella - ++ optional (cfg.enableStella2014 or false) stella2014 - ++ optional (cfg.enableTGBDual or false) tgbdual - ++ optional (cfg.enableThePowderToy or false) the-powder-toy - ++ optional (cfg.enableTIC80 or false) tic80 - ++ optional (cfg.enableVbaNext or false) vba-next - ++ optional (cfg.enableVbaM or false) vba-m - ++ optional (cfg.enableVecx or false) vecx - ++ optional (cfg.enableVirtualJaguar or false) virtualjaguar - ++ optional (cfg.enableYabause or false) yabause - ); - - wrapRetroArch = { retroarch }: callPackage ../misc/emulators/retroarch/wrapper.nix { - inherit retroarch; - cores = retroArchCores; - }; - wsjtx = qt5.callPackage ../applications/radio/wsjtx { }; wxhexeditor = callPackage ../applications/editors/wxhexeditor { @@ -29291,10 +29206,7 @@ with pkgs; kodi-cli = callPackage ../tools/misc/kodi-cli { }; kodi-retroarch-advanced-launchers = - callPackage ../misc/emulators/retroarch/kodi-advanced-launchers.nix { - cores = retroArchCores; - }; - xbmc-retroarch-advanced-launchers = kodi-retroarch-advanced-launchers; + callPackage ../misc/emulators/retroarch/kodi-advanced-launchers.nix { }; xca = libsForQt5.callPackage ../applications/misc/xca { }; @@ -29654,7 +29566,12 @@ with pkgs; inherit (darwin) autoSignDarwinBinariesHook; }; - bitcoind-knots = callPackage ../applications/blockchains/bitcoin-knots { miniupnpc = miniupnpc_2; }; + bitcoind-knots = callPackage ../applications/blockchains/bitcoin-knots { + boost = boost17x; + miniupnpc = miniupnpc_2; + withGui = false; + inherit (darwin) autoSignDarwinBinariesHook; + }; cgminer = callPackage ../applications/blockchains/cgminer { }; @@ -32867,8 +32784,16 @@ with pkgs; inherit (darwin.apple_sdk.frameworks) AppKit Foundation; }; + wrapRetroArch = { retroarch }: callPackage ../misc/emulators/retroarch/wrapper.nix { + inherit retroarch; + }; + retroarch = wrapRetroArch { retroarch = retroarchBare; }; + retroarchFull = retroarch.override { + cores = builtins.filter (c: c ? libretroCore) (builtins.attrValues libretro); + }; + libretro = recurseIntoAttrs (callPackage ../misc/emulators/retroarch/cores.nix { retroarch = retroarchBare; });