Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2025-01-06 00:15:41 +00:00 committed by GitHub
commit a58f8abed0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
120 changed files with 1642 additions and 6272 deletions

View file

@ -85,6 +85,13 @@ jobs:
matrix:
system: ${{ fromJSON(needs.attrs.outputs.systems) }}
steps:
- name: Enable swap
run: |
sudo fallocate -l 10G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
- name: Download the list of all attributes
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:

View file

@ -3,6 +3,7 @@
"binfmt.d(5)": "https://www.freedesktop.org/software/systemd/man/binfmt.d.html",
"bootctl(1)": "https://www.freedesktop.org/software/systemd/man/bootctl.html",
"bootup(7)": "https://www.freedesktop.org/software/systemd/man/bootup.html",
"btrbk(1)": "https://digint.ch/btrbk/doc/btrbk.1.html",
"busctl(1)": "https://www.freedesktop.org/software/systemd/man/busctl.html",
"cat(1)": "https://www.gnu.org/software/coreutils/manual/html_node/cat-invocation.html",
"coredump.conf(5)": "https://www.freedesktop.org/software/systemd/man/coredump.conf.html",

View file

@ -16,31 +16,3 @@ outside of Nixpkgs. These modules can be imported:
services.exampleModule.enable = true;
}
```
The environment variable `NIXOS_EXTRA_MODULE_PATH` is an absolute path
to a NixOS module that is included alongside the Nixpkgs NixOS modules.
Like any NixOS module, this module can import additional modules:
```nix
# ./module-list/default.nix
[
./example-module1
./example-module2
]
```
```nix
# ./extra-module/default.nix
{ imports = import ./module-list.nix; }
```
```nix
# NIXOS_EXTRA_MODULE_PATH=/absolute/path/to/extra-module
{ config, lib, pkgs, ... }:
{
# No `imports` needed
services.exampleModule1.enable = true;
}
```

View file

@ -45,7 +45,7 @@ file.
- `buildDocsInSandbox` indicates whether the option documentation for the
module can be built in a derivation sandbox. This option is currently only
honored for modules shipped by nixpkgs. User modules and modules taken from
`NIXOS_EXTRA_MODULE_PATH` are always built outside of the sandbox, as has
`extraModules` are always built outside of the sandbox, as has
been the case in previous releases.
Building NixOS option documentation in a sandbox allows caching of the built

View file

@ -30,8 +30,29 @@ evalConfigArgs@
check ? true
, prefix ? []
, lib ? import ../../lib
, extraModules ? let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH";
in lib.optional (e != "") (import e)
, extraModules ?
let e = builtins.getEnv "NIXOS_EXTRA_MODULE_PATH";
in lib.optional (e != "") (
lib.warn
''
The NIXOS_EXTRA_MODULE_PATH environment variable is deprecated and will be
removed in NixOS 25.05.
We recommend a workflow where you update the expression files instead, but
if you wish to continue to use this variable, you may do so with a module like:
{
imports = [
(builtins.getEnv "NIXOS_EXTRA_MODULE_PATH")
];
}
This has the benefit that your configuration hints at the
non-standard workflow.
''
# NOTE: this import call is unnecessary and it even removes the file name
# from error messages.
import e
)
}:
let

View file

@ -20,6 +20,7 @@ in
imports = [
../../../modules/virtualisation/amazon-image.nix
../../../modules/virtualisation/disk-size-option.nix
../../../modules/image/file-options.nix
(lib.mkRenamedOptionModuleWith {
sinceRelease = 2411;
from = [
@ -31,6 +32,17 @@ in
"diskSize"
];
})
(lib.mkRenamedOptionModuleWith {
sinceRelease = 2505;
from = [
"amazonImage"
"name"
];
to = [
"image"
"baseName"
];
})
];
# Amazon recommends setting this to the highest possible value for a good EBS
@ -44,12 +56,6 @@ in
[ "nvme_core.io_timeout=${timeout}" ];
options.amazonImage = {
name = mkOption {
type = types.str;
description = "The name of the generated derivation";
default = "nixos-amazon-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
};
contents = mkOption {
example = literalExpression ''
[ { source = pkgs.memtest86 + "/memtest.bin";
@ -80,6 +86,10 @@ in
config.virtualisation.diskSize = lib.mkOverride 1490 (3 * 1024);
config.virtualisation.diskSizeAutoSupported = !config.ec2.zfs.enable;
config.system.nixos.tags = [ "amazon" ];
config.system.build.image = config.system.build.amazonImage;
config.image.extension = cfg.format;
config.system.build.amazonImage =
let
configFile = pkgs.writeText "configuration.nix" ''
@ -102,7 +112,8 @@ in
configFile
pkgs
;
inherit (cfg) contents format name;
inherit (cfg) contents format;
name = config.image.baseName;
includeChannel = true;
@ -118,7 +129,7 @@ in
postVM = ''
extension=''${rootDiskImage##*.}
friendlyName=$out/${cfg.name}
friendlyName=$out/${config.image.baseName}
rootDisk="$friendlyName.root.$extension"
bootDisk="$friendlyName.boot.$extension"
mv "$rootDiskImage" "$rootDisk"
@ -156,7 +167,9 @@ in
pkgs
;
inherit (cfg) contents format name;
inherit (cfg) contents format;
inherit (config.image) baseName;
name = config.image.baseName;
fsType = "ext4";
partitionTableType = if config.ec2.efi then "efi" else "legacy+gpt";
@ -164,11 +177,6 @@ in
inherit (config.virtualisation) diskSize;
postVM = ''
extension=''${diskImage##*.}
friendlyName=$out/${cfg.name}.$extension
mv "$diskImage" "$friendlyName"
diskImage=$friendlyName
mkdir -p $out/nix-support
echo "file ${cfg.format} $diskImage" >> $out/nix-support/hydra-build-products

View file

@ -16,6 +16,7 @@ in
imports = [
../../../modules/virtualisation/openstack-config.nix
../../../modules/virtualisation/disk-size-option.nix
../../../modules/image/file-options.nix
(lib.mkRenamedOptionModuleWith {
sinceRelease = 2411;
from = [
@ -27,15 +28,21 @@ in
"diskSize"
];
})
(lib.mkRenamedOptionModuleWith {
sinceRelease = 2505;
from = [
"openstackImage"
"name"
];
to = [
"image"
"baseName"
];
})
] ++ (lib.optional copyChannel ../../../modules/installer/cd-dvd/channel.nix);
options.openstackImage = {
name = mkOption {
type = types.str;
description = "The name of the generated derivation";
default = "nixos-openstack-image-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
};
ramMB = mkOption {
type = types.int;
default = (3 * 1024);
@ -72,9 +79,16 @@ in
virtualisation.diskSize = lib.mkOverride 1490 (8 * 1024);
virtualisation.diskSizeAutoSupported = false;
image.extension = cfg.format;
system.nixos.tags = [
"openstack"
"zfs"
];
system.build.image = config.system.build.openstackImage;
system.build.openstackImage = import ../../../lib/make-single-disk-zfs-image.nix {
inherit lib config;
inherit (cfg) contents format name;
inherit (cfg) contents format;
name = config.image.baseName;
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
configFile = pkgs.writeText "configuration.nix" ''
@ -98,7 +112,7 @@ in
postVM = ''
extension=''${rootDiskImage##*.}
friendlyName=$out/${cfg.name}
friendlyName=$out/${config.image.baseName}
rootDisk="$friendlyName.root.$extension"
mv "$rootDiskImage" "$rootDisk"

View file

@ -3,19 +3,24 @@
{ config, lib, pkgs, ... }:
let
copyChannel = true;
format = "qcow2";
in
{
imports = [
../../../modules/virtualisation/openstack-config.nix
../../../modules/image/file-options.nix
] ++ (lib.optional copyChannel ../../../modules/installer/cd-dvd/channel.nix);
documentation.enable = copyChannel;
image.extension = format;
system.nixos.tags = [ "openstack" ];
system.build.image = config.system.build.openstackImage;
system.build.openstackImage = import ../../../lib/make-disk-image.nix {
inherit lib config copyChannel;
inherit lib config copyChannel format;
inherit (config.image) baseName;
additionalSpace = "1024M";
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
format = "qcow2";
configFile = pkgs.writeText "configuration.nix"
''
{

View file

@ -9,6 +9,7 @@ let
inherit (lib) types;
imageModules = {
amazon = [ ../../maintainers/scripts/ec2/amazon-image.nix ];
azure = [ ../virtualisation/azure-image.nix ];
digital-ocean = [ ../virtualisation/digital-ocean-image.nix ];
google-compute = [ ../virtualisation/google-compute-image.nix ];
@ -17,11 +18,45 @@ let
lxc = [ ../virtualisation/lxc-container.nix ];
lxc-metadata = [ ../virtualisation/lxc-image-metadata.nix ];
oci = [ ../virtualisation/oci-image.nix ];
openstack = [ ../../maintainers/scripts/openstack/openstack-image.nix ];
openstack-zfs = [ ../../maintainers/scripts/openstack/openstack-image-zfs.nix ];
proxmox = [ ../virtualisation/proxmox-image.nix ];
proxmox-lxc = [ ../virtualisation/proxmox-lxc.nix ];
qemu-efi = [ ../virtualisation/disk-image.nix ];
qemu = [
../virtualisation/disk-image.nix
{
image.efiSupport = false;
}
];
raw-efi = [
../virtualisation/disk-image.nix
{
image.format = "raw";
}
];
raw = [
../virtualisation/disk-image.nix
{
image.format = "raw";
image.efiSupport = false;
}
];
kubevirt = [ ../virtualisation/kubevirt.nix ];
vagrant-virtualbox = [ ../virtualisation/vagrant-virtualbox-image.nix ];
virtualbox = [ ../virtualisation/virtualbox-image.nix ];
vmware = [ ../virtualisation/vmware-image.nix ];
iso = [ ../installer/cd-dvd/iso-image.nix ];
iso-installer = [ ../installer/cd-dvd/installation-cd-base.nix ];
sd-card = [
(
let
module = ../. + "/installer/sd-card/sd-image-${pkgs.targetPlatform.linuxArch}.nix";
in
if builtins.pathExists module then module else throw "The module ${module} does not exist."
)
];
kexec = [ ../installer/netboot/netboot-minimal.nix ];
};
imageConfigs = lib.mapAttrs (
name: modules:

View file

@ -15,9 +15,6 @@
# Adds terminus_font for people with HiDPI displays
console.packages = options.console.packages.default ++ [ pkgs.terminus_font ];
# ISO naming.
isoImage.isoName = "${config.isoImage.isoBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.iso";
# EFI booting
isoImage.makeEfiBootable = true;

View file

@ -476,24 +476,34 @@ let
in
{
imports = [
(lib.mkRenamedOptionModuleWith {
sinceRelease = 2505;
from = [
"isoImage"
"isoBaseName"
];
to = [
"image"
"baseName"
];
})
(lib.mkRenamedOptionModuleWith {
sinceRelease = 2505;
from = [
"isoImage"
"isoName"
];
to = [
"image"
"fileName"
];
})
../../image/file-options.nix
];
options = {
isoImage.isoName = lib.mkOption {
default = "${config.isoImage.isoBaseName}.iso";
type = lib.types.str;
description = ''
Name of the generated ISO image file.
'';
};
isoImage.isoBaseName = lib.mkOption {
default = config.system.nixos.distroId;
type = lib.types.str;
description = ''
Prefix of the name of the generated ISO image file.
'';
};
isoImage.compressImage = lib.mkOption {
default = false;
type = lib.types.bool;
@ -858,8 +868,12 @@ in
boot.loader.timeout = 10;
# Create the ISO image.
image.extension = if config.isoImage.compressImage then "iso.zst" else "iso";
image.filePath = "iso/${config.image.fileName}";
system.build.image = config.system.build.isoImage;
system.build.isoImage = pkgs.callPackage ../../../lib/make-iso9660-image.nix ({
inherit (config.isoImage) isoName compressImage volumeID contents;
inherit (config.isoImage) compressImage volumeID contents;
isoName = "${config.image.baseName}.iso";
bootable = config.isoImage.makeBiosBootable;
bootImage = "/isolinux/isolinux.bin";
syslinux = if config.isoImage.makeBiosBootable then pkgs.syslinux else null;

View file

@ -1,11 +1,15 @@
# This module creates netboot media containing the given NixOS
# configuration.
{ config, lib, pkgs, ... }:
{ config, lib, pkgs, modulesPath, ... }:
with lib;
{
imports = [
../../image/file-options.nix
];
options = {
netboot.squashfsCompression = mkOption {
@ -129,6 +133,21 @@ with lib;
}
];
image.extension = "tar.xz";
image.filePath = "tarball/${config.image.fileName}";
system.nixos.tags = [ "kexec" ];
system.build.image = config.system.build.kexecTarball;
system.build.kexecTarball = pkgs.callPackage "${toString modulesPath}/../lib/make-system-tarball.nix" {
fileName = config.image.baseName;
storeContents = [
{
object = config.system.build.kexecScript;
symlink = "/kexec_nixos";
}
];
contents = [];
};
boot.loader.timeout = 10;
boot.postBootCommands = ''

View file

@ -29,23 +29,33 @@ in
imports = [
(mkRemovedOptionModule [ "sdImage" "bootPartitionID" ] "The FAT partition for SD image now only holds the Raspberry Pi firmware files. Use firmwarePartitionID to configure that partition's ID.")
(mkRemovedOptionModule [ "sdImage" "bootSize" ] "The boot files for SD image have been moved to the main ext4 partition. The FAT partition now only holds the Raspberry Pi firmware files. Changing its size may not be required.")
(lib.mkRenamedOptionModuleWith {
sinceRelease = 2505;
from = [
"sdImage"
"imageBaseName"
];
to = [
"image"
"baseName"
];
})
(lib.mkRenamedOptionModuleWith {
sinceRelease = 2505;
from = [
"sdImage"
"imageName"
];
to = [
"image"
"fileName"
];
})
../../profiles/all-hardware.nix
../../image/file-options.nix
];
options.sdImage = {
imageName = mkOption {
default = "${config.sdImage.imageBaseName}-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}.img";
description = ''
Name of the generated image file.
'';
};
imageBaseName = mkOption {
default = "nixos-sd-image";
description = ''
Prefix of the name of the generated image file.
'';
};
storePaths = mkOption {
type = with types; listOf package;
example = literalExpression "[ pkgs.stdenv ]";
@ -180,18 +190,22 @@ in
sdImage.storePaths = [ config.system.build.toplevel ];
image.extension = if config.sdImage.compressImage then "img.zst" else "img";
image.filePath = "sd-card/${config.image.fileName}";
system.nixos.tags = [ "sd-card" ];
system.build.image = config.system.build.sdImage;
system.build.sdImage = pkgs.callPackage ({ stdenv, dosfstools, e2fsprogs,
mtools, libfaketime, util-linux, zstd }: stdenv.mkDerivation {
name = config.sdImage.imageName;
name = config.image.fileName;
nativeBuildInputs = [ dosfstools e2fsprogs libfaketime mtools util-linux ]
++ lib.optional config.sdImage.compressImage zstd;
inherit (config.sdImage) imageName compressImage;
inherit (config.sdImage) compressImage;
buildCommand = ''
mkdir -p $out/nix-support $out/sd-image
export img=$out/sd-image/${config.sdImage.imageName}
export img=$out/sd-image/${config.image.baseName}.img
echo "${pkgs.stdenv.buildPlatform.system}" > $out/nix-support/system
if test -n "$compressImage"; then

View file

@ -1750,7 +1750,6 @@
./tasks/trackpoint.nix
./testing/service-runner.nix
./virtualisation/amazon-options.nix
./virtualisation/anbox.nix
./virtualisation/appvm.nix
./virtualisation/build-vm.nix
./virtualisation/container-config.nix

View file

@ -78,6 +78,10 @@ in
(mkRemovedOptionModule [ "services" "antennas" ]
"The antennas package and the corresponding module have been removed as they only work with tvheadend, which nobody was willing to maintain and was stuck on an unmaintained version that required FFmpeg 4; please see https://github.com/NixOS/nixpkgs/pull/332259 if you are interested in maintaining a newer version."
)
(mkRemovedOptionModule [
"services"
"anbox"
] "The corresponding package was removed from nixpkgs as it is not maintained upstream anymore.")
(mkRemovedOptionModule [
"services"
"ankisyncd"

View file

@ -185,6 +185,17 @@ in
Setting it to null disables the timer, thus this instance can only be started manually.
'';
};
snapshotOnly = mkOption {
type = types.bool;
default = false;
description = ''
Whether to run in snapshot only mode. This skips backup creation and deletion steps.
Useful when you want to manually backup to an external drive that might not always be connected.
Use `btrbk -c /path/to/conf resume` to trigger manual backups.
More examples [here](https://github.com/digint/btrbk#example-backups-to-usb-disk).
See also `snapshot` subcommand in {manpage}`btrbk(1)`.
'';
};
settings = mkOption {
type = types.submodule {
freeformType =
@ -353,7 +364,9 @@ in
User = "btrbk";
Group = "btrbk";
Type = "oneshot";
ExecStart = "${pkgs.btrbk}/bin/btrbk -c /etc/btrbk/${name}.conf run";
ExecStart = "${pkgs.btrbk}/bin/btrbk -c /etc/btrbk/${name}.conf ${
if instance.snapshotOnly then "snapshot" else "run"
}";
Nice = cfg.niceness;
IOSchedulingClass = cfg.ioSchedulingClass;
StateDirectory = "btrbk";

View file

@ -61,14 +61,15 @@ let
# Fix some paths in the standard udev rules. Hacky.
for i in $out/*.rules; do
substituteInPlace $i \
--replace \"/sbin/modprobe \"${pkgs.kmod}/bin/modprobe \
--replace \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \
--replace \"/sbin/blkid \"${pkgs.util-linux}/sbin/blkid \
--replace \"/bin/mount \"${pkgs.util-linux}/bin/mount \
--replace /usr/bin/readlink ${pkgs.coreutils}/bin/readlink \
--replace /usr/bin/basename ${pkgs.coreutils}/bin/basename 2>/dev/null
--replace-quiet \"/sbin/modprobe \"${pkgs.kmod}/bin/modprobe \
--replace-quiet \"/sbin/mdadm \"${pkgs.mdadm}/sbin/mdadm \
--replace-quiet \"/sbin/blkid \"${pkgs.util-linux}/sbin/blkid \
--replace-quiet \"/bin/mount \"${pkgs.util-linux}/bin/mount \
--replace-quiet /usr/bin/readlink ${pkgs.coreutils}/bin/readlink \
--replace-quiet /usr/bin/cat ${pkgs.coreutils}/bin/cat \
--replace-quiet /usr/bin/basename ${pkgs.coreutils}/bin/basename 2>/dev/null
${lib.optionalString (initrdBin != null) ''
substituteInPlace $i --replace '/run/current-system/systemd' "${lib.removeSuffix "/bin" initrdBin}"
substituteInPlace $i --replace-quiet '/run/current-system/systemd' "${lib.removeSuffix "/bin" initrdBin}"
''}
done

View file

@ -97,7 +97,6 @@ in
systemd.services.plantuml-server = {
description = "PlantUML server";
wantedBy = [ "multi-user.target" ];
path = [ cfg.home ];
environment = {
PLANTUML_LIMIT_SIZE = builtins.toString cfg.plantumlLimitSize;

View file

@ -32,6 +32,10 @@ let
coreFileSystemOpts = { name, config, ... }: {
options = {
enable = mkEnableOption "the filesystem mount" // {
default = true;
};
mountPoint = mkOption {
example = "/mnt/usb";
type = nonEmptyWithoutTrailingSlash;
@ -234,6 +238,7 @@ in
}
'';
type = types.attrsOf (types.submodule [coreFileSystemOpts fileSystemOpts]);
apply = lib.filterAttrs (_: fs: fs.enable);
description = ''
The file systems to be mounted. It must include an entry for
the root directory (`mountPoint = "/"`). Each
@ -280,6 +285,7 @@ in
boot.specialFileSystems = mkOption {
default = {};
type = types.attrsOf (types.submodule coreFileSystemOpts);
apply = lib.filterAttrs (_: fs: fs.enable);
internal = true;
description = ''
Special filesystems that are mounted very early during boot.

View file

@ -1,17 +1,29 @@
{ config, lib, pkgs, utils, ... }:
{
config,
lib,
pkgs,
utils,
...
}:
let
# The scripted initrd contains some magic to add the prefix to the
# paths just in time, so we don't add it here.
sysrootPrefix = fs:
if config.boot.initrd.systemd.enable && (utils.fsNeededForBoot fs) then
sysrootPrefix =
fs:
if
config.boot.initrd.systemd.enable
&& fs.overlay.useStage1BaseDirectories
&& (utils.fsNeededForBoot fs)
then
"/sysroot"
else
"";
# Returns a service that creates the required directories before the mount is
# created.
preMountService = _name: fs:
preMountService =
_name: fs:
let
prefix = sysrootPrefix fs;
@ -21,89 +33,111 @@ let
upperdir = prefix + fs.overlay.upperdir;
workdir = prefix + fs.overlay.workdir;
in
lib.mkIf (fs.overlay.upperdir != null)
{
"rw-${escapedMountpoint}" = {
requiredBy = [ mountUnit ];
before = [ mountUnit ];
unitConfig = {
DefaultDependencies = false;
RequiresMountsFor = "${upperdir} ${workdir}";
};
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.coreutils}/bin/mkdir -p -m 0755 ${upperdir} ${workdir}";
};
lib.mkIf (fs.overlay.upperdir != null) {
"rw-${escapedMountpoint}" = {
requiredBy = [ mountUnit ];
before = [ mountUnit ];
unitConfig = {
DefaultDependencies = false;
RequiresMountsFor = "${upperdir} ${workdir}";
};
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.coreutils}/bin/mkdir -p -m 0755 ${upperdir} ${workdir}";
};
};
};
overlayOpts =
{
config,
...
}:
{
options.overlay = {
lowerdir = lib.mkOption {
type = with lib.types; nullOr (nonEmptyListOf (either str pathInStore));
default = null;
description = ''
The list of path(s) to the lowerdir(s).
To create a writable overlay, you MUST provide an `upperdir` and a
`workdir`.
You can create a read-only overlay when you provide multiple (at
least 2!) lowerdirs and neither an `upperdir` nor a `workdir`.
'';
};
upperdir = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
The path to the upperdir.
If this is null, a read-only overlay is created using the lowerdir.
If the filesystem is `neededForBoot`, this will be prefixed with `/sysroot`,
unless `useStage1BaseDirectories` is set to `true`.
If you set this to some value you MUST also set `workdir`.
'';
};
workdir = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
The path to the workdir.
If the filesystem is `neededForBoot`, this will be prefixed with `/sysroot`,
unless `useStage1BaseDirectories` is set to `true`.
This MUST be set if you set `upperdir`.
'';
};
useStage1BaseDirectories = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
If enabled, `lowerdir`, `upperdir` and `workdir` will be prefixed with `/sysroot`.
Disabling this can be useful to create an overlay over directories which aren't on the real root.
Disabling this does not work with the scripted (i.e. non-systemd) initrd.
'';
};
};
overlayOpts = { config, ... }: {
config = lib.mkIf (config.overlay.lowerdir != null) {
fsType = "overlay";
device = lib.mkDefault "overlay";
depends = map (x: "${x}") (
config.overlay.lowerdir
++ lib.optionals (config.overlay.upperdir != null) [
config.overlay.upperdir
config.overlay.workdir
]
);
options.overlay = {
options =
let
prefix = sysrootPrefix config;
lowerdir = lib.mkOption {
type = with lib.types; nullOr (nonEmptyListOf (either str pathInStore));
default = null;
description = ''
The list of path(s) to the lowerdir(s).
To create a writable overlay, you MUST provide an upperdir and a
workdir.
You can create a read-only overlay when you provide multiple (at
least 2!) lowerdirs and neither an upperdir nor a workdir.
'';
lowerdir = map (s: prefix + s) config.overlay.lowerdir;
upperdir = prefix + config.overlay.upperdir;
workdir = prefix + config.overlay.workdir;
in
[
"lowerdir=${lib.concatStringsSep ":" lowerdir}"
]
++ lib.optionals (config.overlay.upperdir != null) [
"upperdir=${upperdir}"
"workdir=${workdir}"
];
};
upperdir = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
The path to the upperdir.
If this is null, a read-only overlay is created using the lowerdir.
If you set this to some value you MUST also set `workdir`.
'';
};
workdir = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
The path to the workdir.
This MUST be set if you set `upperdir`.
'';
};
};
config = lib.mkIf (config.overlay.lowerdir != null) {
fsType = "overlay";
device = lib.mkDefault "overlay";
depends = map (x: "${x}") (config.overlay.lowerdir ++ lib.optionals (config.overlay.upperdir != null) [
config.overlay.upperdir
config.overlay.workdir
]);
options =
let
prefix = sysrootPrefix config;
lowerdir = map (s: prefix + s) config.overlay.lowerdir;
upperdir = prefix + config.overlay.upperdir;
workdir = prefix + config.overlay.workdir;
in
[
"lowerdir=${lib.concatStringsSep ":" lowerdir}"
] ++ lib.optionals (config.overlay.upperdir != null) [
"upperdir=${upperdir}"
"workdir=${workdir}"
];
};
};
in
{
@ -140,6 +174,13 @@ in
-> (lib.length fs.overlay.lowerdir) >= 2;
message = "A read-only overlay (without an `upperdir`) requires at least 2 `lowerdir`s: ${fs.mountPoint}";
}
{
assertion = !fs.overlay.useStage1BaseDirectories -> config.boot.initrd.systemd.enable;
message = ''
Stage 1 overlay file system ${fs.mountPoint} has 'useStage1BaseDirectories' set to false,
which is not supported with scripted initrd. Please enable 'boot.initrd.systemd.enable'.
'';
}
]) overlayFileSystems
)
++ lib.mapAttrsToList (_: fs: {

View file

@ -889,6 +889,7 @@ in
after = [ "zfs-import.target" ];
serviceConfig = {
Type = "simple";
IOSchedulingClass = "idle";
};
script = ''
# shellcheck disable=SC2046

View file

@ -1,194 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.virtualisation.anbox;
addrOpts = v: addr: pref: name: {
address = mkOption {
default = addr;
type = types.str;
description = ''
IPv${toString v} ${name} address.
'';
};
prefixLength = mkOption {
default = pref;
type = types.addCheck types.int (n: n >= 0 && n <= (if v == 4 then 32 else 128));
description = ''
Subnet mask of the ${name} address, specified as the number of
bits in the prefix (`${if v == 4 then "24" else "64"}`).
'';
};
};
finalImage =
if cfg.imageModifications == "" then
cfg.image
else
(pkgs.callPackage (
{ runCommandNoCC, squashfsTools }:
runCommandNoCC "${cfg.image.name}-modified.img"
{
nativeBuildInputs = [
squashfsTools
];
}
''
echo "-> Extracting Anbox root image..."
unsquashfs -dest rootfs ${cfg.image}
echo "-> Modifying Anbox root image..."
(
cd rootfs
${cfg.imageModifications}
)
echo "-> Packing modified Anbox root image..."
mksquashfs rootfs $out -comp xz -no-xattrs -all-root
''
) { });
in
{
options.virtualisation.anbox = {
enable = mkEnableOption "Anbox";
image = mkOption {
default = pkgs.anbox.image;
defaultText = literalExpression "pkgs.anbox.image";
type = types.package;
description = ''
Base android image for Anbox.
'';
};
imageModifications = mkOption {
default = "";
type = types.lines;
description = ''
Commands to edit the image filesystem.
This can be used to e.g. bundle a privileged F-Droid.
Commands are ran with PWD being at the root of the filesystem.
'';
};
extraInit = mkOption {
type = types.lines;
default = "";
description = ''
Extra shell commands to be run inside the container image during init.
'';
};
ipv4 = {
container = addrOpts 4 "192.168.250.2" 24 "Container";
gateway = addrOpts 4 "192.168.250.1" 24 "Host";
dns = mkOption {
default = "1.1.1.1";
type = types.str;
description = ''
Container DNS server.
'';
};
};
};
config = mkIf cfg.enable {
assertions = singleton {
assertion = with config.boot.kernelPackages; kernelAtLeast "5.5" && kernelOlder "5.18";
message = "Anbox needs a kernel with binder and ashmem support";
};
environment.systemPackages = with pkgs; [ anbox ];
systemd.mounts = singleton {
requiredBy = [ "anbox-container-manager.service" ];
description = "Anbox Binder File System";
what = "binder";
where = "/dev/binderfs";
type = "binder";
};
virtualisation.lxc.enable = true;
networking.bridges.anbox0.interfaces = [ ];
networking.interfaces.anbox0.ipv4.addresses = [ cfg.ipv4.gateway ];
networking.nat = {
enable = true;
internalInterfaces = [ "anbox0" ];
};
# Ensures NetworkManager doesn't touch anbox0
networking.networkmanager.unmanaged = [ "anbox0" ];
systemd.services.anbox-container-manager =
let
anboxloc = "/var/lib/anbox";
in
{
description = "Anbox Container Management Daemon";
environment.XDG_RUNTIME_DIR = "${anboxloc}";
wantedBy = [ "multi-user.target" ];
preStart =
let
initsh = pkgs.writeText "nixos-init" (
''
#!/system/bin/sh
setprop nixos.version ${config.system.nixos.version}
# we don't have radio
setprop ro.radio.noril yes
stop ril-daemon
# speed up boot
setprop debug.sf.nobootanimation 1
''
+ cfg.extraInit
);
initshloc = "${anboxloc}/rootfs-overlay/system/etc/init.goldfish.sh";
in
''
mkdir -p ${anboxloc}
mkdir -p $(dirname ${initshloc})
[ -f ${initshloc} ] && rm ${initshloc}
cp ${initsh} ${initshloc}
chown 100000:100000 ${initshloc}
chmod +x ${initshloc}
'';
serviceConfig = {
ExecStart = ''
${pkgs.anbox}/bin/anbox container-manager \
--data-path=${anboxloc} \
--android-image=${finalImage} \
--container-network-address=${cfg.ipv4.container.address} \
--container-network-gateway=${cfg.ipv4.gateway.address} \
--container-network-dns-servers=${cfg.ipv4.dns} \
--use-rootfs-overlay \
--privileged \
--daemon
'';
};
};
};
}

View file

@ -0,0 +1,61 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.image;
in
{
imports = [
./disk-size-option.nix
../image/file-options.nix
];
options.image = {
format = lib.mkOption {
description = "Format of the disk image to generate: raw or qcow2";
type = lib.types.enum [
"raw"
"qcow2"
];
default = "qcow2";
};
efiSupport = lib.mkOption {
description = "Whether the disk image should support EFI boot or legacy boot";
type = lib.types.bool;
default = true;
};
};
config = {
boot.loader.grub = lib.mkIf (!cfg.efiSupport) {
enable = lib.mkOptionDefault true;
devices = lib.mkDefault [ "/dev/vda" ];
};
boot.loader.systemd-boot.enable = lib.mkDefault cfg.efiSupport;
boot.growPartition = lib.mkDefault true;
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
autoResize = true;
fsType = "ext4";
};
"/boot" = lib.mkIf (cfg.efiSupport) {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
};
system.nixos.tags = [ cfg.format ] ++ lib.optionals cfg.efiSupport [ "efi" ];
image.extension = cfg.format;
system.build.image = import ../../lib/make-disk-image.nix {
inherit lib config pkgs;
inherit (config.virtualisation) diskSize;
inherit (cfg) baseName format;
partitionTableType = if cfg.efiSupport then "efi" else "legacy";
};
};
}

View file

@ -62,7 +62,7 @@ let
hydraJob ((import lib/eval-config.nix {
inherit system;
modules = makeModules module {
isoImage.isoBaseName = "nixos-${type}";
image.baseName = "nixos-${type}";
};
}).config.system.build.isoImage);

View file

@ -124,7 +124,6 @@ in {
amazon-init-shell = handleTest ./amazon-init-shell.nix {};
amazon-ssm-agent = handleTest ./amazon-ssm-agent.nix {};
amd-sev = runTest ./amd-sev.nix;
anbox = runTest ./anbox.nix;
angie-api = handleTest ./angie-api.nix {};
anki-sync-server = handleTest ./anki-sync-server.nix {};
anuko-time-tracker = handleTest ./anuko-time-tracker.nix {};

View file

@ -1,41 +0,0 @@
{ lib, pkgs, ... }:
{
name = "anbox";
meta.maintainers = with lib.maintainers; [ mvnetbiz ];
nodes.machine =
{ pkgs, config, ... }:
{
imports = [
./common/user-account.nix
./common/x11.nix
];
environment.systemPackages = with pkgs; [ android-tools ];
test-support.displayManager.auto.user = "alice";
virtualisation.anbox.enable = true;
boot.kernelPackages = pkgs.linuxKernel.packages.linux_5_15;
virtualisation.memorySize = 2500;
};
testScript =
{ nodes, ... }:
let
user = nodes.machine.users.users.alice;
bus = "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/${toString user.uid}/bus";
in
''
machine.wait_for_x()
machine.wait_until_succeeds(
"sudo -iu alice ${bus} anbox wait-ready"
)
machine.wait_until_succeeds("adb shell true")
print(machine.succeed("adb devices"))
'';
}

View file

@ -55,7 +55,7 @@ let
}
];
}).config;
image = "${imageCfg.system.build.amazonImage}/${imageCfg.amazonImage.name}.qcow2";
image = "${imageCfg.system.build.amazonImage}/${imageCfg.image.imageFile}";
sshKeys = import ./ssh-keys.nix pkgs;
snakeOilPrivateKey = sshKeys.snakeOilPrivateKey.text;

View file

@ -24,40 +24,50 @@ in
meta.maintainers = with lib.maintainers; [ nikstur ];
nodes.machine = { config, pkgs, ... }: {
boot.initrd.systemd.enable = true;
nodes.machine =
{ config, pkgs, ... }:
{
boot.initrd.systemd.enable = true;
virtualisation.fileSystems = {
"/initrd-overlay" = {
overlay = {
lowerdir = [ initrdLowerdir ];
upperdir = "/.rw-initrd-overlay/upper";
workdir = "/.rw-initrd-overlay/work";
virtualisation.fileSystems = {
"/initrd-overlay" = {
overlay = {
lowerdir = [ initrdLowerdir ];
upperdir = "/.rw-initrd-overlay/upper";
workdir = "/.rw-initrd-overlay/work";
};
neededForBoot = true;
};
neededForBoot = true;
};
"/userspace-overlay" = {
overlay = {
lowerdir = [ userspaceLowerdir ];
upperdir = "/.rw-userspace-overlay/upper";
workdir = "/.rw-userspace-overlay/work";
"/initrd-real-root-overlay" = {
overlay = {
lowerdir = [ userspaceLowerdir ];
upperdir = "/run/upper"; # from initrd
workdir = "/run/work"; # from initrd
useStage1BaseDirectories = false;
};
};
"/userspace-overlay" = {
overlay = {
lowerdir = [ userspaceLowerdir ];
upperdir = "/.rw-userspace-overlay/upper";
workdir = "/.rw-userspace-overlay/work";
};
};
"/ro-initrd-overlay" = {
overlay.lowerdir = [
initrdLowerdir
initrdLowerdir2
];
neededForBoot = true;
};
"/ro-userspace-overlay" = {
overlay.lowerdir = [
userspaceLowerdir
userspaceLowerdir2
];
};
};
"/ro-initrd-overlay" = {
overlay.lowerdir = [
initrdLowerdir
initrdLowerdir2
];
neededForBoot = true;
};
"/ro-userspace-overlay" = {
overlay.lowerdir = [
userspaceLowerdir
userspaceLowerdir2
];
};
};
};
testScript = ''
machine.wait_for_unit("default.target")
@ -67,6 +77,11 @@ in
machine.succeed("touch /initrd-overlay/writable.txt")
machine.succeed("findmnt --kernel --types overlay /initrd-overlay")
with subtest("Userspace overlay with upper/workdir in initrd"):
machine.wait_for_file("/initrd-real-root-overlay/userspace.txt", 5)
machine.succeed("touch /initrd-real-root-overlay/writable.txt")
machine.succeed("findmnt --kernel --types overlay /initrd-real-root-overlay")
with subtest("Userspace overlay"):
machine.wait_for_file("/userspace-overlay/userspace.txt", 5)
machine.succeed("touch /userspace-overlay/writable.txt")

View file

@ -1,34 +0,0 @@
{ lib, stdenv, fetchurl, pkg-config
, alsa-lib, fftw, gsl, motif, xorg
, CoreServices, CoreMIDI
}:
stdenv.mkDerivation rec {
pname = "snd";
version = "24.9";
src = fetchurl {
url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
sha256 = "sha256-3ETeqOOX9ao7FJIaex0A9WPRYO+yaZ+o8Gkjmxo9bK0=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ fftw gsl motif ]
++ lib.optionals stdenv.hostPlatform.isLinux [ alsa-lib ]
++ lib.optionals stdenv.hostPlatform.isDarwin [ CoreServices CoreMIDI ]
++ (with xorg; [ libXext libXft libXpm libXt ]);
configureFlags = [ "--with-motif" ];
enableParallelBuilding = true;
meta = with lib; {
description = "Sound editor";
homepage = "https://ccrma.stanford.edu/software/snd/";
platforms = platforms.unix;
license = licenses.free;
maintainers = [ ];
mainProgram = "snd";
};
}

View file

@ -7,6 +7,7 @@
, pkg-config
, wrapGAppsHook3
, boost
, boost183
, cereal
, cgal
, curl
@ -25,7 +26,7 @@
, mpfr
, nanosvg
, nlopt
, opencascade-occt_7_6
, opencascade-occt_7_6_1
, openvdb
, pcre
, qhull
@ -35,11 +36,12 @@
, libbgcode
, heatshrink
, catch2
, webkitgtk_4_0
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, systemd
, wxGTK-override ? null
, opencascade-override ? null
}:
let
opencascade-occt = opencascade-occt_7_6;
wxGTK-prusa = wxGTK32.overrideAttrs (old: rec {
pname = "wxwidgets-prusa3d-patched";
version = "3.2.0";
@ -66,34 +68,35 @@ let
});
openvdb_tbb_2021_8 = openvdb.override { tbb = tbb_2021_11; };
wxGTK-override' = if wxGTK-override == null then wxGTK-prusa else wxGTK-override;
opencascade-override' = if opencascade-override == null then opencascade-occt_7_6_1 else opencascade-override;
patches = [
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/master/media-gfx/prusaslicer/files/prusaslicer-2.8.0-missing-includes.patch";
hash = "sha256-/R9jv9zSP1lDW6IltZ8V06xyLdxfaYrk3zD6JRFUxHg=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/gentoo/gentoo/master/media-gfx/prusaslicer/files/prusaslicer-2.8.0-fixed-linking.patch";
hash = "sha256-G1JNdVH+goBelag9aX0NctHFVqtoYFnqjwK/43FVgvM=";
})
];
# Build requires at least Boost v1.83. If the mainline package satisfies
# that, just use the mainline package, otherwise use an explicitly versioned
# package.
boost183OrBetter =
if lib.versionAtLeast boost.version "1.83"
then boost
else boost183;
in
stdenv.mkDerivation (finalAttrs: {
pname = "prusa-slicer";
version = "2.8.0";
version = "2.9.0";
inherit patches;
src = fetchFromGitHub {
owner = "prusa3d";
repo = "PrusaSlicer";
hash = "sha256-A/uxNIEXCchLw3t5erWdhqFAeh6nudcMfASi+RoJkFg=";
hash = "sha256-6BrmTNIiu6oI/CbKPKoFQIh1aHEVfJPIkxomQou0xKk=";
rev = "version_${finalAttrs.version}";
};
# required for GCC 14
# (not applicable to super-slicer fork)
postPatch = lib.optionalString (finalAttrs.pname == "prusa-slicer") ''
substituteInPlace src/libslic3r/Arrange/Core/DataStoreTraits.hpp \
substituteInPlace src/slic3r-arrange/include/arrange/DataStoreTraits.hpp \
--replace-fail \
"WritableDataStoreTraits<ArrItem>::template set" \
"WritableDataStoreTraits<ArrItem>::set"
@ -108,7 +111,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [
binutils
boost
boost183OrBetter
cereal
cgal
curl
@ -126,7 +129,7 @@ stdenv.mkDerivation (finalAttrs: {
mpfr
nanosvg-fltk
nlopt
opencascade-occt
opencascade-override'
openvdb_tbb_2021_8
pcre
qhull
@ -136,6 +139,7 @@ stdenv.mkDerivation (finalAttrs: {
libbgcode
heatshrink
catch2
webkitgtk_4_0
] ++ lib.optionals withSystemd [
systemd
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
@ -185,6 +189,7 @@ stdenv.mkDerivation (finalAttrs: {
"-DSLIC3R_STATIC=0"
"-DSLIC3R_FHS=1"
"-DSLIC3R_GTK=3"
"-DCMAKE_CXX_FLAGS=-DBOOST_LOG_DYN_LINK"
];
postInstall = ''

View file

@ -6,6 +6,7 @@
wxGTK31,
prusa-slicer,
libspnav,
opencascade-occt_7_6,
}:
let
appname = "SuperSlicer";
@ -59,7 +60,7 @@ let
# - wxScintilla is not used on macOS
# - Partially applied upstream changes cause a bug when trying to link against a nonexistent libexpat
postPatch =
super.postPatch
(super.postPatch or "")
+ ''
substituteInPlace src/CMakeLists.txt \
--replace "scintilla" "" \
@ -125,9 +126,12 @@ let
fetchSubmodules = true;
};
});
prusa-slicer-wxGTK-override = prusa-slicer.override { wxGTK-override = wxGTK31-prusa; };
prusa-slicer-deps-override = prusa-slicer.override {
wxGTK-override = wxGTK31-prusa;
opencascade-override = opencascade-occt_7_6;
};
allVersions = builtins.mapAttrs (
_name: version: (prusa-slicer-wxGTK-override.overrideAttrs (override version))
_name: version: (prusa-slicer-deps-override.overrideAttrs (override version))
) versions;
in
allVersions.stable

View file

@ -86,8 +86,6 @@ stdenv.mkDerivation rec {
"-DPY_MOD_INSTALL_DIR=${placeholder "py"}/${python3.sitePackages}/"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation";
meta = with lib; {
description = "Zeek's Messaging Library";
mainProgram = "broker-benchmark";

View file

@ -91,8 +91,6 @@ stdenv.mkDerivation rec {
"-DLIBKQUEUE_ROOT_DIR=${libkqueue}"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation";
postInstall = ''
for file in $out/share/zeek/base/frameworks/notice/actions/pp-alarms.zeek $out/share/zeek/base/frameworks/notice/main.zeek; do
substituteInPlace $file \

View file

@ -15,16 +15,16 @@
buildGoModule rec {
pname = "go2tv" + lib.optionalString (!withGui) "-lite";
version = "1.17.1";
version = "1.18.0";
src = fetchFromGitHub {
owner = "alexballas";
repo = "go2tv";
tag = "v${version}";
hash = "sha256-NCfr6FXxHFFTe9l7K68MkKU71Hu/vWQFZcJXFAB94q8=";
hash = "sha256-WAJGnHKfNOqignMQ7v8H+g3x+dRrM3Jzfq32ClB1raY=";
};
vendorHash = "sha256-5XiY3tSgd6lmQMbkUxt8IylSNXXW4fsmquy3SIMMsWw=";
vendorHash = "sha256-xp/zdkNV4z3rQMV0b/7TD+ApiaDWxR/aqOKvakGKAcI=";
nativeBuildInputs = [ pkg-config ];

View file

@ -1,62 +0,0 @@
{
"name": "@electron/asar",
"description": "Creating Electron app packages",
"version": "0.0.0-development",
"main": "./lib/asar.js",
"types": "./lib/index.d.ts",
"bin": {
"asar": "./bin/asar.js"
},
"files": [
"bin",
"lib",
"lib/index.d.ts"
],
"engines": {
"node": ">=10.12.0"
},
"license": "MIT",
"homepage": "https://github.com/electron/asar",
"repository": {
"type": "git",
"url": "https://github.com/electron/asar.git"
},
"bugs": {
"url": "https://github.com/electron/asar/issues"
},
"scripts": {
"mocha": "xvfb-maybe electron-mocha --reporter spec && mocha --reporter spec",
"test": "npm run lint && npm run mocha",
"lint": "tsd && standard",
"standard": "standard",
"tsd": "tsd"
},
"standard": {
"env": {
"mocha": true
},
"globals": [
"BigInt"
]
},
"tsd": {
"directory": "test"
},
"dependencies": {
"chromium-pickle-js": "^0.2.0",
"commander": "^5.0.0",
"glob": "^7.1.6",
"minimatch": "^3.0.4"
},
"devDependencies": {
"@continuous-auth/semantic-release-npm": "^3.0.0",
"electron": "^22.0.0",
"electron-mocha": "^11.0.2",
"lodash": "^4.17.15",
"mocha": "^10.1.0",
"rimraf": "^3.0.2",
"standard": "^14.3.3",
"tsd": "^0.25.0",
"xvfb-maybe": "^0.2.1"
}
}

View file

@ -1,43 +1,34 @@
{
lib,
mkYarnPackage,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnInstallHook,
nodejs,
}:
mkYarnPackage rec {
stdenv.mkDerivation (finalAttrs: {
pname = "asar";
version = "3.2.4";
src = fetchFromGitHub {
owner = "electron";
repo = "asar";
rev = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-12FP8VRDo1PQ+tiN4zhzkcfAx9zFs/0MU03t/vFo074=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-/fV3hd98pl46+fgmiMH9sDQrrZgdLY1oF9c3TaIxRSg=";
};
doDist = false;
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/node_modules"
mv deps/@electron "$out/lib/node_modules"
rm "$out/lib/node_modules/@electron/asar/node_modules"
mv node_modules "$out/lib/node_modules/@electron/asar"
mkdir "$out/bin"
ln -s "$out/lib/node_modules/@electron/asar/bin/asar.js" "$out/bin/asar"
runHook postInstall
'';
nativeBuildInputs = [
yarnConfigHook
yarnInstallHook
nodejs
];
meta = {
description = "Simple extensive tar-like archive format with indexing";
@ -46,4 +37,4 @@ mkYarnPackage rec {
mainProgram = "asar";
maintainers = with lib.maintainers; [ xvapx ];
};
}
})

View file

@ -25,8 +25,6 @@ stdenv.mkDerivation rec {
"-DCAF_ENABLE_EXAMPLES:BOOL=OFF"
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation";
doCheck = !stdenv.hostPlatform.isDarwin;
checkTarget = "test";

View file

@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
freetype,
lcms2,
libjpeg,
libpng,
libtiff,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "capypdf";
version = "0.14.0";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "jpakkane";
repo = "capypdf";
rev = finalAttrs.version;
hash = "sha256-izc5EReAeDpR4Urktii5kJIZai69ga4QweSbwzuLNxc=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
freetype
lcms2
libpng
libjpeg
libtiff
zlib
];
meta = {
description = "Fully color managed PDF generation library";
homepage = "https://github.com/jpakkane/capypdf";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jtojnar ];
mainProgram = "capypdf";
platforms = lib.platforms.all;
};
})

View file

@ -7,12 +7,12 @@
appimageTools.wrapType2 rec {
pname = "cider-2";
version = "2.5.0";
version = "2.6.0";
src = requireFile {
name = "Cider-linux-appimage-x64.AppImage";
name = "cider-linux-x64.AppImage";
url = "https://cidercollective.itch.io/cider";
sha256 = "1nm35psq9ddii2c15kb03ifcn43fimvc4yzb4cpm1gqsiz4w21qz";
sha256 = "18by764idifnjs5h2cydv4qjm7w95lzdlxjkscp289w3jdpbmd05";
};
nativeBuildInputs = [ makeWrapper ];
@ -22,7 +22,7 @@ appimageTools.wrapType2 rec {
contents = appimageTools.extract {
inherit version src;
# HACK: this looks for a ${pname}.desktop, where `cider-2.desktop` doesn't exist
pname = "cider";
pname = "Cider";
};
in
''
@ -30,9 +30,9 @@ appimageTools.wrapType2 rec {
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--add-flags "--no-sandbox --disable-gpu-sandbox" # Cider 2 does not start up properly without these from my preliminary testing
install -m 444 -D ${contents}/cider.desktop $out/share/applications/${pname}.desktop
install -m 444 -D ${contents}/Cider.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace-warn 'Exec=AppRun --no-sandbox' 'Exec=${pname}'
--replace-warn 'Exec=Cider' 'Exec=${pname}'
cp -r ${contents}/usr/share/icons $out/share
'';

View file

@ -30,11 +30,6 @@ buildNpmPackage rec {
npmDepsHash = "sha256-fDoia6evCmXZgeIKL0coRo3yunX1dfud31ROgmop2Sc=";
# Fix error: no member named 'aligned_alloc' in the global namespace
env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinSdkVersion "11.0"
) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1";
nativeBuildInputs = [
python3
pkg-config

View file

@ -0,0 +1,27 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "cross-seed";
version = "6.8.4";
src = fetchFromGitHub {
owner = "cross-seed";
repo = "cross-seed";
tag = "v${version}";
hash = "sha256-R0mgrRWb9pM7DWC4Y5cASkuwWBJAtk6iKz2tIa5rLVE=";
};
npmDepsHash = "sha256-1xP0KwuVZMeIxg3dXd0CAGW0517i/6WBu3qGOkwsoks=";
meta = {
description = "Fully-automatic torrent cross-seeding with Torznab";
homepage = "https://cross-seed.org";
license = lib.licenses.asl20;
mainProgram = "cross-seed";
maintainers = with lib.maintainers; [ mkez ];
};
}

View file

@ -5,7 +5,6 @@
libpng,
libjpeg,
libwebp,
erlang,
openssl,
expat,
libyaml,
@ -155,7 +154,7 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs =
[ erlang ]
[ beamPackages.erlang ]
++ builtins.attrValues beamDeps
++ lib.optional withMysql allBeamDeps.p1_mysql
++ lib.optional withPgsql allBeamDeps.p1_pgsql

View file

@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch,
cmake,
blas,
lapack,
@ -59,6 +60,10 @@ stdenv.mkDerivation rec {
patches = [
./fix-python.patch
(fetchpatch {
url = "https://gitlab.onelab.info/gmsh/gmsh/-/commit/7d5094fb0a5245cb435afd3f3e8c35e2ecfe70fd.patch";
hash = "sha256-3atm1NGsMI4KEct2xakRG6EasRpF6YRI4raoVYxBV4g=";
})
];
postPatch = ''

View file

@ -7,13 +7,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "hyprland-protocols";
version = "0.4.0";
version = "0.5.0";
src = fetchFromGitHub {
owner = "hyprwm";
repo = "hyprland-protocols";
rev = "v${finalAttrs.version}";
hash = "sha256-CnpsECzP1VvBx8aM/ptv3S7rykYqTeh63LgEMv7hBnU=";
hash = "sha256-9OV4lOqrEJVLdOrpNN/9msNwAhI6FQTu4N7fufilG08=";
};
nativeBuildInputs = [

View file

@ -40,13 +40,13 @@ let
in
effectiveStdenv.mkDerivation (finalAttrs: {
pname = "koboldcpp";
version = "1.80.3";
version = "1.81";
src = fetchFromGitHub {
owner = "LostRuins";
repo = "koboldcpp";
tag = "v${finalAttrs.version}";
hash = "sha256-uxqn4t2dDaVSkVilJOflNbG2Q3fH3Yid8qdEaDGfIcw=";
hash = "sha256-VRT/8rlLI3J/w8hPJ+g7UYSczbRwemz6R8bO+HLAiMM=";
};
enableParallelBuilding = true;

View file

@ -21,7 +21,7 @@ assert
stdenv.mkDerivation rec {
pname = "libportal" + lib.optionalString (variant != null) "-${variant}";
version = "0.8.1";
version = "0.9.0";
outputs = [
"out"
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
owner = "flatpak";
repo = "libportal";
rev = version;
sha256 = "sha256-NAkD5pAQpmAtVxsFZt74PwURv+RbGBfqENIwyxEEUSc=";
sha256 = "sha256-uKblVaJB3s01En/T3ofT8uZHHarPKAO1qyLidLZ/b/g=";
};
depsBuildBuild = [

View file

@ -38,10 +38,6 @@ stdenv.mkDerivation rec {
yaml-cpp
];
env.NIX_CFLAGS_COMPILE = lib.optionalString (
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64
) "-D_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION=1";
meta = with lib; {
description = "Code formatter for Lua";
homepage = "https://github.com/Koihik/LuaFormatter";

View file

@ -99,8 +99,5 @@ rustPlatform.buildRustPackage rec {
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ teutat3s ];
mainProgram = "mas-cli";
# Note: broken on x86_64-darwin because of aligned_alloc, can be revisited after
# https://github.com/NixOS/nixpkgs/pull/346043 is merged
badPlatforms = [ "x86_64-darwin" ];
};
}

View file

@ -7,16 +7,16 @@
buildGoModule rec {
pname = "mihomo";
version = "1.19.0";
version = "1.19.1";
src = fetchFromGitHub {
owner = "MetaCubeX";
repo = "mihomo";
rev = "v${version}";
hash = "sha256-SUXxNHsbqbRtky456irkFotjMlbXPuBhNrHHZABGbPM=";
hash = "sha256-leeD/lra0ZA7in5ZX+uZwWRyHEaE9WzC8UEigI+Z+aA=";
};
vendorHash = "sha256-whH9nEUddXd+xkgoCatkmfddTxK3BFZdi/TyTiabnDc=";
vendorHash = "sha256-0CStTmN2+bXJuoolVM8Spfj2HKYK7a8krxlA0uwHOOw=";
excludedPackages = [ "./test" ];

View file

@ -50,10 +50,6 @@ stdenv.mkDerivation rec {
"-DMOLD_USE_SYSTEM_TBB:BOOL=ON"
];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.hostPlatform.isDarwin [
"-faligned-allocation"
]);
passthru = {
updateScript = nix-update-script { };
tests =

View file

@ -51,14 +51,10 @@ stdenv.mkDerivation {
tbb_2021_11
];
cmakeFlags =
[
(lib.cmakeBool "CPPTRACE_USE_EXTERNAL_LIBDWARF" true)
(lib.cmakeBool "CPPTRACE_USE_EXTERNAL_ZSTD" true)
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeFeature "CMAKE_OSX_DEPLOYMENT_TARGET" "10.14") # For aligned allocation
];
cmakeFlags = [
(lib.cmakeBool "CPPTRACE_USE_EXTERNAL_LIBDWARF" true)
(lib.cmakeBool "CPPTRACE_USE_EXTERNAL_ZSTD" true)
];
doCheck = true;

View file

@ -1,55 +1,79 @@
{ lib
, cmake
, exiv2
, fetchFromGitHub
, libraw
, libsForQt5
, libtiff
, opencv4
, pkg-config
, stdenv
{
lib,
cmake,
exiv2,
fetchFromGitHub,
libraw,
libsForQt5,
kdePackages,
libtiff,
opencv4,
pkg-config,
stdenv,
qtVersion ? 5,
}:
let
myQt = if qtVersion == 5 then libsForQt5 else kdePackages;
inherit (myQt) wrapQtAppsHook;
in
stdenv.mkDerivation (finalAttrs: {
pname = "nomacs";
version = "3.19.1";
hash = "sha256-NRwZ/ShJaLCMFv7QdfRoJY5zQFo18cAVWGRpS3ap3Rw=";
src = fetchFromGitHub {
owner = "nomacs";
repo = "nomacs";
rev = finalAttrs.version;
fetchSubmodules = false; # We'll use our own
hash = "sha256-NRwZ/ShJaLCMFv7QdfRoJY5zQFo18cAVWGRpS3ap3Rw=";
inherit (finalAttrs) hash;
};
outputs = [ "out" ]
plugins = fetchFromGitHub {
owner = "novomesk";
repo = "nomacs-plugins";
rev = "40d0f7089b7f108077dac5dede52e8a303b243b3";
hash = "sha256-7+JMmHaTvWjVTkLwXGtQHnoaC/3vK7haCzNvVIZ9F/g=";
};
outputs =
[ "out" ]
# man pages are not installed on Darwin, see cmake/{Mac,Unix}BuildTarget.cmake
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ "man" ];
sourceRoot = "${finalAttrs.src.name}/ImageLounge";
postUnpack = ''
rm -rf $sourceRoot/plugins
mkdir $sourceRoot/plugins
cp -r ${finalAttrs.plugins}/* $sourceRoot/plugins/
chmod -R +w $sourceRoot/plugins
'';
nativeBuildInputs = [
cmake
libsForQt5.wrapQtAppsHook
wrapQtAppsHook
pkg-config
];
buildInputs = [
exiv2
libraw
libtiff
# Once python stops relying on `propagatedBuildInputs` (https://github.com/NixOS/nixpkgs/issues/272178), deprecate `cxxdev` and switch to `dev`;
# note `dev` is selected by `mkDerivation` automatically, so one should omit `getOutput "dev"`;
# see: https://github.com/NixOS/nixpkgs/pull/314186#issuecomment-2129974277
(lib.getOutput "cxxdev" opencv4)
] ++ (with libsForQt5; [
kimageformats
qtbase
qtimageformats
qtsvg
qttools
quazip
]);
buildInputs =
[
exiv2
libraw
libtiff
# Once python stops relying on `propagatedBuildInputs` (https://github.com/NixOS/nixpkgs/issues/272178), deprecate `cxxdev` and switch to `dev`;
# note `dev` is selected by `mkDerivation` automatically, so one should omit `getOutput "dev"`;
# see: https://github.com/NixOS/nixpkgs/pull/314186#issuecomment-2129974277
(lib.getOutput "cxxdev" opencv4)
]
++ (with myQt; [
kimageformats
qtbase
qtimageformats
qtsvg
qttools
quazip
]);
cmakeFlags = [
(lib.cmakeBool "ENABLE_OPENCV" true)
@ -65,6 +89,13 @@ stdenv.mkDerivation (finalAttrs: {
mv $out/nomacs.app $out/Applications/nomacs.app
mv $out/libnomacsCore.dylib $out/lib/libnomacsCore.dylib
'';
# FIXME:
# why can't we have nomacs look in the "standard" plugin directory???
# None of the wrap stuff worked...
# Let's just instead move the plugin dir brute force
postFixup = ''
mv $out/lib/nomacs-plugins $out/bin/plugins
'';
meta = {
homepage = "https://nomacs.org";
@ -88,7 +119,10 @@ stdenv.mkDerivation (finalAttrs: {
changelog = "https://github.com/nomacs/nomacs/releases/tag/${finalAttrs.src.rev}";
license = with lib.licenses; [ gpl3Plus ];
mainProgram = "nomacs";
maintainers = with lib.maintainers; [ mindavi ];
inherit (libsForQt5.qtbase.meta) platforms;
maintainers = with lib.maintainers; [
mindavi
ppenguin
];
inherit (myQt.qtbase.meta) platforms;
};
})

View file

@ -46,14 +46,6 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-DWITH_LTO=OFF" ];
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals
(stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13")
[
"-faligned-allocation"
]
);
installPhase = ''
runHook preInstall

View file

@ -14,12 +14,7 @@
yq-go,
}:
let
# fix build error, `no member named 'aligned_alloc'` on x86_64-darwin
# https://github.com/NixOS/nixpkgs/issues/272156#issuecomment-1839904283
stdenv' = if stdenv.hostPlatform.isDarwin then overrideSDK stdenv "11.0" else stdenv;
in
stdenv'.mkDerivation (finalAttrs: {
stdenv.mkDerivation (finalAttrs: {
pname = "renovate";
version = "39.90.2";
@ -41,7 +36,7 @@ stdenv'.mkDerivation (finalAttrs: {
pnpm_9.configHook
python3
yq-go
] ++ lib.optional stdenv'.hostPlatform.isDarwin xcbuild;
] ++ lib.optional stdenv.hostPlatform.isDarwin xcbuild;
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) pname version src;

File diff suppressed because it is too large Load diff

View file

@ -25,12 +25,8 @@ rustPlatform.buildRustPackage rec {
hash = "sha256-magf19hA5PVAZafRcQXFaAD50qGofztpiluVc2aCeOk=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"fix-path-env-0.0.0" = "sha256-kSpWO2qMotpsYKJokqUWCUzGGmNOazaREDLjke4/CtE=";
};
};
useFetchCargoVendor = true;
cargoHash = "sha256-5wSxa8jgto+v+tJHbenc2nvGlLaOBYyRrCqFyCPnncc=";
npmDeps = fetchNpmDeps {
name = "${pname}-npm-deps-${version}";

View file

@ -1,34 +1,123 @@
# generated by zon2nix (https://github.com/nix-community/zon2nix)
# generated by zon2nix (https://github.com/Cloudef/zig2nix)
{ linkFarm, fetchzip }:
{
lib,
linkFarm,
fetchurl,
fetchgit,
runCommandLocal,
zig,
name ? "zig-packages",
}:
linkFarm "zig-packages" [
with builtins;
with lib;
let
unpackZigArtifact =
{ name, artifact }:
runCommandLocal name
{
nativeBuildInputs = [ zig ];
}
''
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
mv "$TMPDIR/p/$hash" "$out"
chmod 755 "$out"
'';
fetchZig =
{
name,
url,
hash,
}:
let
artifact = fetchurl { inherit url hash; };
in
unpackZigArtifact { inherit name artifact; };
fetchGitZig =
{
name,
url,
hash,
}:
let
parts = splitString "#" url;
url_base = elemAt parts 0;
url_without_query = elemAt (splitString "?" url_base) 0;
rev_base = elemAt parts 1;
rev = if match "^[a-fA-F0-9]{40}$" rev_base != null then rev_base else "refs/heads/${rev_base}";
in
fetchgit {
inherit name rev hash;
url = url_without_query;
deepClone = false;
};
fetchZigArtifact =
{
name,
url,
hash,
}:
let
parts = splitString "://" url;
proto = elemAt parts 0;
path = elemAt parts 1;
fetcher = {
"git+http" = fetchGitZig {
inherit name hash;
url = "http://${path}";
};
"git+https" = fetchGitZig {
inherit name hash;
url = "https://${path}";
};
http = fetchZig {
inherit name hash;
url = "http://${path}";
};
https = fetchZig {
inherit name hash;
url = "https://${path}";
};
};
in
fetcher.${proto};
in
linkFarm name [
{
name = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56";
path = fetchZigArtifact {
name = "zig-pixman";
url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.2.0.tar.gz";
hash = "sha256-CYgFIOR9H5q8UUpFglaixOocCMT6FGpcKQQBUVWpDKQ=";
};
}
{
name = "1220687c8c47a48ba285d26a05600f8700d37fc637e223ced3aa8324f3650bf52242";
path = fetchzip {
path = fetchZigArtifact {
name = "zig-wayland";
url = "https://codeberg.org/ifreund/zig-wayland/archive/v0.2.0.tar.gz";
hash = "sha256-dvit+yvc0MnipqWjxJdfIsA6fJaJZOaIpx4w4woCxbE=";
hash = "sha256-gxzkHLCq2NqX3l4nEly92ARU5dqP1SqnjpGMDgx4TXA=";
};
}
{
name = "122083317b028705b5d27be12976feebf17066a4e51802b3b5e9f970bec580e433e1";
path = fetchzip {
path = fetchZigArtifact {
name = "zig-wlroots";
url = "https://codeberg.org/ifreund/zig-wlroots/archive/v0.18.1.tar.gz";
hash = "sha256-fru44ZCuDpd8fc5qp80oAcQO3Jwy3ouywWURhltek+U=";
};
}
{
name = "12209db20ce873af176138b76632931def33a10539387cba745db72933c43d274d56";
path = fetchzip {
url = "https://codeberg.org/ifreund/zig-pixman/archive/v0.2.0.tar.gz";
hash = "sha256-zcfZEMnipWDPuptl9UN0PoaJDjy2EHc7Wwi4GQq3hkY=";
hash = "sha256-S77/Own9/GjhLCCE/eI56pdpmhlvMVP41WZ27b+Sook=";
};
}
{
name = "1220c90b2228d65fd8427a837d31b0add83e9fade1dcfa539bb56fd06f1f8461605f";
path = fetchzip {
path = fetchZigArtifact {
name = "zig-xkbcommon";
url = "https://codeberg.org/ifreund/zig-xkbcommon/archive/v0.2.0.tar.gz";
hash = "sha256-T+EZiStBfmxFUjaX05WhYkFJ8tRok/UQtpc9QY9NxZk=";
hash = "sha256-f5oEJU5i2qeVN3GBrnQcqzEJCiOT7l4ak7GQ6gw5cH0=";
};
}
]

View file

@ -1,29 +1,30 @@
{ lib
, stdenv
, callPackage
, fetchFromGitea
, libGL
, libX11
, libevdev
, libinput
, libxkbcommon
, pixman
, pkg-config
, scdoc
, udev
, wayland
, wayland-protocols
, wayland-scanner
, wlroots_0_18
, xwayland
, zig_0_13
, withManpages ? true
, xwaylandSupport ? true
{
lib,
stdenv,
callPackage,
fetchFromGitea,
libGL,
libX11,
libevdev,
libinput,
libxkbcommon,
pixman,
pkg-config,
scdoc,
udev,
wayland,
wayland-protocols,
wayland-scanner,
wlroots_0_18,
xwayland,
zig_0_13,
withManpages ? true,
xwaylandSupport ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "river";
version = "0.3.6";
version = "0.3.7";
outputs = [ "out" ] ++ lib.optionals withManpages [ "man" ];
@ -33,7 +34,7 @@ stdenv.mkDerivation (finalAttrs: {
repo = "river";
rev = "refs/tags/v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-bLUotGbKHlMxNn8kC613cFp41qTXoxtwo0O4mZQLl7w=";
hash = "sha256-4ac0LGQtLldHyXJ2GIRMHV+VZfUrRFdBYLiAHX5lWcw=";
};
deps = callPackage ./build.zig.zon.nix { };
@ -43,8 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
wayland-scanner
xwayland
zig_0_13.hook
]
++ lib.optional withManpages scdoc;
] ++ lib.optional withManpages scdoc;
buildInputs = [
libGL
@ -60,10 +60,13 @@ stdenv.mkDerivation (finalAttrs: {
dontConfigure = true;
zigBuildFlags = [
"--system"
"${finalAttrs.deps}"
] ++ lib.optional withManpages "-Dman-pages" ++ lib.optional xwaylandSupport "-Dxwayland";
zigBuildFlags =
[
"--system"
"${finalAttrs.deps}"
]
++ lib.optional withManpages "-Dman-pages"
++ lib.optional xwaylandSupport "-Dxwayland";
postInstall = ''
install contrib/river.desktop -Dt $out/share/wayland-sessions
@ -71,7 +74,7 @@ stdenv.mkDerivation (finalAttrs: {
passthru = {
providedSessions = [ "river" ];
updateScript = ./update.nu;
updateScript = ./update.sh;
};
meta = {

View file

@ -1,9 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -i nu -p nushell common-updater-scripts zon2nix
let latest_tag = list-git-tags --url=https://codeberg.org/river/river | lines | sort --natural | str replace v '' | last
update-source-version river $latest_tag
http get $"https://codeberg.org/river/river/raw/tag/v($latest_tag)/build.zig.zon" | save build.zig.zon
zon2nix | save -f pkgs/by-name/ri/river/build.zig.zon.nix
rm build.zig.zon

14
pkgs/by-name/ri/river/update.sh Executable file
View file

@ -0,0 +1,14 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash common-updater-scripts gnused nixfmt-rfc-style
latest_tag=$(list-git-tags --url=https://codeberg.org/river/river | sed 's/^v//' | tail -n 1)
update-source-version river "$latest_tag"
wget "https://codeberg.org/river/river/raw/tag/v${latest_tag}/build.zig.zon"
nix --extra-experimental-features 'nix-command flakes' run github:Cloudef/zig2nix#zon2nix -- build.zig.zon >pkgs/by-name/ri/river/build.zig.zon.nix
# strip file protocol
sed -i '\|file = unpackZigArtifact { inherit name; artifact = /. + path; };|d' pkgs/by-name/ri/river/build.zig.zon.nix
nixfmt pkgs/by-name/ri/river/build.zig.zon.nix
rm -f build.zig.zon build.zig.zon2json-lock

View file

@ -56,12 +56,6 @@ stdenv.mkDerivation (finalAttrs: {
"tools"
];
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.cc.isClang [
"-faligned-allocation"
]
);
cmakeFlags = [
"-DPORTABLE=1"
"-DWITH_JEMALLOC=${if enableJemalloc then "1" else "0"}"

View file

@ -236,11 +236,6 @@ stdenv.mkDerivation rec {
}"
'';
# error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.13 or newer
env.CXXFLAGS = lib.optionalString (
stdenv.hostPlatform.system == "x86_64-darwin"
) "-faligned-allocation";
# workaround for
# https://github.com/root-project/root/issues/14778
env.NIX_LDFLAGS = lib.optionalString (

View file

@ -2,7 +2,7 @@
lib,
stdenvNoCC,
fetchzip,
version ? "4.300",
version ? "2.100",
}:
let

View file

@ -1,36 +1,44 @@
{
lib,
stdenv,
rustPlatform,
fetchCrate,
pkg-config,
openssl,
darwin,
nix-update-script,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "sea-orm-cli";
version = "1.1.1";
version = "1.1.3";
src = fetchCrate {
inherit pname version;
hash = "sha256-rPPOVU5oyBIywiJuK23PutfvhxaFNi/VZ9kVWLMUVjI=";
hash = "sha256-4j4jeZBe4HyPpa8Em4/zPcIjlJmGfymyEJP2PfDdELQ=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.apple_sdk.frameworks.SystemConfiguration ];
buildInputs = [ openssl ];
cargoHash = "sha256-r5nqzu79z/XdrqvaJ+5ylZI6tC/SKTzmoOSgkbAaPn4=";
cargoHash = "sha256-ZdKDQUBpFEVBvvGCulRH+riTeLoXGMMBn2RGSL1uUy4=";
meta = with lib; {
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = [ "--version" ];
doInstallCheck = true;
__darwinAllowLocalNetworking = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
mainProgram = "sea-orm-cli";
homepage = "https://www.sea-ql.org/SeaORM";
description = " Command line utility for SeaORM";
license = with licenses; [
description = "Command line utility for SeaORM";
license = with lib.licenses; [
mit # or
asl20
];
maintainers = with maintainers; [ traxys ];
maintainers = with lib.maintainers; [ traxys ];
};
}

View file

@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
alsa-lib,
fftw,
gsl,
motif,
xorg,
}:
stdenv.mkDerivation rec {
pname = "snd";
version = "25.0";
src = fetchurl {
url = "mirror://sourceforge/snd/snd-${version}.tar.gz";
hash = "sha256-WJ5/XBqwV19ZoJufz2gMCMsmJfuKEPgwX/YveYp7j4s=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs =
[
fftw
gsl
motif
]
++ lib.optionals stdenv.hostPlatform.isLinux [
alsa-lib
]
++ (with xorg; [
libXext
libXft
libXpm
libXt
]);
configureFlags = [
"--with-motif"
];
enableParallelBuilding = true;
meta = with lib; {
description = "Sound editor";
homepage = "https://ccrma.stanford.edu/software/snd/";
platforms = platforms.unix;
license = licenses.free;
maintainers = [ ];
mainProgram = "snd";
};
}

View file

@ -26,8 +26,6 @@ rustPlatform.buildRustPackage rec {
rustPlatform.bindgenHook
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation";
postPatch = ''
substituteInPlace src/main.rs \
--replace-fail "./config.cfg" "$out/etc/sonic/config.cfg"

View file

@ -53,8 +53,6 @@ stdenv.mkDerivation (finalAttrs: {
readline
];
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-faligned-allocation";
doCheck = true;
strictDeps = true;

View file

@ -7,16 +7,16 @@
}:
buildGoModule rec {
pname = "termshot";
version = "0.4.0";
version = "0.4.1";
src = fetchFromGitHub {
owner = "homeport";
repo = "termshot";
tag = "v${version}";
hash = "sha256-x2XVA686E3GPMz1hzTWZ1FqVflfPWTwbAf8JAG8HMp0=";
hash = "sha256-vkxOUo1RyzZBN2+wRn8yWV930HrKRJnPwpHnxza5GNE=";
};
vendorHash = "sha256-ON3dmwf9IYEf+e4Z5EJ72wC4IIr/0/ssgzAJmRb7MSk=";
vendorHash = "sha256-Wsoy0jlwMYlN8yh7xncGrxTl0qJsPXV4IdYzU7jStzw=";
ldflags = [
"-s"

View file

@ -85,9 +85,6 @@ stdenv.mkDerivation rec {
env.NIX_CFLAGS_COMPILE = toString (
[ ]
++ lib.optional stdenv.hostPlatform.isLinux "-ltbb"
++ lib.optional (
stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13"
) "-fno-aligned-allocation"
# Workaround for https://github.com/NixOS/nixpkgs/issues/19098
++ lib.optional (stdenv.cc.isClang && stdenv.hostPlatform.isDarwin) "-fno-lto"
);

View file

@ -94,14 +94,6 @@ stdenv.mkDerivation rec {
"-DENABLE_X11=OFF"
];
# error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
preBuild =
lib.optionalString
(stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11.0")
''
export MACOSX_DEPLOYMENT_TARGET=10.14
'';
meta = with lib; {
description = "Drop in replacement for ueberzug written in C++";
homepage = "https://github.com/jstkdng/ueberzugpp";

View file

@ -3,38 +3,29 @@
stdenv,
fetchFromGitHub,
autoreconfHook,
wxGTK,
wxGTK32,
sqlite,
Cocoa,
setfile,
rez,
derez,
}:
stdenv.mkDerivation rec {
pname = "wxsqlite3";
version = "4.9.12";
version = "4.10.0";
src = fetchFromGitHub {
owner = "utelle";
repo = "wxsqlite3";
rev = "v${version}";
hash = "sha256-WiOAF1yg18W4Vyyy+rzRe87GQTemvn32bexit4M/HjE=";
hash = "sha256-1U8UF5FYKoigOLDMq1/nlchAdb8NeJhC6JluFDWNQ2M=";
};
nativeBuildInputs = [ autoreconfHook ];
nativeBuildInputs = [
autoreconfHook
];
buildInputs =
[
sqlite
wxGTK
]
++ lib.optionals (stdenv.hostPlatform.isDarwin) [
Cocoa
setfile
rez
derez
];
buildInputs = [
sqlite
wxGTK32
];
meta = with lib; {
homepage = "https://utelle.github.io/wxsqlite3/";

View file

@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
makeWrapper,
wxGTK32,
wxsqlite3,
sqlite,
}:
stdenv.mkDerivation rec {
pname = "wxsqliteplus";
version = "0.4.0";
src = fetchFromGitHub {
owner = "guanlisheng";
repo = "wxsqliteplus";
rev = "v${version}";
hash = "sha256-gyH1Wlmg9xQy7xm7rhKZa7BFTFFN4JQHp3CHmzMkVOg=";
};
nativeBuildInputs = [
cmake
pkg-config
makeWrapper
];
buildInputs = [
wxGTK32
wxsqlite3
sqlite
];
cmakeFlags = [
"-DWXSQLITE3_HAVE_CODEC=1"
];
installPhase =
lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin}
mv wxSQLitePlus.app $out/Applications
makeWrapper $out/{Applications/wxSQLitePlus.app/Contents/MacOS,bin}/wxSQLitePlus
''
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
install -Dm755 wxSQLitePlus $out/bin/wxSQLitePlus
'';
meta = with lib; {
description = "Simple SQLite database browser built with wxWidgets";
mainProgram = "wxSQLitePlus";
homepage = "https://github.com/guanlisheng/wxsqliteplus";
license = licenses.gpl3Plus;
maintainers = [ ];
platforms = platforms.unix;
};
}

View file

@ -21,6 +21,7 @@
libxkbfile,
libxshmfence,
libgbm,
mesa,
meson,
nettle,
ninja,
@ -75,6 +76,7 @@ stdenv.mkDerivation (finalPackages: {
libxkbfile
libxshmfence
libgbm
mesa
nettle
openssl
pixman

View file

@ -24,6 +24,10 @@
"nepali-date@biplab",
"nepali-calendar-gs-extension@subashghimire.info.np"
],
"mouse-follows-focus": [
"mouse-follows-focus@crisidev.org",
"mousefollowsfocus@matthes.biz"
],
"power-profile-indicator": [
"power-profile-indicator@laux.wtf",
"power-profile@fthx"

View file

@ -146,15 +146,6 @@ super: lib.trivial.pipe super [
meta.maintainers = with lib.maintainers; [ andersk ];
}))
(patchExtension "tophat@fflewddur.github.io" (old: {
patches = [
(substituteAll {
src = ./extensionOverridesPatches/tophat_at_fflewddur.github.io.patch;
gtop_path = "${libgtop}/lib/girepository-1.0";
})
];
}))
(patchExtension "Vitals@CoreCoding.com" (old: {
patches = [
(substituteAll {

View file

@ -1,65 +0,0 @@
diff --git a/lib/cpu.js b/lib/cpu.js
--- a/lib/cpu.js
+++ b/lib/cpu.js
@@ -21,7 +21,8 @@ import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
-import GTop from 'gi://GTop';
+imports.gi.GIRepository.Repository.prepend_search_path('@gtop_path@');
+const {default: GTop} = await import('gi://GTop');
import St from 'gi://St';
import {gettext as _, ngettext} from 'resource:///org/gnome/shell/extensions/extension.js';
diff --git a/lib/fs.js b/lib/fs.js
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -21,7 +21,8 @@ import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
-import GTop from 'gi://GTop';
+imports.gi.GIRepository.Repository.prepend_search_path('@gtop_path@');
+const {default: GTop} = await import('gi://GTop');
import St from 'gi://St';
import * as Config from './config.js';
diff --git a/lib/mem.js b/lib/mem.js
--- a/lib/mem.js
+++ b/lib/mem.js
@@ -21,7 +21,8 @@ import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
-import GTop from 'gi://GTop';
+imports.gi.GIRepository.Repository.prepend_search_path('@gtop_path@');
+const {default: GTop} = await import('gi://GTop');
import St from 'gi://St';
import {gettext as _, ngettext} from 'resource:///org/gnome/shell/extensions/extension.js';
diff --git a/lib/net.js b/lib/net.js
--- a/lib/net.js
+++ b/lib/net.js
@@ -21,7 +21,8 @@ import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
-import GTop from 'gi://GTop';
+imports.gi.GIRepository.Repository.prepend_search_path('@gtop_path@');
+const {default: GTop} = await import('gi://GTop');
import St from 'gi://St';
import {gettext as _, ngettext} from 'resource:///org/gnome/shell/extensions/extension.js';
diff --git a/lib/shared.js b/lib/shared.js
--- a/lib/shared.js
+++ b/lib/shared.js
@@ -18,7 +18,8 @@
// along with TopHat. If not, see <https://www.gnu.org/licenses/>.
import Gio from 'gi://Gio';
-import GTop from 'gi://GTop';
+imports.gi.GIRepository.Repository.prepend_search_path('@gtop_path@');
+const {default: GTop} = await import('gi://GTop');
import Clutter from 'gi://Clutter';
export const SECOND_AS_MICROSECONDS = 1000000;

View file

@ -23,6 +23,9 @@
"nepali-date@biplab" = "nepali-calendar";
"nepali-calendar-gs-extension@subashghimire.info.np" = "nepali-calendar-2";
"mousefollowsfocus@matthes.biz" = "mouse-follows-focus";
"mouse-follows-focus@crisidev.org" = "mouse-follows-focus-2";
"power-profile-indicator@laux.wtf" = "power-profile-indicator";
"power-profile@fthx" = "power-profile-indicator-2";

File diff suppressed because one or more lines are too long

View file

@ -7,7 +7,7 @@ let
config = (import ../../../../nixos/lib/eval-config.nix {
inherit system;
modules = [ module { isoImage.isoBaseName = isoBaseName; } ] ++ extraModules;
modules = [ module { image.baseName = isoBaseName; } ] ++ extraModules;
}).config;
in

View file

@ -75,9 +75,6 @@ stdenv.mkDerivation rec {
"x86_64-linux"
"x86_64-darwin"
];
# Upstream claims support, but breaks with:
# error: use of undeclared identifier 'aligned_alloc'
broken = stdenv.hostPlatform.isDarwin;
homepage = "https://github.com/clasp-developers/clasp";
mainProgram = "clasp";
};

View file

@ -31,30 +31,14 @@ stdenv.mkDerivation rec {
hash = "sha256-BPalUh9EgdCqVaWC1HoreyyRcPQc4QMIYnLrRoNDDCI=";
};
postPatch =
''
# See https://github.com/halide/Halide/issues/7785
substituteInPlace 'src/runtime/HalideRuntime.h' \
--replace '#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)
#define HALIDE_CPP_COMPILER_HAS_FLOAT16' \
'#if defined(__x86_64__) || defined(__i386__)
#define HALIDE_CPP_COMPILER_HAS_FLOAT16'
''
# Note: on x86_64-darwin, clang fails to find AvailabilityVersions.h, so we remove it.
# Halide uses AvailabilityVersions.h and TargetConditionals.h to determine whether
# ::aligned_alloc is available. For us, it isn't.
+ lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) ''
substituteInPlace 'src/runtime/HalideBuffer.h' \
--replace '#ifdef __APPLE__
#include <AvailabilityVersions.h>
#include <TargetConditionals.h>
#endif' \
' ' \
--replace 'TARGET_OS_OSX && (__MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_15)' \
'1' \
--replace 'TARGET_OS_IPHONE && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_14_0)' \
'0'
'';
postPatch = ''
# See https://github.com/halide/Halide/issues/7785
substituteInPlace 'src/runtime/HalideRuntime.h' \
--replace '#if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || defined(__aarch64__)
#define HALIDE_CPP_COMPILER_HAS_FLOAT16' \
'#if defined(__x86_64__) || defined(__i386__)
#define HALIDE_CPP_COMPILER_HAS_FLOAT16'
'';
cmakeFlags = [
"-DWARNINGS_AS_ERRORS=OFF"

View file

@ -0,0 +1,64 @@
{
lib,
mkDerivation,
fetchFromGitHub,
cmake,
pkg-config,
boost,
doxygen,
gmp,
gnuradio,
libbladeRF,
mpir,
osmosdr,
python,
spdlog,
}:
mkDerivation {
pname = "gr-bladeRF";
version = "0-unstable-2023-11-20";
src = fetchFromGitHub {
owner = "Nuand";
repo = "gr-bladeRF";
rev = "27de2898dbee75d55c61f541315e3853e602e526";
hash = "sha256-josovHEp2VxgZqItkTAISdY1LARMIvQKD604fh4iZWc=";
};
buildInputs =
[
boost
doxygen
gmp
gnuradio
libbladeRF
mpir
osmosdr
spdlog
]
++ lib.optionals (gnuradio.hasFeature "python-support") [
python.pkgs.numpy
python.pkgs.pybind11
];
cmakeFlags = [
(lib.cmakeBool "ENABLE_PYTHON" (gnuradio.hasFeature "python-support"))
];
nativeBuildInputs =
[
cmake
pkg-config
]
++ lib.optionals (gnuradio.hasFeature "python-support") [
python.pkgs.mako
python.pkgs.pygccxml
];
meta = {
description = "GNU Radio source and sink blocks for bladeRF devices";
homepage = "https://github.com/Nuand/gr-bladeRF";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ wucke13 ];
platforms = lib.platforms.linux;
};
}

View file

@ -69,16 +69,9 @@ stdenv.mkDerivation {
export XDG_CACHE_HOME=$(mktemp -d)/.cache
'';
cmakeFlags =
[
"-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}"
]
++ lib.optionals
(stdenv.hostPlatform.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11")
[
# warning: 'aligned_alloc' is only available on macOS 10.15 or newer
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
];
cmakeFlags = [
"-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}"
];
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=enum-constexpr-conversion";

View file

@ -1,88 +0,0 @@
{
lib,
stdenv,
fetchurl,
libgpg-error,
enableCapabilities ? false,
libcap,
buildPackages,
# for passthru.tests
gnupg,
libotr,
rsyslog,
}:
assert enableCapabilities -> stdenv.hostPlatform.isLinux;
stdenv.mkDerivation rec {
pname = "libgcrypt";
version = "1.8.10";
src = fetchurl {
url = "mirror://gnupg/libgcrypt/libgcrypt-${version}.tar.bz2";
sha256 = "sha256-aJaRVQH5UeI9AtywRTRpwswiqk13oAH/c6JkfC0p590=";
};
outputs = [
"out"
"dev"
"info"
];
outputBin = "dev";
# The CPU Jitter random number generator must not be compiled with
# optimizations and the optimize -O0 pragma only works for gcc.
# The build enables -O2 by default for everything else.
hardeningDisable = lib.optional stdenv.cc.isClang "fortify";
depsBuildBuild = [ buildPackages.stdenv.cc ];
buildInputs = [ libgpg-error ] ++ lib.optional enableCapabilities libcap;
strictDeps = true;
configureFlags =
[ "--with-libgpg-error-prefix=${libgpg-error.dev}" ]
++ lib.optional (
stdenv.hostPlatform.isMusl || (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
) "--disable-asm"; # for darwin see https://dev.gnupg.org/T5157
# Necessary to generate correct assembly when compiling for aarch32 on
# aarch64
configurePlatforms = [
"host"
"build"
];
postConfigure = ''
sed -i configure \
-e 's/NOEXECSTACK_FLAGS=$/NOEXECSTACK_FLAGS="-Wa,--noexecstack"/'
'';
# Make sure libraries are correct for .pc and .la files
# Also make sure includes are fixed for callers who don't use libgpgcrypt-config
postFixup =
''
sed -i 's,#include <gpg-error.h>,#include "${libgpg-error.dev}/include/gpg-error.h",g' "$dev/include/gcrypt.h"
''
+ lib.optionalString enableCapabilities ''
sed -i 's,\(-lcap\),-L${libcap.lib}/lib \1,' $out/lib/libgcrypt.la
'';
doCheck = true;
passthru.tests = {
inherit gnupg libotr rsyslog;
};
meta = with lib; {
homepage = "https://www.gnu.org/software/libgcrypt/";
changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=${pname}.git;a=blob;f=NEWS;hb=refs/tags/${pname}-${version}";
description = "General-purpose cryptographic library";
license = licenses.lgpl2Plus;
platforms = platforms.all;
knownVulnerabilities = [
"CVE-2021-40528"
];
};
}

View file

@ -38,8 +38,6 @@ stdenv.mkDerivation rec {
scikit-build-core
];
env.CXXFLAGS = toString (lib.optional stdenv.hostPlatform.isDarwin [ "-faligned-allocation" "-fno-aligned-new" "-fvisibility=hidden" ]);
postBuild = ''
pushd ../api/python
${pyEnv.interpreter} -m build --no-isolation --wheel --skip-dependency-check --config-setting=--parallel=$NIX_BUILD_CORES

View file

@ -41,18 +41,6 @@ stdenv.mkDerivation rec {
"-DOPENVDB_BUILD_NANOVDB=ON"
];
# error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer
env =
lib.optionalAttrs
(
stdenv.hostPlatform.isDarwin
&& lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13"
&& lib.versionAtLeast tbb.version "2021.8.0"
)
{
NIX_CFLAGS_COMPILE = "-faligned-allocation";
};
postFixup = ''
substituteInPlace $dev/lib/cmake/OpenVDB/FindOpenVDB.cmake \
--replace \''${OPENVDB_LIBRARYDIR} $out/lib \

View file

@ -2,6 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
bluez,
libobjc,
@ -11,15 +12,32 @@
stdenv.mkDerivation rec {
pname = "WiiUse";
version = "0.15.5";
version = "0.15.6";
src = fetchFromGitHub {
owner = "wiiuse";
repo = "wiiuse";
rev = version;
sha256 = "05gc3s0wxx7ga4g32yyibyxdh46rm9bbslblrc72ynrjxq98sg13";
sha256 = "sha256-l2CS//7rx5J3kI32yTSp0BDtP0T5+riLowtnxnfAotc=";
};
outputs = [
"out"
"dev"
"doc"
"lib"
];
patches = [
# Fix `.pc` files's double prefixes:
# https://github.com/wiiuse/wiiuse/pull/153
(fetchpatch {
name = "pc-prefix.patch";
url = "https://github.com/wiiuse/wiiuse/commit/9c774ec0b71fa5119eabed823c35e4c745f3277c.patch";
hash = "sha256-WEHumCiNzsWfyMl7qu9xrlsNhgNcawdi+EFXf5w8jiE=";
})
];
nativeBuildInputs = [ cmake ];
buildInputs =
@ -32,7 +50,9 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ bluez ];
cmakeFlags = [ "-DBUILD_EXAMPLE_SDL=OFF" ];
cmakeFlags = [
"-DBUILD_EXAMPLE_SDL=OFF"
] ++ [ (lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic)) ];
meta = with lib; {
description = "Feature complete cross-platform Wii Remote access library";

View file

@ -1,66 +0,0 @@
{
lib,
stdenv,
fetchFromGitHub,
wxGTK,
wxsqlite3,
sqlite,
Cocoa,
setfile,
}:
stdenv.mkDerivation rec {
pname = "wxsqliteplus";
version = "0.3.6";
src = fetchFromGitHub {
owner = "guanlisheng";
repo = "wxsqliteplus";
rev = "v${version}";
sha256 = "0mgfq813pli56mar7pdxlhwjf5k10j196rs3jd0nc8b6dkzkzlnf";
};
postPatch = ''
sed -i '/WX_CLEAR_ARRAY/s/$/;/' src/{createtable,sqlite3table}.cpp
'';
buildInputs = [
wxGTK
wxsqlite3
sqlite
] ++ lib.optional stdenv.hostPlatform.isDarwin Cocoa;
makeFlags =
[
"LDFLAGS=-L${wxsqlite3}/lib"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
"SETFILE=${setfile}/bin/SetFile"
];
preBuild = ''
sed -i -e 's|all: $(LIBPREFIX)wxsqlite$(LIBEXT)|all: |g' Makefile
sed -i -e 's|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) $(LIBPREFIX)wxsqlite$(LIBEXT)|wxsqliteplus$(EXEEXT): $(WXSQLITEPLUS_OBJECTS) |g' Makefile
sed -i -e 's|-lwxsqlite |-lwxcode_${
if stdenv.hostPlatform.isDarwin then "osx_cocoau_wxsqlite3-3.2.0" else "gtk3u_wxsqlite3-3.2"
} |g' Makefile
'';
installPhase =
''
install -D ${lib.optionalString stdenv.hostPlatform.isDarwin "wxsqliteplus.app/Contents/MacOS/"}wxsqliteplus $out/bin/wxsqliteplus
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
mv wxsqliteplus.app $out/Applications/
'';
meta = with lib; {
description = "Simple SQLite database browser built with wxWidgets";
mainProgram = "wxsqliteplus";
homepage = "https://github.com/guanlisheng/wxsqliteplus";
license = licenses.gpl3Plus;
maintainers = [ ];
platforms = platforms.unix;
};
}

View file

@ -74,12 +74,6 @@ stdenv.mkDerivation (finalAttrs: {
./installed-tests-share.patch
];
# until/unless bubblewrap ships a pkg-config file, meson has no way to find it when cross-compiling.
postPatch = ''
substituteInPlace meson.build \
--replace-fail "find_program('bwrap'" "find_program('${lib.getExe bubblewrap}'"
'';
nativeBuildInputs = [
docbook_xml_dtd_412
docbook_xml_dtd_43
@ -149,6 +143,20 @@ stdenv.mkDerivation (finalAttrs: {
doCheck = true;
postPatch = ''
# until/unless bubblewrap ships a pkg-config file, meson has no way to find it when cross-compiling.
substituteInPlace meson.build \
--replace-fail "find_program('bwrap'" "find_program('${lib.getExe bubblewrap}'"
# Disable test failing with libportal 0.9.0
${
assert (lib.versionOlder finalAttrs.version "1.20.0");
"# TODO: Remove when updating to x-d-p 1.20.0"
}
substituteInPlace tests/test-portals.c \
--replace-fail 'g_test_add_func ("/portal/notification/bad-arg", test_notification_bad_arg);' ""
'';
preCheck = ''
# For test_trash_file
export HOME=$(mktemp -d)

View file

@ -1,14 +0,0 @@
diff --git a/hacl-star-raw/karamel/include/krml/internal/target.h b/hacl-star-raw/karamel/include/krml/internal/target.h
index 695873a..c0aed18 100644
--- a/hacl-star-raw/karamel/include/krml/internal/target.h
+++ b/hacl-star-raw/karamel/include/krml/internal/target.h
@@ -82,6 +82,9 @@
# endif
# if (defined(_MSC_VER) || (defined(__MINGW32__) && defined(__MINGW64_VERSION_MAJOR)))
# define KRML_ALIGNED_MALLOC(X, Y) _aligned_malloc(Y, X)
+# elif defined(__APPLE__)
+# include <mm_malloc.h>
+# define KRML_ALIGNED_MALLOC(X, Y) _mm_malloc(Y, X)
# else
# define KRML_ALIGNED_MALLOC(X, Y) aligned_alloc(X, Y)
# endif

View file

@ -19,10 +19,6 @@ stdenv.mkDerivation rec {
stripRoot = false;
};
patches = [
./aligned-alloc.patch
];
# strictoverflow is disabled because it breaks aarch64-darwin
hardeningDisable = [ "strictoverflow" ];

View file

@ -1,5 +1,6 @@
{
lib,
pythonOlder,
aiofiles,
async-timeout,
buildPythonPackage,
@ -42,6 +43,8 @@ buildPythonPackage rec {
usb = [ libusb1 ];
};
doCheck = pythonOlder "3.12"; # FIXME: tests are broken on 3.13
nativeCheckInputs = [
mock
pycryptodome

View file

@ -0,0 +1,26 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
}:
buildPythonPackage rec {
pname = "commonregex";
version = "1.5.4";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-JxUwZ4rYr1PA6MIzp2JZeWnoRtACnxIhWsF4eR894KU=";
};
build-system = [ setuptools ];
meta = with lib; {
description = "A collection of common regular expressions bundled with an easy to use interface";
homepage = "https://github.com/madisonmay/CommonRegex";
maintainers = with maintainers; [ k900 ];
license = licenses.mit;
};
}

View file

@ -9,14 +9,14 @@
buildPythonPackage rec {
pname = "fastecdsa";
version = "2.3.2";
version = "3.0.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-81JVptPkEQkWa11LCIZtWsu5ny4eZNOn50x3RmTNqEI=";
hash = "sha256-deOnwZYvjtOMps90fp7OUfzbMxDFsk0Oj72gFoMymAU=";
};
buildInputs = [ gmp ];

View file

@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "google-cloud-speech";
version = "2.29.0";
version = "2.30.0";
pyproject = true;
disabled = pythonOlder "3.7";
@ -22,7 +22,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "google_cloud_speech";
inherit version;
hash = "sha256-N1rr57Us5VJxcvBcpRDHycBpIYpuRCb6KNVQwzSzrD8=";
hash = "sha256-7GPL1MK72wMGRioPMAgvRJXe3FBvDEoaKZDubmNGVEw=";
};
build-system = [ setuptools ];

View file

@ -0,0 +1,50 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
aiofiles,
aiohttp,
colorlog,
commonregex,
defusedxml,
deprecated,
ifaddr,
pycryptodome,
platformdirs,
}:
buildPythonPackage rec {
pname = "midea-local";
version = "6.0.3";
pyproject = true;
src = fetchFromGitHub {
owner = "midea-lan";
repo = pname;
tag = "v${version}";
hash = "sha256-Q0ua0cIYfZ60RzrRNatx+a1nz1f51rR2D5IS5abXKME=";
};
build-system = [ setuptools ];
dependencies = [
aiofiles
aiohttp
colorlog
commonregex
defusedxml
deprecated
ifaddr
pycryptodome
platformdirs
];
meta = with lib; {
description = " Control your Midea M-Smart appliances via local area network";
homepage = "https://github.com/midea-lan/midea-local";
changelog = "https://github.com/midea-lan/midea-local/releases/tag/v${version}";
maintainers = with maintainers; [ k900 ];
license = licenses.mit;
};
}

View file

@ -10,7 +10,7 @@
buildPythonPackage rec {
pname = "model-checker";
version = "0.6.6";
version = "0.6.10";
pyproject = true;
disabled = pythonOlder "3.8";
@ -18,7 +18,7 @@ buildPythonPackage rec {
src = fetchPypi {
pname = "model_checker";
inherit version;
hash = "sha256-8DXy/7BHWYDBriE7YO4JNw5Wl/7sNYowAKOF6p14pIw=";
hash = "sha256-L0dtNsuU6JQl0PRHB7UayLCdPwxk70FZYNomMUy/wW4=";
};
# z3 does not provide a dist-info, so python-runtime-deps-check will fail

View file

@ -0,0 +1,58 @@
{
lib,
aiohttp,
aresponses,
buildPythonPackage,
fetchFromGitHub,
mashumaro,
orjson,
poetry-core,
pytest-asyncio,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
syrupy,
yarl,
}:
buildPythonPackage rec {
pname = "powerfox";
version = "1.1.0";
pyproject = true;
disabled = pythonOlder "3.11";
src = fetchFromGitHub {
owner = "klaasnicolaas";
repo = "python-powerfox";
tag = "v${version}";
hash = "sha256-stHZWGkISsemRUModIlE5CqYVVu3Mdt4ksW5tBewEDo=";
};
build-system = [ poetry-core ];
dependencies = [
aiohttp
mashumaro
orjson
yarl
];
nativeCheckInputs = [
aresponses
pytest-asyncio
pytest-cov-stub
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "powerfox" ];
meta = {
description = "Asynchronous Python client for the Powerfox devices";
homepage = "https://github.com/klaasnicolaas/python-powerfox";
changelog = "https://github.com/klaasnicolaas/python-powerfox/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}

View file

@ -30,7 +30,7 @@
let
pname = "pynitrokey";
version = "0.6.0";
version = "0.7.1";
mainProgram = "nitropy";
in
@ -40,7 +40,7 @@ buildPythonPackage {
src = fetchPypi {
inherit pname version;
hash = "sha256-pY6ATORZDPGRnkN6dse1s/DzQRpplDbPAGUHU4E7U9M=";
hash = "sha256-1hACUig5vH2Ra/ASYesHb8jRkcUpeXGe5O89/lTSrjk=";
};
nativeBuildInputs = [ installShellFiles ];

View file

@ -10,14 +10,14 @@
buildPythonPackage rec {
pname = "sqlmap";
version = "1.8.12";
version = "1.9";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-dlu4EuRSIksXaQ0iZ1MKrXraNytIHZ/1DM5f+8ijNMo=";
hash = "sha256-buuA+r1R42SMhrmszEGhFW9HPeaJVg1KihAlWT42JTs=";
};
postPatch = ''

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