Merge #221461: staging-next 2023-03-16

This commit is contained in:
Vladimír Čunát 2023-03-26 19:02:45 +02:00
commit a0be54df4c
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
278 changed files with 2180 additions and 2266 deletions

View file

@ -12,12 +12,18 @@ In addition to numerous new and upgraded packages, this release has the followin
- default linux: 5.15 -\> 6.1, all supported kernels available
- systemd has been updated to v253.1, see [the pull request](https://github.com/NixOS/nixpkgs/pull/216826) for more info.
It's recommended to use `nixos-rebuild boot` and `reboot`, rather than `nixos-rebuild switch` - since in some rare cases
the switch of a live system might fail.
- Cinnamon has been updated to 5.6, see [the pull request](https://github.com/NixOS/nixpkgs/pull/201328#issue-1449910204) for what is changed.
- KDE Plasma has been updated to v5.27, see [the release notes](https://kde.org/announcements/plasma/5/5.27.0/) for what is changed.
- `nixos-rebuild` now supports an extra `--specialisation` option that can be used to change specialisation for `switch` and `test` commands.
- `libxcrypt`, the library providing the `crypt(3)` password hashing function, is now built without support for algorithms not flagged [`strong`](https://github.com/besser82/libxcrypt/blob/v4.4.33/lib/hashes.conf#L48). This affects the availability of password hashing algorithms used for system login (`login(1)`, `passwd(1)`), but also Apache2 Basic-Auth, Samba, OpenLDAP, Dovecot, and [many other packages](https://github.com/search?q=repo%3ANixOS%2Fnixpkgs%20libxcrypt&type=code).
## New Services {#sec-release-23.05-new-services}
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
@ -183,12 +189,16 @@ In addition to numerous new and upgraded packages, this release has the followin
- conntrack helper autodetection has been removed from kernels 6.0 and up upstream, and an assertion was added to ensure things don't silently stop working. Migrate your configuration to assign helpers explicitly or use an older LTS kernel branch as a temporary workaround.
- The `services.pipewire.config` options have been removed, as they have basically never worked correctly. All behavior defined by the default configuration can be overridden with drop-in files as necessary - see [below](#sec-release-23.05-migration-pipewire) for details.
- The catch-all `hardware.video.hidpi.enable` option was removed. Users on high density displays may want to:
- Set `services.xserver.upscaleDefaultCursor` to upscale the default X11 cursor for higher resolutions
- Adjust settings under `fonts.fontconfig` according to preference
- Adjust `console.font` according to preference, though the kernel will generally choose a reasonably sized font
- `services.pipewire.media-session` and the `pipewire-media-session` package have been removed, as they are no longer supported upstream. Users are encouraged to use `services.pipewire.wireplumber` instead.
- The `baget` package and module was removed due to being unmaintained.
## Other Notable Changes {#sec-release-23.05-notable-changes}
@ -341,3 +351,85 @@ In addition to numerous new and upgraded packages, this release has the followin
- `k3s` can now be configured with an EnvironmentFile for its systemd service, allowing secrets to be provided without ending up in the Nix Store.
- `boot.initrd.luks.device.<name>` has a new `tryEmptyPassphrase` option, this is useful for OEM's who need to install an encrypted disk with a future settable passphrase
## Detailed migration information {#sec-release-23.05-migration}
### Pipewire configuration overrides {#sec-release-23.05-migration-pipewire}
#### Why this change? {#sec-release-23.05-migration-pipewire-why}
The Pipewire config semantics don't really match the NixOS module semantics, so it's extremely awkward to override the default config, especially when lists are involved. Vendoring the configuration files in nixpkgs also creates unnecessary maintenance overhead.
Also, upstream added a lot of accomodations to allow doing most of the things you'd want to do with a config edit in better ways.
#### Migrating your configuration {#sec-release-23.05-migration-pipewire-how}
Compare your settings to [the defaults](https://gitlab.freedesktop.org/pipewire/pipewire/-/tree/master/src/daemon) and where your configuration differs from them.
Then, create a drop-in JSON file in `/etc/pipewire/<config file name>.d/99-custom.conf` (the actual filename can be anything) and migrate your changes to it according to the following sections.
Repeat for every file you've modified, changing the directory name accordingly.
#### Things you can just copy over {#sec-release-23.05-migration-pipewire-simple}
If you are:
- setting properties via `*.properties`
- loading a new module to `context.modules`
- creating new objects with `context.objects`
- declaring SPA libraries with `context.spa-libs`
- running custom commands with `context.exec`
- adding new rules with `*.rules`
- running custom PulseAudio commands with `pulse.cmd`
Simply move the definitions into the drop-in.
Note that the use of `context.exec` is not recommended and other methods of running your thing are likely a better option.
```json
{
"context.properties": {
"your.property.name": "your.property.value"
},
"context.modules": [
{ "name": "libpipewire-module-my-cool-thing" }
],
"context.objects": [
{ "factory": { ... } }
],
"alsa.rules": [
{ "matches: { ... }, "actions": { ... } }
]
}
```
#### Removing a module from `context.modules` {#sec-release-23.05-migration-pipewire-removing-modules}
Look for an option to disable it via `context.properties` (`"module.x11.bell": "false"` is likely the most common use case here).
If one is not available, proceed to [Nuclear option](#sec-release-23.05-migration-pipewire).
#### Modifying a module's parameters in `context.modules` {#sec-release-23.05-migration-pipewire-modifying-modules}
For most modules (e.g. `libpipewire-module-rt`) it's enough to load the module again with the new arguments, e.g.:
```json
{
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {
"rt.prio": 90
}
}
]
}
```
Note that `module-rt` specifically will generally use the highest values available by default, so setting limits on the `pipewire` systemd service is preferable to reloading.
If reloading the module is not an option, proceed to [Nuclear option](#sec-release-23.05-migration-pipewire).
#### Nuclear option {#sec-release-23.05-migration-pipewire-nuclear}
If all else fails, you can still manually copy the contents of the default configuration file
from `${pkgs.pipewire.lib}/share/pipewire` to `/etc/pipewire` and edit it to fully override the default.
However, this should be done only as a last resort. Please talk to the Pipewire maintainers if you ever need to do this.

View file

@ -539,7 +539,9 @@ in {
###### implementation
config = {
config = let
cryptSchemeIdPatternGroup = "(${lib.concatStringsSep "|" pkgs.libxcrypt.enabledCryptSchemeIds})";
in {
users.users = {
root = {
@ -601,15 +603,16 @@ in {
text = ''
users=()
while IFS=: read -r user hash tail; do
if [[ "$hash" = "$"* && ! "$hash" =~ ^\$(y|gy|7|2b|2y|2a|6)\$ ]]; then
if [[ "$hash" = "$"* && ! "$hash" =~ ^\''$${cryptSchemeIdPatternGroup}\$ ]]; then
users+=("$user")
fi
done </etc/shadow
if (( "''${#users[@]}" )); then
echo "
WARNING: The following user accounts rely on password hashes that will
be removed in NixOS 23.05. They should be renewed as soon as possible."
WARNING: The following user accounts rely on password hashing algorithms
that have been removed. They need to be renewed as soon as possible, as
they do prevent their users from logging in."
printf ' - %s\n' "''${users[@]}"
fi
'';
@ -729,7 +732,7 @@ in {
let
sep = "\\$";
base64 = "[a-zA-Z0-9./]+";
id = "[a-z0-9-]+";
id = cryptSchemeIdPatternGroup;
value = "[a-zA-Z0-9/+.-]+";
options = "${id}(=${value})?(,${id}=${value})*";
scheme = "${id}(${sep}${options})?";

View file

@ -21,6 +21,9 @@ with lib;
# ISO naming.
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
# BIOS booting
isoImage.makeBiosBootable = true;
# EFI booting
isoImage.makeEfiBootable = true;

View file

@ -535,10 +535,17 @@ in
'';
};
isoImage.makeBiosBootable = mkOption {
default = false;
description = lib.mdDoc ''
Whether the ISO image should be a BIOS-bootable disk.
'';
};
isoImage.makeEfiBootable = mkOption {
default = false;
description = lib.mdDoc ''
Whether the ISO image should be an efi-bootable volume.
Whether the ISO image should be an EFI-bootable volume.
'';
};
@ -693,7 +700,7 @@ in
boot.loader.grub.enable = false;
environment.systemPackages = [ grubPkgs.grub2 grubPkgs.grub2_efi ]
++ optional canx86BiosBoot pkgs.syslinux
++ optional (config.isoImage.makeBiosBootable && canx86BiosBoot) pkgs.syslinux
;
# In stage 1 of the boot, mount the CD as the root FS by label so
@ -744,7 +751,7 @@ in
{ source = pkgs.writeText "version" config.system.nixos.label;
target = "/version.txt";
}
] ++ optionals canx86BiosBoot [
] ++ optionals (config.isoImage.makeBiosBootable && canx86BiosBoot) [
{ source = config.isoImage.splashImage;
target = "/isolinux/background.png";
}
@ -771,7 +778,7 @@ in
{ source = config.isoImage.efiSplashImage;
target = "/EFI/boot/efi-background.png";
}
] ++ optionals (config.boot.loader.grub.memtest86.enable && canx86BiosBoot) [
] ++ optionals (config.boot.loader.grub.memtest86.enable && config.isoImage.makeBiosBootable && canx86BiosBoot) [
{ source = "${pkgs.memtest86plus}/memtest.bin";
target = "/boot/memtest.bin";
}
@ -786,10 +793,10 @@ in
# Create the ISO image.
system.build.isoImage = pkgs.callPackage ../../../lib/make-iso9660-image.nix ({
inherit (config.isoImage) isoName compressImage volumeID contents;
bootable = canx86BiosBoot;
bootable = config.isoImage.makeBiosBootable && canx86BiosBoot;
bootImage = "/isolinux/isolinux.bin";
syslinux = if canx86BiosBoot then pkgs.syslinux else null;
} // optionalAttrs (config.isoImage.makeUsbBootable && canx86BiosBoot) {
syslinux = if config.isoImage.makeBiosBootable && canx86BiosBoot then pkgs.syslinux else null;
} // optionalAttrs (config.isoImage.makeUsbBootable && config.isoImage.makeBiosBootable && canx86BiosBoot) {
usbBootable = true;
isohybridMbrImage = "${pkgs.syslinux}/share/syslinux/isohdpfx.bin";
} // optionalAttrs config.isoImage.makeEfiBootable {

View file

@ -430,7 +430,6 @@
./services/desktops/gvfs.nix
./services/desktops/malcontent.nix
./services/desktops/neard.nix
./services/desktops/pipewire/pipewire-media-session.nix
./services/desktops/pipewire/pipewire.nix
./services/desktops/pipewire/wireplumber.nix
./services/desktops/profile-sync-daemon.nix

View file

@ -620,7 +620,7 @@ let
optionalString config.services.homed.enable ''
password sufficient ${config.systemd.package}/lib/security/pam_systemd_home.so
'' + ''
password sufficient pam_unix.so nullok sha512
password sufficient pam_unix.so nullok yescrypt
'' +
optionalString config.security.pam.enableEcryptfs ''
password optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so

View file

@ -1,54 +0,0 @@
{
"context.properties": {
"log.level": 0
},
"context.spa-libs": {
"audio.convert.*": "audioconvert/libspa-audioconvert",
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-client-device"
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-metadata"
},
{
"name": "libpipewire-module-session-manager"
}
],
"filter.properties": {},
"stream.properties": {},
"alsa.properties": {},
"alsa.rules": [
{
"matches": [
{
"application.process.binary": "resolve"
}
],
"actions": {
"update-props": {
"alsa.buffer-bytes": 131072
}
}
}
]
}

View file

@ -1,31 +0,0 @@
{
"context.properties": {
"log.level": 0
},
"context.spa-libs": {
"audio.convert.*": "audioconvert/libspa-audioconvert",
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-client-device"
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-metadata"
},
{
"name": "libpipewire-module-session-manager"
}
],
"filter.properties": {},
"stream.properties": {}
}

View file

@ -1,28 +0,0 @@
{
"context.properties": {
"log.level": 0
},
"context.spa-libs": {
"audio.convert.*": "audioconvert/libspa-audioconvert",
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-adapter"
}
]
}

View file

@ -1,75 +0,0 @@
{
"context.properties": {
"log.level": 0
},
"context.spa-libs": {
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-metadata"
}
],
"jack.properties": {},
"jack.rules": [
{
"matches": [
{}
],
"actions": {
"update-props": {}
}
},
{
"matches": [
{
"application.process.binary": "jack_bufsize"
}
],
"actions": {
"update-props": {
"jack.global-buffer-size": true
}
}
},
{
"matches": [
{
"application.process.binary": "qsynth"
}
],
"actions": {
"update-props": {
"node.pause-on-idle": false,
"node.passive": true
}
}
},
{
"matches": [
{
"client.name": "Mixxx"
}
],
"actions": {
"update-props": {
"jack.merge-monitor": false
}
}
}
]
}

View file

@ -1,120 +0,0 @@
{
"context.properties": {
"link.max-buffers": 16,
"core.daemon": true,
"core.name": "pipewire-0",
"settings.check-quantum": true,
"settings.check-rate": true,
"vm.overrides": {
"default.clock.min-quantum": 1024
}
},
"context.spa-libs": {
"audio.convert.*": "audioconvert/libspa-audioconvert",
"api.alsa.*": "alsa/libspa-alsa",
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {
"nice.level": -11
},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-profiler"
},
{
"name": "libpipewire-module-metadata"
},
{
"name": "libpipewire-module-spa-node-factory"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-access",
"args": {}
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-link-factory"
}
],
"context.objects": [
{
"factory": "metadata",
"args": {
"metadata.name": "default"
}
},
{
"factory": "spa-node-factory",
"args": {
"factory.name": "support.node.driver",
"node.name": "Dummy-Driver",
"node.group": "pipewire.dummy",
"priority.driver": 20000
}
},
{
"factory": "spa-node-factory",
"args": {
"factory.name": "support.node.driver",
"node.name": "Freewheel-Driver",
"priority.driver": 19000,
"node.group": "pipewire.freewheel",
"node.freewheel": true
}
},
{
"factory": "adapter",
"args": {
"factory.name": "api.alsa.pcm.source",
"node.name": "system",
"node.description": "system",
"media.class": "Audio/Source",
"api.alsa.path": "hw:0",
"node.suspend-on-idle": true,
"resample.disable": true,
"channelmix.disable": true,
"adapter.auto-port-config": {
"mode": "dsp",
"monitor": false,
"control": false,
"position": "unknown"
}
}
},
{
"factory": "adapter",
"args": {
"factory.name": "api.alsa.pcm.sink",
"node.name": "system",
"node.description": "system",
"media.class": "Audio/Sink",
"api.alsa.path": "hw:0",
"node.suspend-on-idle": true,
"resample.disable": true,
"channelmix.disable": true,
"adapter.auto-port-config": {
"mode": "dsp",
"monitor": false,
"control": false,
"position": "unknown"
}
}
}
],
"context.exec": []
}

View file

@ -1,38 +0,0 @@
{
"context.properties": {},
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {
"nice.level": -11
},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-rtp-source",
"args": {
"sap.ip": "239.255.255.255",
"sap.port": 9875,
"sess.latency.msec": 10,
"local.ifname": "eth0",
"stream.props": {
"media.class": "Audio/Source",
"node.virtual": false,
"device.api": "aes67"
}
}
}
]
}

View file

@ -1,38 +0,0 @@
{
"context.properties": {},
"context.spa-libs": {
"audio.convert.*": "audioconvert/libspa-audioconvert",
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {
"nice.level": -11
},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-avb",
"args": {}
}
],
"context.exec": [],
"stream.properties": {},
"avb.properties": {
"ifname": "enp3s0",
"vm.overrides": {}
}
}

View file

@ -1,106 +0,0 @@
{
"context.properties": {},
"context.spa-libs": {
"audio.convert.*": "audioconvert/libspa-audioconvert",
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {
"nice.level": -11
},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-metadata"
},
{
"name": "libpipewire-module-protocol-pulse",
"args": {}
}
],
"context.exec": [],
"pulse.cmd": [
{
"cmd": "load-module",
"args": "module-always-sink",
"flags": []
}
],
"stream.properties": {},
"pulse.properties": {
"server.address": [
"unix:native"
],
"vm.overrides": {
"pulse.min.quantum": "1024/48000"
}
},
"pulse.rules": [
{
"matches": [
{}
],
"actions": {
"update-props": {}
}
},
{
"matches": [
{
"application.process.binary": "teams"
},
{
"application.process.binary": "teams-insiders"
},
{
"application.process.binary": "skypeforlinux"
}
],
"actions": {
"quirks": [
"force-s16-info"
]
}
},
{
"matches": [
{
"application.process.binary": "firefox"
}
],
"actions": {
"quirks": [
"remove-capture-dont-move"
]
}
},
{
"matches": [
{
"application.name": "~speech-dispatcher.*"
}
],
"actions": {
"update-props": {
"pulse.min.req": "512/48000",
"pulse.min.quantum": "512/48000",
"pulse.idle.timeout": 5
}
}
}
]
}

View file

@ -1,110 +0,0 @@
{
"context.properties": {
"link.max-buffers": 16,
"core.daemon": true,
"core.name": "pipewire-0",
"vm.overrides": {
"default.clock.min-quantum": 1024
},
"module.x11.bell": true
},
"context.spa-libs": {
"audio.convert.*": "audioconvert/libspa-audioconvert",
"avb.*": "avb/libspa-avb",
"api.alsa.*": "alsa/libspa-alsa",
"api.v4l2.*": "v4l2/libspa-v4l2",
"api.libcamera.*": "libcamera/libspa-libcamera",
"api.bluez5.*": "bluez5/libspa-bluez5",
"api.vulkan.*": "vulkan/libspa-vulkan",
"api.jack.*": "jack/libspa-jack",
"support.*": "support/libspa-support"
},
"context.modules": [
{
"name": "libpipewire-module-rt",
"args": {
"nice.level": -11
},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-profiler"
},
{
"name": "libpipewire-module-metadata"
},
{
"name": "libpipewire-module-spa-device-factory"
},
{
"name": "libpipewire-module-spa-node-factory"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-client-device"
},
{
"name": "libpipewire-module-portal",
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-access",
"args": {}
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-link-factory"
},
{
"name": "libpipewire-module-session-manager"
},
{
"name": "libpipewire-module-x11-bell",
"args": {},
"flags": [
"ifexists",
"nofail"
],
"condition": [
{
"module.x11.bell": true
}
]
}
],
"context.objects": [
{
"factory": "spa-node-factory",
"args": {
"factory.name": "support.node.driver",
"node.name": "Dummy-Driver",
"node.group": "pipewire.dummy",
"priority.driver": 20000
}
},
{
"factory": "spa-node-factory",
"args": {
"factory.name": "support.node.driver",
"node.name": "Freewheel-Driver",
"priority.driver": 19000,
"node.group": "pipewire.freewheel",
"node.freewheel": true
}
}
],
"context.exec": []
}

View file

@ -1,34 +0,0 @@
{
"properties": {},
"rules": [
{
"matches": [
{
"device.name": "~alsa_card.*"
}
],
"actions": {
"update-props": {
"api.alsa.use-acp": true,
"api.acp.auto-profile": false,
"api.acp.auto-port": false
}
}
},
{
"matches": [
{
"node.name": "~alsa_input.*"
},
{
"node.name": "~alsa_output.*"
}
],
"actions": {
"update-props": {
"node.pause-on-idle": false
}
}
}
]
}

View file

@ -1,36 +0,0 @@
{
"properties": {},
"rules": [
{
"matches": [
{
"device.name": "~bluez_card.*"
}
],
"actions": {
"update-props": {
"bluez5.auto-connect": [
"hfp_hf",
"hsp_hs",
"a2dp_sink"
]
}
}
},
{
"matches": [
{
"node.name": "~bluez_input.*"
},
{
"node.name": "~bluez_output.*"
}
],
"actions": {
"update-props": {
"node.pause-on-idle": false
}
}
}
]
}

View file

@ -1,68 +0,0 @@
{
"context.properties": {},
"context.spa-libs": {
"api.bluez5.*": "bluez5/libspa-bluez5",
"api.alsa.*": "alsa/libspa-alsa",
"api.v4l2.*": "v4l2/libspa-v4l2",
"api.libcamera.*": "libcamera/libspa-libcamera"
},
"context.modules": [
{
"name": "libpipewire-module-rtkit",
"args": {},
"flags": [
"ifexists",
"nofail"
]
},
{
"name": "libpipewire-module-protocol-native"
},
{
"name": "libpipewire-module-client-node"
},
{
"name": "libpipewire-module-client-device"
},
{
"name": "libpipewire-module-adapter"
},
{
"name": "libpipewire-module-metadata"
},
{
"name": "libpipewire-module-session-manager"
}
],
"session.modules": {
"default": [
"flatpak",
"portal",
"v4l2",
"suspend-node",
"policy-node"
],
"with-audio": [
"metadata",
"default-nodes",
"default-profile",
"default-routes",
"alsa-seq",
"alsa-monitor"
],
"with-alsa": [
"with-audio"
],
"with-jack": [
"with-audio"
],
"with-pulseaudio": [
"with-audio",
"bluez5",
"bluez5-autoswitch",
"logind",
"restore-stream",
"streams-follow-default"
]
}
}

View file

@ -1,30 +0,0 @@
{
"properties": {},
"rules": [
{
"matches": [
{
"device.name": "~v4l2_device.*"
}
],
"actions": {
"update-props": {}
}
},
{
"matches": [
{
"node.name": "~v4l2_input.*"
},
{
"node.name": "~v4l2_output.*"
}
],
"actions": {
"update-props": {
"node.pause-on-idle": false
}
}
}
]
}

View file

@ -1,141 +0,0 @@
# pipewire example session manager.
{ config, lib, pkgs, ... }:
with lib;
let
json = pkgs.formats.json {};
cfg = config.services.pipewire.media-session;
enable32BitAlsaPlugins = cfg.alsa.support32Bit
&& pkgs.stdenv.isx86_64
&& pkgs.pkgsi686Linux.pipewire != null;
# Use upstream config files passed through spa-json-dump as the base
# Patched here as necessary for them to work with this module
defaults = {
alsa-monitor = lib.importJSON ./media-session/alsa-monitor.conf.json;
bluez-monitor = lib.importJSON ./media-session/bluez-monitor.conf.json;
media-session = lib.importJSON ./media-session/media-session.conf.json;
v4l2-monitor = lib.importJSON ./media-session/v4l2-monitor.conf.json;
};
configs = {
alsa-monitor = recursiveUpdate defaults.alsa-monitor cfg.config.alsa-monitor;
bluez-monitor = recursiveUpdate defaults.bluez-monitor cfg.config.bluez-monitor;
media-session = recursiveUpdate defaults.media-session cfg.config.media-session;
v4l2-monitor = recursiveUpdate defaults.v4l2-monitor cfg.config.v4l2-monitor;
};
in {
meta = {
maintainers = teams.freedesktop.members;
# uses attributes of the linked package
buildDocsInSandbox = false;
};
###### interface
options = {
services.pipewire.media-session = {
enable = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc "Whether to enable the deprecated example Pipewire session manager";
};
package = mkOption {
type = types.package;
default = pkgs.pipewire-media-session;
defaultText = literalExpression "pkgs.pipewire-media-session";
description = lib.mdDoc ''
The pipewire-media-session derivation to use.
'';
};
config = {
media-session = mkOption {
type = json.type;
description = lib.mdDoc ''
Configuration for the media session core. For details see
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/media-session.conf
'';
default = defaults.media-session;
};
alsa-monitor = mkOption {
type = json.type;
description = lib.mdDoc ''
Configuration for the alsa monitor. For details see
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/alsa-monitor.conf
'';
default = defaults.alsa-monitor;
};
bluez-monitor = mkOption {
type = json.type;
description = lib.mdDoc ''
Configuration for the bluez5 monitor. For details see
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/bluez-monitor.conf
'';
default = defaults.bluez-monitor;
};
v4l2-monitor = mkOption {
type = json.type;
description = lib.mdDoc ''
Configuration for the V4L2 monitor. For details see
https://gitlab.freedesktop.org/pipewire/media-session/-/blob/${cfg.package.version}/src/daemon/media-session.d/v4l2-monitor.conf
'';
default = defaults.v4l2-monitor;
};
};
};
};
###### implementation
config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.packages = [ cfg.package ];
# Enable either system or user units.
systemd.services.pipewire-media-session.enable = config.services.pipewire.systemWide;
systemd.user.services.pipewire-media-session.enable = !config.services.pipewire.systemWide;
systemd.services.pipewire-media-session.wantedBy = [ "pipewire.service" ];
systemd.user.services.pipewire-media-session.wantedBy = [ "pipewire.service" ];
environment.etc."pipewire/media-session.d/media-session.conf" = {
source = json.generate "media-session.conf" configs.media-session;
};
environment.etc."pipewire/media-session.d/v4l2-monitor.conf" = {
source = json.generate "v4l2-monitor.conf" configs.v4l2-monitor;
};
environment.etc."pipewire/media-session.d/with-audio" =
mkIf config.services.pipewire.audio.enable {
text = "";
};
environment.etc."pipewire/media-session.d/with-alsa" =
mkIf config.services.pipewire.alsa.enable {
text = "";
};
environment.etc."pipewire/media-session.d/alsa-monitor.conf" =
mkIf config.services.pipewire.alsa.enable {
source = json.generate "alsa-monitor.conf" configs.alsa-monitor;
};
environment.etc."pipewire/media-session.d/with-pulseaudio" =
mkIf config.services.pipewire.pulse.enable {
text = "";
};
environment.etc."pipewire/media-session.d/bluez-monitor.conf" =
mkIf config.services.pipewire.pulse.enable {
source = json.generate "bluez-monitor.conf" configs.bluez-monitor;
};
environment.etc."pipewire/media-session.d/with-jack" =
mkIf config.services.pipewire.jack.enable {
text = "";
};
};
}

View file

@ -4,7 +4,6 @@
with lib;
let
json = pkgs.formats.json {};
cfg = config.services.pipewire;
enable32BitAlsaPlugins = cfg.alsa.support32Bit
&& pkgs.stdenv.isx86_64
@ -18,34 +17,8 @@ let
mkdir -p "$out/lib"
ln -s "${cfg.package.jack}/lib" "$out/lib/pipewire"
'';
# Use upstream config files passed through spa-json-dump as the base
# Patched here as necessary for them to work with this module
defaults = {
client = lib.importJSON ./daemon/client.conf.json;
client-rt = lib.importJSON ./daemon/client-rt.conf.json;
jack = lib.importJSON ./daemon/jack.conf.json;
minimal = lib.importJSON ./daemon/minimal.conf.json;
pipewire = lib.importJSON ./daemon/pipewire.conf.json;
pipewire-pulse = lib.importJSON ./daemon/pipewire-pulse.conf.json;
};
useSessionManager = cfg.wireplumber.enable || cfg.media-session.enable;
configs = {
client = recursiveUpdate defaults.client cfg.config.client;
client-rt = recursiveUpdate defaults.client-rt cfg.config.client-rt;
jack = recursiveUpdate defaults.jack cfg.config.jack;
pipewire = recursiveUpdate (if useSessionManager then defaults.pipewire else defaults.minimal) cfg.config.pipewire;
pipewire-pulse = recursiveUpdate defaults.pipewire-pulse cfg.config.pipewire-pulse;
};
in {
meta = {
maintainers = teams.freedesktop.members ++ [ lib.maintainers.k900 ];
# uses attributes of the linked package
buildDocsInSandbox = false;
};
meta.maintainers = teams.freedesktop.members ++ [ lib.maintainers.k900 ];
###### interface
options = {
@ -69,53 +42,6 @@ in {
'';
};
config = {
client = mkOption {
type = json.type;
default = {};
description = lib.mdDoc ''
Configuration for pipewire clients. For details see
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/client.conf.in
'';
};
client-rt = mkOption {
type = json.type;
default = {};
description = lib.mdDoc ''
Configuration for realtime pipewire clients. For details see
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/client-rt.conf.in
'';
};
jack = mkOption {
type = json.type;
default = {};
description = lib.mdDoc ''
Configuration for the pipewire daemon's jack module. For details see
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/jack.conf.in
'';
};
pipewire = mkOption {
type = json.type;
default = {};
description = lib.mdDoc ''
Configuration for the pipewire daemon. For details see
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/pipewire.conf.in
'';
};
pipewire-pulse = mkOption {
type = json.type;
default = {};
description = lib.mdDoc ''
Configuration for the pipewire-pulse daemon. For details see
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/${cfg.package.version}/src/daemon/pipewire-pulse.conf.in
'';
};
};
audio = {
enable = lib.mkOption {
type = lib.types.bool;
@ -153,10 +79,20 @@ in {
https://github.com/PipeWire/pipewire/blob/master/NEWS
'';
};
};
};
imports = [
(lib.mkRemovedOptionModule ["services" "pipewire" "config"] ''
Overriding default Pipewire configuration through NixOS options never worked correctly and is no longer supported.
Please create drop-in files in /etc/pipewire/pipewire.conf.d/ to make the desired setting changes instead.
'')
(lib.mkRemovedOptionModule ["services" "pipewire" "media-session"] ''
pipewire-media-session is no longer supported upstream and has been removed.
Please switch to `services.pipewire.wireplumber` instead.
'')
];
###### implementation
config = mkIf cfg.enable {
@ -222,22 +158,6 @@ in {
source = "${cfg.package}/share/alsa/alsa.conf.d/99-pipewire-default.conf";
};
environment.etc."pipewire/client.conf" = {
source = json.generate "client.conf" configs.client;
};
environment.etc."pipewire/client-rt.conf" = {
source = json.generate "client-rt.conf" configs.client-rt;
};
environment.etc."pipewire/jack.conf" = {
source = json.generate "jack.conf" configs.jack;
};
environment.etc."pipewire/pipewire.conf" = {
source = json.generate "pipewire.conf" configs.pipewire;
};
environment.etc."pipewire/pipewire-pulse.conf" = mkIf cfg.pulse.enable {
source = json.generate "pipewire-pulse.conf" configs.pipewire-pulse;
};
environment.sessionVariables.LD_LIBRARY_PATH =
lib.mkIf cfg.jack.enable [ "${cfg.package.jack}/lib" ];
@ -256,12 +176,5 @@ in {
};
groups.pipewire.gid = config.ids.gids.pipewire;
};
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/464#note_723554
systemd.services.pipewire.environment."PIPEWIRE_LINK_PASSIVE" = "1";
systemd.user.services.pipewire.environment."PIPEWIRE_LINK_PASSIVE" = "1";
# pipewire-pulse default config expects pactl to be in PATH
systemd.user.services.pipewire-pulse.path = lib.mkIf cfg.pulse.enable [ pkgs.pulseaudio ];
};
}

View file

@ -28,10 +28,6 @@ in
config = lib.mkIf cfg.enable {
assertions = [
{
assertion = !config.services.pipewire.media-session.enable;
message = "WirePlumber and pipewire-media-session can't be enabled at the same time.";
}
{
assertion = !config.hardware.bluetooth.hsphfpd.enable;
message = "Using Wireplumber conflicts with hsphfpd, as it provides the same functionality. `hardware.bluetooth.hsphfpd.enable` needs be set to false";

View file

@ -323,7 +323,7 @@ in
account sufficient pam_unix.so
password requisite pam_unix.so nullok sha512
password requisite pam_unix.so nullok yescrypt
session optional pam_keyinit.so revoke
session include login

View file

@ -302,7 +302,7 @@ in
account sufficient pam_unix.so
password requisite pam_unix.so nullok sha512
password requisite pam_unix.so nullok yescrypt
session optional pam_keyinit.so revoke
session include login

View file

@ -79,6 +79,8 @@ let
# Filesystems.
"systemd-fsck@.service"
"systemd-fsck-root.service"
"systemd-growfs@.service"
"systemd-growfs-root.service"
"systemd-remount-fs.service"
"systemd-pstore.service"
"local-fs.target"

View file

@ -56,6 +56,7 @@ let
"systemd-ask-password-console.path"
"systemd-ask-password-console.service"
"systemd-fsck@.service"
"systemd-growfs@.service"
"systemd-halt.service"
"systemd-hibernate-resume@.service"
"systemd-journald-audit.socket"
@ -371,6 +372,7 @@ in {
managerEnvironment.PATH = "/bin:/sbin";
contents = {
"/tmp/.keep".text = "systemd requires the /tmp mount point in the initrd cpio archive";
"/init".source = "${cfg.package}/lib/systemd/systemd";
"/etc/systemd/system".source = stage1Units;

View file

@ -8,7 +8,7 @@ expected_lines = {
"auth sufficient pam_rootok.so",
"auth sufficient pam_unix.so likeauth try_first_pass",
"password sufficient @@pam_krb5@@/lib/security/pam_krb5.so use_first_pass",
"password sufficient pam_unix.so nullok sha512",
"password sufficient pam_unix.so nullok yescrypt",
"session optional @@pam_krb5@@/lib/security/pam_krb5.so",
"session required pam_env.so conffile=/etc/pam/environment readenv=0",
"session required pam_unix.so",

View file

@ -15,7 +15,7 @@
, musepackSupport ? true, libmpc, libmpcdec, taglib
, vorbisSupport ? true, libvorbis
, speexSupport ? true, speex
, ffmpegSupport ? true, ffmpeg
, ffmpegSupport ? true, ffmpeg_4
, sndfileSupport ? true, libsndfile
, wavpackSupport ? true, wavpack
# Misc
@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
++ lib.optionals musepackSupport [ libmpc libmpcdec taglib ]
++ lib.optional vorbisSupport libvorbis
++ lib.optional speexSupport speex
++ lib.optional ffmpegSupport ffmpeg
++ lib.optional ffmpegSupport ffmpeg_4
++ lib.optional sndfileSupport libsndfile
++ lib.optional wavpackSupport wavpack
# Misc

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, eigen, ffmpeg }:
{ lib, stdenv, fetchFromGitHub, cmake, eigen, ffmpeg_4 }:
stdenv.mkDerivation {
pname = "musly";
version = "unstable-2017-04-26";
@ -9,7 +9,7 @@ stdenv.mkDerivation {
sha256 = "1q42wvdwy2pac7bhfraqqj2czw7w2m33ms3ifjl8phm7d87i8825";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ eigen ffmpeg ];
buildInputs = [ eigen ffmpeg_4 ];
fixupPhase = lib.optionalString stdenv.isDarwin ''
install_name_tool -change libmusly.dylib $out/lib/libmusly.dylib $out/bin/musly
install_name_tool -change libmusly_resample.dylib $out/lib/libmusly_resample.dylib $out/bin/musly

View file

@ -16,6 +16,10 @@ mkDerivation rec {
buildInputs = [ alsa-lib fluidsynth libjack2 qtbase qttools qtx11extras ];
enableParallelBuilding = true;
# Missing install depends:
# lrelease error: Parse error at src/translations/qsynth_ru.ts:1503:33: Premature end of document.
# make: *** [Makefile:107: src/translations/qsynth_ru.qm] Error 1
enableParallelInstalling = false;
meta = with lib; {
description = "Fluidsynth GUI";

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, autoreconfHook, intltool, pkg-config, ffmpeg, wxGTK32, gtk3, wrapGAppsHook }:
{ lib, stdenv, fetchFromGitHub, autoreconfHook, intltool, pkg-config, ffmpeg_4, wxGTK32, gtk3, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "spek";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook intltool pkg-config wrapGAppsHook ];
buildInputs = [ ffmpeg wxGTK32 gtk3 ];
buildInputs = [ ffmpeg_4 wxGTK32 gtk3 ];
meta = with lib; {
description = "Analyse your audio files by showing their spectrogram";

View file

@ -30,7 +30,7 @@
, expat
, libid3tag
, libopus
, ffmpeg
, ffmpeg_4
, soundtouch
, pcre
, portaudio
@ -110,7 +110,7 @@ stdenv.mkDerivation rec {
buildInputs = [
alsa-lib
expat
ffmpeg
ffmpeg_4
file
flac
glib

View file

@ -58,7 +58,7 @@ stdenv.mkDerivation rec {
homepage = "https://www.bitcoinunlimited.info/";
maintainers = with maintainers; [ DmitryTsygankov ];
license = licenses.mit;
broken = stdenv.isDarwin;
broken = true;
platforms = platforms.unix;
};
}

View file

@ -54,5 +54,6 @@ stdenv.mkDerivation rec {
license = licenses.mit;
maintainers = with maintainers; [ edwtjo offline ];
platforms = platforms.unix;
broken = true;
};
}

View file

@ -64,7 +64,7 @@ stdenv.mkDerivation rec {
'';
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
broken = true;
description = "An open source crypto-currency focused on fast private transactions";
longDescription = ''
PIVX is an MIT licensed, open source, blockchain-based cryptocurrency with

View file

@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }:
rec {
version = "9.0.1369";
version = "9.0.1403";
src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
hash = "sha256-2YjWd07RMyiITnuI3/L0D9MiAxl2+9QVT1nrMBA9/dI=";
hash = "sha256-z+zLRO0yqWu/l3eOzD7pmUvmqhmkH5W9z7wE9QWlsG0=";
};
enableParallelBuilding = true;

View file

@ -1,4 +1,4 @@
{ expat, fetchFromGitHub, ffmpeg, fontconfig, freetype, libarchive, libjpeg
{ expat, fetchFromGitHub, ffmpeg_4, fontconfig, freetype, libarchive, libjpeg
, libGLU, libGL, openal, pkg-config, sfml, lib, stdenv, zlib
}:
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
'';
buildInputs = [
expat ffmpeg fontconfig freetype libarchive libjpeg libGLU libGL openal sfml zlib
expat ffmpeg_4 fontconfig freetype libarchive libjpeg libGLU libGL openal sfml zlib
];
meta = with lib; {

View file

@ -20,7 +20,7 @@
, enableCubeb ? true, libpulseaudio
, enableFfmpegAudioDecoder ? true
, enableFfmpegVideoDumper ? true
, ffmpeg
, ffmpeg_4
, useDiscordRichPresence ? true, rapidjson
, enableFdk ? false, fdk_aac
}:
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
++ lib.optional enableSdl2 SDL2
++ lib.optional enableQtTranslation qttools
++ lib.optional enableCubeb libpulseaudio
++ lib.optional (enableFfmpegAudioDecoder || enableFfmpegVideoDumper) ffmpeg
++ lib.optional (enableFfmpegAudioDecoder || enableFfmpegVideoDumper) ffmpeg_4
++ lib.optional useDiscordRichPresence rapidjson
++ lib.optional enableFdk fdk_aac;

View file

@ -1,5 +1,5 @@
{ lib, stdenv, fetchurl, autoreconfHook, intltool, pkg-config, gtk3, SDL2, xorg
, wrapGAppsHook, libcdio, nasm, ffmpeg, file
, wrapGAppsHook, libcdio, nasm, ffmpeg_4, file
, fetchpatch }:
stdenv.mkDerivation rec {
@ -52,7 +52,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook intltool pkg-config wrapGAppsHook ];
buildInputs = [
gtk3 SDL2 xorg.libXv xorg.libXtst libcdio nasm ffmpeg file
gtk3 SDL2 xorg.libXv xorg.libXtst libcdio nasm ffmpeg_4 file
xorg.libXxf86vm
];

View file

@ -4,7 +4,7 @@
, SDL2
, cmake
, copyDesktopItems
, ffmpeg
, ffmpeg_4
, glew
, libffi
, libsForQt5
@ -59,7 +59,7 @@ stdenv.mkDerivation (self: {
buildInputs = [
SDL2
ffmpeg
ffmpeg_4
(glew.override { enableEGL = forceWayland; })
libzip
snappy

View file

@ -7,6 +7,7 @@
, curl
, fetchFromGitHub
, ffmpeg
, ffmpeg_4
, fluidsynth
, gettext
, hexdump
@ -755,7 +756,7 @@ in
ppsspp = mkLibretroCore {
core = "ppsspp";
extraNativeBuildInputs = [ cmake pkg-config python3 ];
extraBuildInputs = [ libGLU libGL libzip ffmpeg snappy xorg.libX11 ];
extraBuildInputs = [ libGLU libGL libzip ffmpeg_4 snappy xorg.libX11 ];
makefile = "Makefile";
cmakeFlags = [
"-DLIBRETRO=ON"

View file

@ -24,7 +24,7 @@
, boost
, eigen
, exiv2
, ffmpeg
, ffmpeg_4
, flex
, graphviz
, imagemagick
@ -70,7 +70,7 @@ mkDerivation rec {
boost
eigen
exiv2
ffmpeg
ffmpeg_4
flex
graphviz
imagemagick

View file

@ -72,5 +72,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2;
homepage = "http://www.pawfal.org/fluxus/";
maintainers = [ maintainers.brainrape ];
broken = true;
};
}

View file

@ -78,5 +78,6 @@ clangStdenv.mkDerivation rec {
platforms = platforms.linux;
mainProgram = "decoder";
maintainers = with maintainers; [ zendo ];
broken = true;
};
}

View file

@ -5,6 +5,7 @@
, x11Support ? graphicsSupport, libX11
, mouseSupport ? !stdenv.isDarwin, gpm-ncurses
, perl, man, pkg-config, buildPackages, w3m
, testers
}:
let
@ -19,13 +20,13 @@ let
};
in stdenv.mkDerivation rec {
pname = "w3m";
version = "0.5.3+git20220429";
version = "0.5.3+git20230121";
src = fetchFromGitHub {
owner = "tats";
repo = pname;
rev = "v${version}";
hash = "sha256-aPPLZjjL3A5Tk0hv0NoAwJnjemC7a5RUoubhUr3lQE4=";
hash = "sha256-upb5lWqhC1jRegzTncIz5e21v4Pw912FyVn217HucFs=";
};
NIX_LDFLAGS = lib.optionalString stdenv.isSunOS "-lsocket -lnsl";
@ -84,11 +85,19 @@ in stdenv.mkDerivation rec {
# see: https://bbs.archlinux.org/viewtopic.php?id=196093
LIBS = lib.optionalString x11Support "-lX11";
passthru.tests.version = testers.testVersion {
inherit version;
package = w3m;
command = "w3m -version";
};
meta = with lib; {
homepage = "https://w3m.sourceforge.net/";
changelog = "https://github.com/tats/w3m/blob/v${version}/ChangeLog";
description = "A text-mode web browser";
maintainers = with maintainers; [ cstrahan anthonyroussel ];
platforms = platforms.unix;
license = licenses.mit;
mainProgram = "w3m";
};
}

View file

@ -16,7 +16,7 @@
, kwayland
, lz4
, xxHash
, ffmpeg
, ffmpeg_4
, openalSoft
, minizip
, libopus
@ -132,7 +132,7 @@ stdenv.mkDerivation rec {
qtsvg
lz4
xxHash
ffmpeg
ffmpeg_4
openalSoft
minizip
libopus

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitHub, cmake, libpcap, libnet, zlib, curl, pcre
{ lib, stdenv, fetchFromGitHub, fetchpatch2, cmake, libpcap, libnet, zlib, curl, pcre
, openssl, ncurses, glib, gtk3, atk, pango, flex, bison, geoip, harfbuzz
, pkg-config }:
@ -13,6 +13,14 @@ stdenv.mkDerivation rec {
sha256 = "1sdf1ssa81ib6k0mc5m2jzbjl4jd1yv6ahv5dwx2x9w4b2pyqg1c";
};
patches = [
(fetchpatch2 {
name = "curl-8.patch";
url = "https://github.com/Ettercap/ettercap/commit/9ec4066addc49483e40055e0738c2e0ef144702f.diff";
sha256 = "6D8lIxub0OS52BFr42yWRyqS2Q5CrpTLTt6rcItXFMM=";
})
];
strictDeps = true;
nativeBuildInputs = [ cmake flex bison pkg-config ];
buildInputs = [

View file

@ -1,7 +1,7 @@
{ lib, stdenv, fetchFromGitHub, cmake, zlib, libglvnd, libGLU, wrapQtAppsHook
, sshSupport ? true, openssl, libssh
, tetgenSupport ? true, tetgen
, ffmpegSupport ? true, ffmpeg
, ffmpegSupport ? true, ffmpeg_4
, dicomSupport ? false, dcmtk
, withModelRepo ? true
, withCadFeatures ? false
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib libglvnd libGLU openssl libssh ]
++ lib.optional sshSupport openssl
++ lib.optional tetgenSupport tetgen
++ lib.optional ffmpegSupport ffmpeg
++ lib.optional ffmpegSupport ffmpeg_4
++ lib.optional dicomSupport dcmtk
;

View file

@ -73,6 +73,7 @@ stdenv.mkDerivation (finalAttrs: {
FC="${gfortran}/bin/gfortran" F77="${gfortran}/bin/gfortran"
JAVA_HOME="${jdk}"
RANLIB=$(type -p ranlib)
r_cv_have_curl728=yes
R_SHELL="${stdenv.shell}"
'' + lib.optionalString stdenv.isDarwin ''
--disable-R-framework

View file

@ -28,6 +28,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
enableParallelBuilding = true;
# Missing install depends:
# cp: cannot stat '...-gretl-2022c/share/gretl/data/plotbars': Not a directory
# make[1]: *** [Makefile:73: install_datafiles] Error 1
enableParallelInstalling = false;
meta = with lib; {
description = "A software package for econometric analysis";

View file

@ -1,4 +1,4 @@
{ lib, bzip2, cmake, eigen, fetchFromGitHub, ffmpeg, fox_1_6, gdal,
{ lib, bzip2, cmake, eigen, fetchFromGitHub, ffmpeg_4, fox_1_6, gdal,
git, gl2ps, gpp , gtest, jdk, libGL, libGLU, libX11, libjpeg,
libpng, libtiff, libxcrypt, openscenegraph , proj, python3,
python3Packages, stdenv, swig, xercesc, xorg, zlib }:
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
buildInputs = [
bzip2
eigen
ffmpeg
ffmpeg_4
fox_1_6
gdal
gl2ps

View file

@ -32,7 +32,8 @@ stdenv.mkDerivation rec {
meta = with lib; {
# error: unsupported option '-fsanitize=safe-stack' for target 'x86_64-apple-darwin'
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
# broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
broken = true; # sendmsg.c:(.text+0x1099): undefined reference to `pthread_yield'
homepage = "https://syncterm.bbsdev.net/";
description = "BBS terminal emulator";
maintainers = with maintainers; [ embr ];

View file

@ -100,6 +100,10 @@ let
inherit perlBindings pythonBindings;
enableParallelBuilding = true;
# Missing install dependencies:
# libtool: error: error: relink 'libsvn_ra_serf-1.la' with the above command before installing it
# make: *** [build-outputs.mk:1316: install-serf-lib] Error 1
enableParallelInstalling = false;
nativeCheckInputs = [ python3 ];
doCheck = false; # fails 10 out of ~2300 tests

View file

@ -1,4 +1,4 @@
{ mkDerivation, lib, fetchurl, pkg-config, ffmpeg, glew, libass, openal, qtbase }:
{ mkDerivation, lib, fetchurl, pkg-config, ffmpeg_4, glew, libass, openal, qtbase }:
mkDerivation rec {
pname = "bino";
@ -11,7 +11,7 @@ mkDerivation rec {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ ffmpeg glew libass openal qtbase ];
buildInputs = [ ffmpeg_4 glew libass openal qtbase ];
enableParallelBuilding = true;

View file

@ -8,7 +8,7 @@
, dvdplusrwtools
, enca
, cdrkit
, ffmpeg
, ffmpeg_4
, gettext
, gtk2
, gtkmm2
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
dvdauthor
dvdplusrwtools
enca
ffmpeg
ffmpeg_4
gtk2
gtkmm2
libdvdread
@ -81,7 +81,7 @@ stdenv.mkDerivation rec {
# fix iso authoring
install -Dt $out/share/bombono/resources/scons_authoring tools/scripts/SConsTwin.py
wrapProgram $out/bin/bombono-dvd --prefix PATH : ${lib.makeBinPath [ ffmpeg dvdauthor cdrkit ]}
wrapProgram $out/bin/bombono-dvd --prefix PATH : ${lib.makeBinPath [ ffmpeg_4 dvdauthor cdrkit ]}
'';
meta = with lib; {

View file

@ -9,7 +9,7 @@
, makeWrapper
, tesseract4
, leptonica
, ffmpeg
, ffmpeg_4
}:
stdenv.mkDerivation rec {
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib ]
++ lib.optional (!stdenv.isLinux) libiconv
++ lib.optionals enableOcr [ leptonica tesseract4 ffmpeg ];
++ lib.optionals enableOcr [ leptonica tesseract4 ffmpeg_4 ];
cmakeFlags = [
# file RPATH_CHANGE could not write new RPATH:

View file

@ -7,7 +7,7 @@
, docbook-xsl-nons
, dvdauthor
, dvdplusrwtools
, ffmpeg
, ffmpeg_4
, flex
, fontconfig
, gettext
@ -61,7 +61,7 @@ in stdenv.mkDerivation rec {
cdrtools
dvdauthor
dvdplusrwtools
ffmpeg
ffmpeg_4
fontconfig
glib
libexif

View file

@ -1,4 +1,4 @@
{ config, lib, stdenv, fetchurl, fetchsvn, pkg-config, freetype, yasm, ffmpeg
{ config, lib, stdenv, fetchurl, fetchsvn, pkg-config, freetype, yasm, ffmpeg_4
, aalibSupport ? true, aalib
, fontconfigSupport ? true, fontconfig, freefont_ttf
, fribidiSupport ? true, fribidi
@ -87,7 +87,7 @@ stdenv.mkDerivation rec {
depsBuildBuild = [ buildPackages.stdenv.cc ];
nativeBuildInputs = [ pkg-config yasm ];
buildInputs = with lib;
[ freetype ffmpeg ]
[ freetype ffmpeg_4 ]
++ optional aalibSupport aalib
++ optional fontconfigSupport fontconfig
++ optional fribidiSupport fribidi

View file

@ -5,7 +5,7 @@
, which
, frei0r
, opencolorio
, ffmpeg-full
, ffmpeg_4
, CoreFoundation
, cmake
, wrapQtAppsHook
@ -54,7 +54,7 @@ stdenv.mkDerivation {
];
buildInputs = [
ffmpeg-full
ffmpeg_4
frei0r
opencolorio
openimageio

View file

@ -60,5 +60,6 @@ stdenv.mkDerivation rec {
license = licenses.bsd3;
maintainers = with maintainers; [ ckie ];
platforms = with platforms; linux;
broken = true;
};
}

View file

@ -1,4 +1,4 @@
{ lib, stdenv, mkDerivation, fetchFromGitHub, alsa-lib, ffmpeg, libjack2, libX11, libXext, libXinerama, qtx11extras
{ lib, stdenv, mkDerivation, fetchFromGitHub, alsa-lib, ffmpeg_4, libjack2, libX11, libXext, libXinerama, qtx11extras
, libXfixes, libGLU, libGL, pkg-config, libpulseaudio, libv4l, qtbase, qttools, cmake, ninja
}:
@ -30,7 +30,7 @@ mkDerivation rec {
nativeBuildInputs = [ pkg-config cmake ninja ];
buildInputs = [
alsa-lib ffmpeg libjack2 libX11 libXext libXfixes libXinerama libGLU libGL
alsa-lib ffmpeg_4 libjack2 libX11 libXext libXfixes libXinerama libGLU libGL
libpulseaudio libv4l qtbase qttools qtx11extras
];

View file

@ -1,6 +1,6 @@
{ lib, fetchFromGitHub, pkg-config, libxcb, mkDerivation, cmake
, qtbase, qtdeclarative, qtquickcontrols, qtquickcontrols2
, ffmpeg-full, gst_all_1, libpulseaudio, alsa-lib, jack2
, ffmpeg_4, gst_all_1, libpulseaudio, alsa-lib, jack2
, v4l-utils }:
mkDerivation rec {
pname = "webcamoid";
@ -16,7 +16,7 @@ mkDerivation rec {
buildInputs = [
libxcb
qtbase qtdeclarative qtquickcontrols qtquickcontrols2
ffmpeg-full
ffmpeg_4
gst_all_1.gstreamer gst_all_1.gst-plugins-base
alsa-lib libpulseaudio jack2
v4l-utils

View file

@ -35,6 +35,9 @@ stdenv.mkDerivation {
implementation = lapackImplementation;
};
# TODO: drop this forced rebuild, as it was needed just once.
rebuild_salt = if stdenv.isDarwin && stdenv.isx86_64 then "J4AQ" else null;
dontBuild = true;
dontConfigure = true;
unpackPhase = "src=$PWD";

View file

@ -228,6 +228,10 @@ stdenv.mkDerivation {
if [ -e $ccPath/cpp ]; then
wrap ${targetPrefix}cpp $wrapper $ccPath/cpp
'' + lib.optionalString (hostPlatform != targetPlatform) ''
elif [ -e $ccPath/${targetPrefix}cpp ]; then
wrap ${targetPrefix}cpp $wrapper $ccPath/${targetPrefix}cpp
'' + ''
fi
''

View file

@ -190,7 +190,7 @@ rec {
cat > /etc/pam.d/other <<EOF
account sufficient pam_unix.so
auth sufficient pam_rootok.so
password requisite pam_unix.so nullok sha512
password requisite pam_unix.so nullok yescrypt
session required pam_unix.so
EOF
fi

View file

@ -13,13 +13,14 @@ postFixupHooks+=(_multioutPropagateDev)
# specific to this function's use case, which is setting up the output variables.
_assignFirst() {
local varName="$1"
local _var
local REMOVE=REMOVE # slightly hacky - we allow REMOVE (i.e. not a variable name)
shift
for var in "$@"; do
if [ -n "${!var-}" ]; then eval "${varName}"="${var}"; return; fi
for _var in "$@"; do
if [ -n "${!_var-}" ]; then eval "${varName}"="${_var}"; return; fi
done
echo
echo "error: _assignFirst: could not find a non-empty variable to assign to ${varName}."
echo "error: _assignFirst: could not find a non-empty variable whose name to assign to ${varName}."
echo " The following variables were all unset or empty:"
echo " $*"
if [ -z "${out:-}" ]; then
@ -138,9 +139,9 @@ moveToOutput() {
# remove empty directories, printing iff at least one gets removed
local srcParent="$(readlink -m "$srcPath/..")"
if rmdir "$srcParent"; then
if [ -n "$(find "$srcParent" -maxdepth 0 -type d -empty 2>/dev/null)" ]; then
echo "Removing empty $srcParent/ and (possibly) its parents"
rmdir -p --ignore-fail-on-non-empty "$(readlink -m "$srcParent/..")" \
rmdir -p --ignore-fail-on-non-empty "$srcParent" \
2> /dev/null || true # doesn't ignore failure for some reason
fi
done

View file

@ -11,6 +11,9 @@ _separateDebugInfo() {
local dst="${debug:-$out}"
if [ "$prefix" = "$dst" ]; then return 0; fi
# in case there is nothing to strip, don't fail the build
mkdir -p "$dst"
dst="$dst/lib/debug/.build-id"
# Find executables and dynamic libraries.

View file

@ -32,6 +32,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
maintainers = with maintainers; [ doronbehar ];
platforms = platforms.linux;
broken = true;
};
}

View file

@ -249,9 +249,11 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags =
let target =
lib.optionalString (profiledCompiler) "profiled" +
lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap";
in lib.optional (target != "") target;
inherit (callFile ../common/strip-attributes.nix { })
stripDebugList

View file

@ -284,9 +284,11 @@ stdenv.mkDerivation ({
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
buildFlags = optional
(targetPlatform == hostPlatform && hostPlatform == buildPlatform)
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
buildFlags =
let target =
lib.optionalString (profiledCompiler) "profiled" +
lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap";
in lib.optional (target != "") target;
inherit (callFile ../common/strip-attributes.nix { })
stripDebugList

View file

@ -250,6 +250,17 @@ postInstall() {
done
fi
# Cross-compiler specific:
# --with-headers=$dir option triggers gcc to make a private copy
# of $dir headers and use it later as `-isysroot`. This prevents
# cc-wrapper from overriding libc headers with `-idirafter`.
# It should be safe to drop it and rely solely on the cc-wrapper.
local sysinc_dir=$out/${targetConfig+$targetConfig/}sys-include
if [ -d "$sysinc_dir" ]; then
chmod -R u+w "$out/${targetConfig+$targetConfig/}sys-include"
rm -rfv "$out/${targetConfig+$targetConfig/}sys-include"
fi
# Get rid of some "fixed" header files
rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux}

View file

@ -6,6 +6,7 @@
, perl
, unzip
, zlib
, libxcrypt-legacy
# extra params
, product
, javaVersion
@ -46,6 +47,7 @@ stdenv.mkDerivation ({
buildInputs = [
stdenv.cc.cc.lib # libstdc++.so.6
zlib
libxcrypt-legacy # libcrypt.so.1 (default is .2 now)
] ++ extraBuildInputs;
unpackPhase = ''

View file

@ -26,7 +26,6 @@ let
buildInputs = [ libxml2 libllvm ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
] ++ lib.optionals enableManpages [

View file

@ -33,6 +33,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
"-DCMAKE_C_COMPILER_WORKS=ON"
@ -61,6 +62,10 @@ stdenv.mkDerivation {
./gnu-install-dirs.patch
../../common/compiler-rt/libsanitizer-no-cyclades-11.patch
./X86-support-extension.patch # backported from LLVM 11
# Fix build on armv6l
../../common/compiler-rt/armv6-mcr-dmb.patch
../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
] ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks

View file

@ -15,6 +15,8 @@
, zlib
, buildLlvmTools
, debugVersion ? false
, doCheck ? stdenv.isLinux && (!stdenv.isx86_32)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
@ -30,6 +32,29 @@ let
shortVersion = with lib;
concatStringsSep "." (take 1 (splitString "." release_version));
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -48,7 +73,7 @@ in stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [ libxml2 libffi ]
@ -255,8 +280,7 @@ in stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -28,7 +28,6 @@ let
buildInputs = [ libxml2 libllvm ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
] ++ lib.optionals enableManpages [

View file

@ -34,6 +34,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals (!haveLibc || bareMetal) [
"-DCMAKE_C_COMPILER_WORKS=ON"
@ -66,6 +67,10 @@ stdenv.mkDerivation {
../../common/compiler-rt/libsanitizer-no-cyclades-11.patch
../../common/compiler-rt/darwin-plistbuddy-workaround.patch
./armv7l.patch
# Fix build on armv6l
../../common/compiler-rt/armv6-mcr-dmb.patch
../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
];
preConfigure = lib.optionalString stdenv.hostPlatform.isDarwin ''

View file

@ -15,6 +15,8 @@
, zlib
, buildLlvmTools
, debugVersion ? false
, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) && (!stdenv.hostPlatform.isRiscV)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
@ -30,6 +32,29 @@ let
shortVersion = with lib;
concatStringsSep "." (take 1 (splitString "." release_version));
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -48,7 +73,7 @@ in stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [ libxml2 libffi ]
@ -267,8 +292,7 @@ in stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl) && (!stdenv.hostPlatform.isRiscV)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -29,7 +29,6 @@ let
buildInputs = [ libxml2 libllvm ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
] ++ lib.optionals enableManpages [

View file

@ -34,8 +34,9 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON"
@ -66,6 +67,10 @@ stdenv.mkDerivation {
./normalize-var.patch
../../common/compiler-rt/darwin-plistbuddy-workaround.patch
./armv7l.patch
# Fix build on armv6l
../../common/compiler-rt/armv6-mcr-dmb.patch
../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks

View file

@ -15,6 +15,8 @@
, zlib
, buildLlvmTools
, debugVersion ? false
, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
@ -30,6 +32,29 @@ let
shortVersion = with lib;
concatStringsSep "." (take 1 (splitString "." release_version));
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -48,7 +73,7 @@ in stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [ libxml2 libffi ]
@ -255,8 +280,7 @@ in stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -19,7 +19,6 @@ let
buildInputs = [ libxml2 libllvm ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
] ++ lib.optionals enableManpages [

View file

@ -37,9 +37,10 @@ stdenv.mkDerivation {
] ++ lib.optionals (useLLVM || bareMetal || isMusl) [
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
"-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON"
@ -71,6 +72,12 @@ stdenv.mkDerivation {
./darwin-targetconditionals.patch
../../common/compiler-rt/darwin-plistbuddy-workaround.patch
./armv7l.patch
# Fix build on armv6l
../../common/compiler-rt/armv6-mcr-dmb.patch
../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
../../common/compiler-rt/armv6-scudo-no-yield.patch
../../common/compiler-rt/armv6-scudo-libatomic.patch
];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks

View file

@ -16,6 +16,8 @@
, which
, buildLlvmTools
, debugVersion ? false
, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
@ -31,6 +33,29 @@ let
shortVersion = with lib;
concatStringsSep "." (take 1 (splitString "." release_version));
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -40,7 +65,7 @@ in stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [ libxml2 libffi ]
@ -217,8 +242,7 @@ in stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -27,7 +27,6 @@ let
buildInputs = [ libxml2 libllvm ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++14"
"-DCLANGD_BUILD_XPC=OFF"
"-DLLVM_ENABLE_RTTI=ON"
] ++ lib.optionals enableManpages [

View file

@ -81,6 +81,12 @@ stdenv.mkDerivation {
./darwin-targetconditionals.patch
../../common/compiler-rt/darwin-plistbuddy-workaround.patch
./armv7l.patch
# Fix build on armv6l
../../common/compiler-rt/armv6-mcr-dmb.patch
../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
../../common/compiler-rt/armv6-scudo-no-yield.patch
../../common/compiler-rt/armv6-scudo-libatomic.patch
];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks

View file

@ -1,6 +1,6 @@
{ lowPrio, newScope, pkgs, lib, stdenv, cmake
, gccForLibs, preLibcCrossHeaders
, libxml2, python3, isl, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
, libxml2, python3, fetchFromGitHub, overrideCC, wrapCCWith, wrapBintoolsWith
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
, targetLlvm
@ -52,7 +52,7 @@ let
};
tools = lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version monorepoSrc buildLlvmTools; });
callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 release_version version monorepoSrc buildLlvmTools; });
mkExtraBuildCommands0 = cc: ''
rsrc="$out/resource-root"
mkdir "$rsrc"
@ -232,7 +232,7 @@ let
});
libraries = lib.makeExtensible (libraries: let
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version monorepoSrc; });
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 release_version version monorepoSrc; });
in {
compiler-rt-libc = callPackage ./compiler-rt {

View file

@ -17,12 +17,14 @@
, which
, buildLlvmTools
, debugVersion ? false
, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
# broken for the armv7l builder
, enablePFM ? stdenv.isLinux && !stdenv.hostPlatform.isAarch
, enablePolly ? false
, enablePolly ? true
} @args:
let
@ -32,6 +34,29 @@ let
shortVersion = with lib;
concatStringsSep "." (take 1 (splitString "." release_version));
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -42,14 +67,15 @@ in stdenv.mkDerivation (rec {
cp -r ${monorepoSrc}/${pname} "$out"
cp -r ${monorepoSrc}/third-party "$out"
'' + lib.optionalString enablePolly ''
cp -r ${monorepoSrc}/polly "$out/llvm/tools"
chmod u+w "$out/${pname}/tools"
cp -r ${monorepoSrc}/polly "$out/${pname}/tools"
'');
sourceRoot = "${src.name}/${pname}";
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [ libxml2 libffi ]
@ -229,8 +255,7 @@ in stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isMusl)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -1,77 +1,7 @@
diff --git a/tools/polly/CMakeLists.txt b/tools/polly/CMakeLists.txt
index ca7c04c565bb..6a6155806ffa 100644
--- a/tools/polly/CMakeLists.txt
+++ b/tools/polly/CMakeLists.txt
@@ -3,6 +3,8 @@ if (NOT DEFINED LLVM_MAIN_SRC_DIR)
project(Polly)
cmake_minimum_required(VERSION 3.13.4)
+ include(GNUInstallDirs)
+
# Where is LLVM installed?
find_package(LLVM CONFIG REQUIRED)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${LLVM_CMAKE_DIR})
@@ -122,13 +124,13 @@ include_directories(
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
install(DIRECTORY include/
- DESTINATION include
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING
PATTERN "*.h"
)
install(DIRECTORY ${POLLY_BINARY_DIR}/include/
- DESTINATION include
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
FILES_MATCHING
PATTERN "*.h"
PATTERN "CMakeFiles" EXCLUDE
diff --git a/tools/polly/cmake/CMakeLists.txt b/tools/polly/cmake/CMakeLists.txt
index 7cc129ba2e90..137be25e4b80 100644
--- a/tools/polly/cmake/CMakeLists.txt
+++ b/tools/polly/cmake/CMakeLists.txt
@@ -79,18 +79,18 @@ file(GENERATE
# Generate PollyConfig.cmake for the install tree.
unset(POLLY_EXPORTS)
-set(POLLY_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
+set(POLLY_INSTALL_PREFIX "")
set(POLLY_CONFIG_LLVM_CMAKE_DIR "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
-set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
-set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}")
+set(POLLY_CONFIG_CMAKE_DIR "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_PREFIX}/${POLLY_INSTALL_PACKAGE_DIR}")
+set(POLLY_CONFIG_LIBRARY_DIRS "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}${LLVM_LIBDIR_SUFFIX}")
if (POLLY_BUNDLED_ISL)
set(POLLY_CONFIG_INCLUDE_DIRS
- "${POLLY_INSTALL_PREFIX}/include"
- "${POLLY_INSTALL_PREFIX}/include/polly"
+ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}"
+ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_LIBDIR}/polly"
)
else()
set(POLLY_CONFIG_INCLUDE_DIRS
- "${POLLY_INSTALL_PREFIX}/include"
+ "${POLLY_INSTALL_PREFIX}${CMAKE_INSTALL_FULL_INCLUDEDIR}"
${ISL_INCLUDE_DIRS}
)
endif()
@@ -100,12 +100,12 @@ endif()
foreach(tgt IN LISTS POLLY_CONFIG_EXPORTED_TARGETS)
get_target_property(tgt_type ${tgt} TYPE)
if (tgt_type STREQUAL "EXECUTABLE")
- set(tgt_prefix "bin/")
+ set(tgt_prefix "${CMAKE_INSTALL_BINDIR}/")
else()
- set(tgt_prefix "lib/")
+ set(tgt_prefix "${CMAKE_INSTALL_LIBDIR}/")
endif()
- set(tgt_path "${CMAKE_INSTALL_PREFIX}/${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
+ set(tgt_path "${tgt_prefix}$<TARGET_FILE_NAME:${tgt}>")
file(RELATIVE_PATH tgt_path ${POLLY_CONFIG_CMAKE_DIR} ${tgt_path})
if (NOT tgt_type STREQUAL "INTERFACE_LIBRARY")
This is the one remaining Polly install dirs related change that hasn't made it
into upstream yet; previously this patch file also included:
https://reviews.llvm.org/D117541
diff --git a/tools/polly/cmake/polly_macros.cmake b/tools/polly/cmake/polly_macros.cmake
index 518a09b45a42..bd9d6f5542ad 100644
--- a/tools/polly/cmake/polly_macros.cmake
@ -87,16 +17,3 @@ index 518a09b45a42..bd9d6f5542ad 100644
endif()
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
endmacro(add_polly_library)
diff --git a/tools/polly/lib/External/CMakeLists.txt b/tools/polly/lib/External/CMakeLists.txt
index e3a5683fccdc..293b482eb28a 100644
--- a/tools/polly/lib/External/CMakeLists.txt
+++ b/tools/polly/lib/External/CMakeLists.txt
@@ -290,7 +290,7 @@ if (POLLY_BUNDLED_ISL)
install(DIRECTORY
${ISL_SOURCE_DIR}/include/
${ISL_BINARY_DIR}/include/
- DESTINATION include/polly
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/polly
FILES_MATCHING
PATTERN "*.h"
PATTERN "CMakeFiles" EXCLUDE

View file

@ -48,7 +48,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_MEMPROF=OFF"
"-DCOMPILER_RT_BUILD_ORC=OFF" # may be possible to build with musl if necessary
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM && !haveLibc) || bareMetal) [
"-DCMAKE_C_COMPILER_WORKS=ON"
"-DCMAKE_CXX_COMPILER_WORKS=ON"

View file

@ -30,6 +30,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCMAKE_C_COMPILER_WORKS=ON"

View file

@ -30,6 +30,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCMAKE_C_COMPILER_WORKS=ON"

View file

@ -13,6 +13,8 @@
, zlib
, buildLlvmTools
, fetchpatch
, doCheck ? stdenv.isLinux && (!stdenv.isi686)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, debugVersion ? false
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
@ -26,6 +28,29 @@ let
versionSuffixes = with lib;
let parts = splitVersion release_version; in
imap (i: _: concatStringsSep "." (take i parts)) parts;
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in
stdenv.mkDerivation (rec {
@ -46,7 +71,7 @@ stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optional enableManpages python3.pkgs.sphinx;
buildInputs = [ libxml2 libffi ];
@ -227,8 +252,7 @@ stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isi686)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -31,6 +31,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
"-DCMAKE_C_COMPILER_WORKS=ON"

View file

@ -15,6 +15,8 @@
, zlib
, buildLlvmTools
, debugVersion ? false
, doCheck ? stdenv.isLinux && (!stdenv.isx86_32)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
@ -31,6 +33,29 @@ let
let parts = splitVersion release_version; in
imap (i: _: concatStringsSep "." (take i parts)) parts;
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -49,7 +74,7 @@ in stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optional enableManpages python3.pkgs.sphinx;
buildInputs = [ libxml2 libffi ]
@ -245,8 +270,7 @@ in stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -31,6 +31,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
"-DCMAKE_C_COMPILER_WORKS=ON"

View file

@ -15,6 +15,8 @@
, zlib
, buildLlvmTools
, debugVersion ? false
, doCheck ? stdenv.isLinux && (!stdenv.isx86_32)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
@ -30,6 +32,29 @@ let
shortVersion = with lib;
concatStringsSep "." (take 1 (splitVersion release_version));
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -48,7 +73,7 @@ in stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [ libxml2 libffi ]
@ -237,8 +262,7 @@ in stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -31,6 +31,7 @@ stdenv.mkDerivation {
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
"-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
] ++ lib.optionals (useLLVM || bareMetal) [
"-DCOMPILER_RT_BUILD_PROFILE=OFF"
] ++ lib.optionals ((useLLVM || bareMetal) && !haveLibc) [
"-DCMAKE_C_COMPILER_WORKS=ON"
@ -60,6 +61,10 @@ stdenv.mkDerivation {
./codesign.patch # Revert compiler-rt commit that makes codesign mandatory
./gnu-install-dirs.patch
../../common/compiler-rt/libsanitizer-no-cyclades-9.patch
# Fix build on armv6l
../../common/compiler-rt/armv6-mcr-dmb.patch
../../common/compiler-rt/armv6-sync-ops-no-thumb.patch
../../common/compiler-rt/armv6-no-ldrexd-strexd.patch
] ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch;
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks

View file

@ -15,6 +15,8 @@
, zlib
, buildLlvmTools
, debugVersion ? false
, doCheck ? stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isRiscV)
&& (stdenv.hostPlatform == stdenv.buildPlatform)
, enableManpages ? false
, enableSharedLibraries ? !stdenv.hostPlatform.isStatic
# broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
@ -30,6 +32,29 @@ let
shortVersion = with lib;
concatStringsSep "." (take 1 (splitString "." release_version));
# Ordinarily we would just the `doCheck` and `checkDeps` functionality
# `mkDerivation` gives us to manage our test dependencies (instead of breaking
# out `doCheck` as a package level attribute).
#
# Unfortunately `lit` does not forward `$PYTHONPATH` to children processes, in
# particular the children it uses to do feature detection.
#
# This means that python deps we add to `checkDeps` (which the python
# interpreter is made aware of via `$PYTHONPATH` populated by the python
# setup hook) are not picked up by `lit` which causes it to skip tests.
#
# Adding `python3.withPackages (ps: [ ... ])` to `checkDeps` also doesn't work
# because this package is shadowed in `$PATH` by the regular `python3`
# package.
#
# So, we "manually" assemble one python derivation for the package to depend
# on, taking into account whether checks are enabled or not:
python = if doCheck then
let
checkDeps = ps: with ps; [ psutil ];
in python3.withPackages checkDeps
else python3;
in stdenv.mkDerivation (rec {
pname = "llvm";
inherit version;
@ -48,7 +73,7 @@ in stdenv.mkDerivation (rec {
outputs = [ "out" "lib" "dev" "python" ];
nativeBuildInputs = [ cmake python3 ]
nativeBuildInputs = [ cmake python ]
++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
buildInputs = [ libxml2 libffi ]
@ -252,8 +277,7 @@ in stdenv.mkDerivation (rec {
cp NATIVE/bin/llvm-config $dev/bin/llvm-config-native
'';
doCheck = stdenv.isLinux && (!stdenv.isx86_32) && (!stdenv.hostPlatform.isRiscV)
&& (stdenv.hostPlatform == stdenv.buildPlatform);
inherit doCheck;
checkTarget = "check-all";

View file

@ -0,0 +1,75 @@
From a11d1cc41c725ec6dee58f75e4a852a658dd7543 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 10 Mar 2022 19:30:00 -0800
Subject: [PATCH] [builtins] Use mcr for dmb instruction on armv6
At present compiler-rt cross compiles for armv6 ( -march=armv6 ) but includes
dmb instructions which are only available in armv7+ this causes SIGILL on
clang+compiler-rt compiled components on rpi0w platforms.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D99282
---
compiler-rt/lib/builtins/arm/sync-ops.h | 8 ++++----
compiler-rt/lib/builtins/assembly.h | 8 ++++++++
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/lib/builtins/arm/sync-ops.h b/lib/builtins/arm/sync-ops.h
index c9623249e5d20..7a26170741ad2 100644
--- a/lib/builtins/arm/sync-ops.h
+++ b/lib/builtins/arm/sync-ops.h
@@ -19,14 +19,14 @@
.thumb; \
.syntax unified; \
DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \
- dmb; \
+ DMB; \
mov r12, r0; \
LOCAL_LABEL(tryatomic_##op) : ldrex r0, [r12]; \
op(r2, r0, r1); \
strex r3, r2, [r12]; \
cmp r3, #0; \
bne LOCAL_LABEL(tryatomic_##op); \
- dmb; \
+ DMB; \
bx lr
#define SYNC_OP_8(op) \
@@ -35,14 +35,14 @@
.syntax unified; \
DEFINE_COMPILERRT_THUMB_FUNCTION(__sync_fetch_and_##op) \
push {r4, r5, r6, lr}; \
- dmb; \
+ DMB; \
mov r12, r0; \
LOCAL_LABEL(tryatomic_##op) : ldrexd r0, r1, [r12]; \
op(r4, r5, r0, r1, r2, r3); \
strexd r6, r4, r5, [r12]; \
cmp r6, #0; \
bne LOCAL_LABEL(tryatomic_##op); \
- dmb; \
+ DMB; \
pop { r4, r5, r6, pc }
#define MINMAX_4(rD, rN, rM, cmp_kind) \
diff --git a/lib/builtins/assembly.h b/lib/builtins/assembly.h
index 69a3d8620f924..06aa18162e3b4 100644
--- a/lib/builtins/assembly.h
+++ b/lib/builtins/assembly.h
@@ -189,6 +189,14 @@
JMP(ip)
#endif
+#if __ARM_ARCH >= 7
+#define DMB dmb
+#elif __ARM_ARCH >= 6
+#define DMB mcr p15, #0, r0, c7, c10, #5
+#else
+#error only supported on ARMv6+
+#endif
+
#if defined(USE_THUMB_2)
#define WIDE(op) op.w
#else

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