staging-next 2026-01-12 (#479279)
This commit is contained in:
@@ -434,7 +434,7 @@ pkgs/by-name/fo/forgejo/ @adamcstephens @bendlas @emilylange
|
||||
|
||||
# Node.js
|
||||
/pkgs/build-support/node/build-npm-package @winterqt
|
||||
/pkgs/build-support/node/fetch-npm-deps @winterqt
|
||||
/pkgs/build-support/node/prefetch-npm-deps @winterqt
|
||||
/doc/languages-frameworks/javascript.section.md @winterqt
|
||||
/pkgs/development/tools/pnpm @Scrumplex @gepbird
|
||||
/pkgs/build-support/node/fetch-pnpm-deps @Scrumplex @gepbird
|
||||
|
||||
@@ -742,6 +742,18 @@ lib.mapAttrs mkLicense (
|
||||
fullName = "Historical Permission Notice and Disclaimer - sell xserver variant with MIT disclaimer";
|
||||
};
|
||||
|
||||
hpndSellVariantSafetyClause = {
|
||||
fullName = "HPND - sell variant with safety critical systems clause";
|
||||
url = "https://gitlab.freedesktop.org/xorg/driver/xf86-video-voodoo/-/blob/68a5b6d98ae34749cca889f4373b4043d00bfe6a/src/voodoo_dga.c#L12-33";
|
||||
# TODO: if the license gets accepted to spdx then
|
||||
# add spdxId
|
||||
# else
|
||||
# remove license
|
||||
# && replace reference with whatever this license is supposed to be then
|
||||
# https://github.com/spdx/license-list-XML/issues/2922
|
||||
# spdxId = "HPND-sell-variant-safety-clause";
|
||||
};
|
||||
|
||||
hpndDec = {
|
||||
fullName = "Historical Permission Notice and Disclaimer - DEC variant";
|
||||
spdxId = "HPND-DEC";
|
||||
|
||||
@@ -85,7 +85,6 @@ rec {
|
||||
BLK_DEV_DM m
|
||||
DM_CRYPT m
|
||||
MD y
|
||||
REISERFS_FS m
|
||||
BTRFS_FS m
|
||||
XFS_FS m
|
||||
JFS_FS m
|
||||
@@ -430,7 +429,6 @@ rec {
|
||||
BLK_DEV_DM m
|
||||
DM_CRYPT m
|
||||
MD y
|
||||
REISERFS_FS m
|
||||
EXT4_FS m
|
||||
USB_STORAGE_CYPRESS_ATACB m
|
||||
|
||||
@@ -475,7 +473,6 @@ rec {
|
||||
FRAMEBUFFER_CONSOLE y
|
||||
EXT2_FS y
|
||||
EXT3_FS y
|
||||
REISERFS_FS y
|
||||
MAGIC_SYSRQ y
|
||||
|
||||
# The kernel doesn't boot at all, with FTRACE
|
||||
|
||||
@@ -11,10 +11,53 @@ These are called "bootstrap files".
|
||||
|
||||
Bootstrap files should always be fetched from hydra and uploaded to `tarballs.nixos.org` to guarantee that all the binaries were built from the code committed into `nixpkgs` repository.
|
||||
|
||||
The uploads to `tarballs.nixos.org` are done by `@lovesegfault` today.
|
||||
The uploads to `tarballs.nixos.org` are done by `@NixOS/infra` team members who have S3 write access.
|
||||
|
||||
This document describes the procedure of updating bootstrap files in `nixpkgs`.
|
||||
|
||||
## How to upload bootstrap files (for infra team)
|
||||
|
||||
When a PR updates bootstrap files, the commit message contains the upload commands.
|
||||
Infra team members with S3 access can upload as follows:
|
||||
|
||||
1. Clone or navigate to the [nixos-infra](https://github.com/NixOS/nixos-infra) repository and enter the `terraform` directory:
|
||||
|
||||
```
|
||||
$ cd nixos-infra/terraform
|
||||
```
|
||||
|
||||
2. Authenticate with AWS SSO:
|
||||
|
||||
```
|
||||
$ aws sso login
|
||||
```
|
||||
|
||||
3. Realize the build output locally (fetch from hydra cache):
|
||||
|
||||
```
|
||||
$ nix-store --realize /nix/store/<hash>-stdenv-bootstrap-tools
|
||||
```
|
||||
|
||||
4. Upload to S3 with public-read ACL:
|
||||
|
||||
```
|
||||
$ aws s3 cp --recursive --acl public-read \
|
||||
/nix/store/<hash>-stdenv-bootstrap-tools/on-server/ \
|
||||
s3://nixpkgs-tarballs/stdenv/<target>/<nixpkgs-revision>/
|
||||
```
|
||||
|
||||
5. Verify the upload by downloading and checking hashes:
|
||||
|
||||
```
|
||||
$ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/<target>/<nixpkgs-revision>/ ./
|
||||
$ sha256sum bootstrap-tools.tar.xz busybox
|
||||
$ sha256sum /nix/store/<hash>-stdenv-bootstrap-tools/on-server/*
|
||||
```
|
||||
|
||||
Compare these hashes with those shown in the PR's commit message.
|
||||
|
||||
The exact paths and hashes are provided in each bootstrap update commit message generated by `refresh-tarballs.bash`.
|
||||
|
||||
## How to request the bootstrap seed update
|
||||
|
||||
To get the tarballs updated let's use an example `i686-unknown-linux-gnu` target:
|
||||
@@ -34,7 +77,7 @@ To get the tarballs updated let's use an example `i686-unknown-linux-gnu` target
|
||||
To validate cross-targets `binfmt` `NixOS` helper can be useful.
|
||||
For `riscv64-unknown-linux-gnu` the `/etc/nixos/configuration.nix` entry would be `boot.binfmt.emulatedSystems = [ "riscv64-linux" ]`.
|
||||
|
||||
3. Propose the commit as a PR to update bootstrap tarballs, tag people who can help you test the updated architecture and once reviewed tag `@lovesegfault` to upload the tarballs.
|
||||
3. Propose the commit as a PR to update bootstrap tarballs, tag people who can help you test the updated architecture and once reviewed tag `@NixOS/infra-build` to upload the tarballs.
|
||||
|
||||
## How to add bootstrap files for a new target
|
||||
|
||||
|
||||
@@ -120,3 +120,41 @@ of pulling the upstream container image from Docker Hub. If you want the old beh
|
||||
- `services.openssh` now supports generating host SSH keys by setting `services.openssh.generateHostKeys = true` while leaving `services.openssh.enable` disabled. This is particularly useful for systems that have no need of an SSH daemon but want SSH host keys for other purposes such as using agenix or sops-nix.
|
||||
|
||||
- `services.slurm` now supports slurmrestd usage through the `services.slurm.rest` NixOS options.
|
||||
|
||||
- `glibc` has been updated to version 2.42.
|
||||
|
||||
This version no longer makes the stack executable when a shared library requires this. A symptom
|
||||
is an error like
|
||||
|
||||
> cannot enable executable stack as shared object requires: Invalid argument
|
||||
|
||||
This is usually a bug. Please consider reporting it to the software maintainers.
|
||||
|
||||
In a lot of cases, the library requires the execstack by mistake only. The following workarounds exist:
|
||||
|
||||
* When building the shared library in question from source, use the following linker flags to force turning off the
|
||||
executable flag:
|
||||
|
||||
```nix
|
||||
mkDerivation {
|
||||
# …
|
||||
|
||||
env.NIX_LDFLAGS = "-z,noexecstack";
|
||||
}
|
||||
```
|
||||
|
||||
* If the sources are not available, the execstack-flag can be cleared with `patchelf`:
|
||||
|
||||
```
|
||||
patchelf --clear-execstack binary-only.so
|
||||
```
|
||||
|
||||
* If the shared library to be loaded actually requires an executable stack and it isn't turned
|
||||
on by the application loading it, you may force allowing that behavior by setting the
|
||||
following environment variable:
|
||||
|
||||
```
|
||||
GLIBC_TUNABLES=glibc.rtld.execstack=2
|
||||
```
|
||||
|
||||
**Do not set this globally!** This makes your setup inherently less secure.
|
||||
|
||||
@@ -1929,7 +1929,6 @@
|
||||
./tasks/filesystems/nfs.nix
|
||||
./tasks/filesystems/ntfs.nix
|
||||
./tasks/filesystems/overlayfs.nix
|
||||
./tasks/filesystems/reiserfs.nix
|
||||
./tasks/filesystems/squashfs.nix
|
||||
./tasks/filesystems/sshfs.nix
|
||||
./tasks/filesystems/unionfs-fuse.nix
|
||||
|
||||
@@ -78,6 +78,8 @@ in
|
||||
];
|
||||
systemd.services.polkit.stopIfChanged = false;
|
||||
|
||||
systemd.sockets."polkit-agent-helper".wantedBy = [ "sockets.target" ];
|
||||
|
||||
# The polkit daemon reads action/rule files
|
||||
environment.pathsToLink = [ "/share/polkit-1" ];
|
||||
|
||||
@@ -94,19 +96,11 @@ in
|
||||
|
||||
security.pam.services.polkit-1 = { };
|
||||
|
||||
security.wrappers = {
|
||||
pkexec = {
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${cfg.package.bin}/bin/pkexec";
|
||||
};
|
||||
polkit-agent-helper-1 = {
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${cfg.package.out}/lib/polkit-1/polkit-agent-helper-1";
|
||||
};
|
||||
security.wrappers.pkexec = {
|
||||
setuid = true;
|
||||
owner = "root";
|
||||
group = "root";
|
||||
source = "${cfg.package.bin}/bin/pkexec";
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
|
||||
@@ -390,6 +390,10 @@ in
|
||||
systemd.packages = [
|
||||
pkgs.gnome-session
|
||||
pkgs.gnome-shell
|
||||
]
|
||||
++ removeExcluded [
|
||||
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
|
||||
pkgs.xdg-user-dirs-gtk # Used to create the default bookmarks
|
||||
];
|
||||
|
||||
services.udev.packages = [
|
||||
|
||||
@@ -284,7 +284,6 @@ let
|
||||
++ lib.optionals (!config.boot.initrd.checkJournalingFS) [
|
||||
"ext3"
|
||||
"ext4"
|
||||
"reiserfs"
|
||||
"xfs"
|
||||
"jfs"
|
||||
"f2fs"
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
inInitrd = config.boot.initrd.supportedFilesystems.reiserfs or false;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (config.boot.supportedFilesystems.reiserfs or false) {
|
||||
|
||||
system.fsPackages = [ pkgs.reiserfsprogs ];
|
||||
|
||||
boot.initrd.kernelModules = mkIf inInitrd [ "reiserfs" ];
|
||||
|
||||
boot.initrd.extraUtilsCommands = mkIf (inInitrd && !config.boot.initrd.systemd.enable) ''
|
||||
copy_bin_and_libs ${pkgs.reiserfsprogs}/sbin/reiserfsck
|
||||
ln -s reiserfsck $out/bin/fsck.reiserfs
|
||||
'';
|
||||
|
||||
boot.initrd.systemd.initrdBin = mkIf inInitrd [ pkgs.reiserfsprogs ];
|
||||
|
||||
};
|
||||
}
|
||||
@@ -158,7 +158,8 @@ in
|
||||
}
|
||||
);
|
||||
|
||||
basicXbootldr = runTest (
|
||||
# TODO: Fix on aarch64-linux
|
||||
basicXbootldr = runTestOn [ "x86_64-linux" ] (
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "systemd-boot-xbootldr";
|
||||
@@ -282,7 +283,8 @@ in
|
||||
}
|
||||
);
|
||||
|
||||
update = runTest (
|
||||
# TODO: Fix on aarch64-linux
|
||||
update = runTestOn [ "x86_64-linux" ] (
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "systemd-boot-update";
|
||||
@@ -457,7 +459,8 @@ in
|
||||
}
|
||||
);
|
||||
|
||||
entryFilenameXbootldr = runTest (
|
||||
# TODO: Fix on aarch64-linux
|
||||
entryFilenameXbootldr = runTestOn [ "x86_64-linux" ] (
|
||||
{ lib, ... }:
|
||||
{
|
||||
name = "systemd-boot-entry-filename-xbootldr";
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
faust2jack,
|
||||
faust2lv2,
|
||||
helmholtz,
|
||||
mrpeach,
|
||||
puredata-with-plugins,
|
||||
jack-example-tools,
|
||||
}:
|
||||
@@ -22,7 +21,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
plugins = [
|
||||
helmholtz
|
||||
mrpeach
|
||||
];
|
||||
|
||||
pitchTracker = puredata-with-plugins plugins;
|
||||
|
||||
@@ -21,11 +21,11 @@ assert withConplay -> !libOnly;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "${lib.optionalString libOnly "lib"}mpg123";
|
||||
version = "1.33.3";
|
||||
version = "1.33.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mpg123/mpg123-${version}.tar.bz2";
|
||||
hash = "sha256-agxkct0VbiE8IGj0ARXru3OXjC2HPma64qJQ4tIZjSY=";
|
||||
hash = "sha256-OujJ/4Cpe/wOIuifvNdGh+yk/B2zFbEmB/J/ActaR9k=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -198,6 +198,8 @@ let
|
||||
inherit pname version;
|
||||
inherit plugins;
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
__structuredAttrs = true;
|
||||
dontUnpack = true;
|
||||
inherit
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ lib, fetchFromGitHub }:
|
||||
rec {
|
||||
version = "9.1.1918";
|
||||
version = "9.1.2035";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -11,7 +11,7 @@ rec {
|
||||
owner = "vim";
|
||||
repo = "vim";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-NU/A7yWcLaC+wqsfiHYVhnSZHGDao6+Oib/bSFNSVyQ=";
|
||||
hash = "sha256-x7WosfqYApaY2Vv1X9+2at/A/KqfacuPy53MGtnxk9w=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -85,13 +85,13 @@ in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "imagemagick";
|
||||
version = "7.1.2-11";
|
||||
version = "7.1.2-12";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ImageMagick";
|
||||
repo = "ImageMagick";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-RFiE23VW8AbVb7iglxjQMT6njDw+P7vLW6+nSKqN0p8=";
|
||||
hash = "sha256-0X8Zpr4frknRbWzAu1nprok2ceScTHV8d4+ktnBpQF0=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -135,12 +135,16 @@ stdenv.mkDerivation {
|
||||
]
|
||||
++ lib.optional emojiSupport "--enable-wide-glyphs";
|
||||
|
||||
LDFLAGS = [
|
||||
"-lfontconfig"
|
||||
"-lXrender"
|
||||
"-lpthread"
|
||||
];
|
||||
CFLAGS = [ "-I${freetype.dev}/include/freetype2" ];
|
||||
env = {
|
||||
LDFLAGS = toString [
|
||||
"-lfontconfig"
|
||||
"-lXrender"
|
||||
"-lpthread"
|
||||
];
|
||||
CFLAGS = toString [
|
||||
"-I${freetype.dev}/include/freetype2"
|
||||
];
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
# without this the terminfo won't be compiled by tic, see man tic
|
||||
|
||||
@@ -202,13 +202,32 @@ if [[ "$NIX_DONT_SET_RPATH_@suffixSalt@" != 1 && "$linkType" != static-pie ]]; t
|
||||
# the link time chosen objects will be those of runtime linking.
|
||||
declare -A rpaths
|
||||
for dir in ${libDirs+"${libDirs[@]}"}; do
|
||||
if [[ "$dir" =~ [/.][/.] ]] && dir2=$(readlink -f "$dir"); then
|
||||
# If the path is in the store, do not resolve any symlinks and add it to the rpath.
|
||||
# Resolving symlinks in the store breaks bootstrapping, see issue #454199.
|
||||
# If it is outside the store, resolve symlinks step by step until it falls
|
||||
# into the store or it becomes not a symlink.
|
||||
# Always canonicalize the path before checking it is in the store or not.
|
||||
if dir2=$(realpath -s "$dir"); then
|
||||
dir="$dir2"
|
||||
else
|
||||
continue
|
||||
fi
|
||||
while [ -z "${rpaths[$dir]:-}" ] && [[ "$dir" != "${NIX_STORE:-}"/* ]] && [ -L "$dir" ]; do
|
||||
if dir2=$(readlink "$dir"); then
|
||||
dir="dir2"
|
||||
else
|
||||
break
|
||||
fi
|
||||
if dir2=$(realpath -s "$dir"); then
|
||||
dir="dir2"
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
# If the path turns out to be outside the store, we do not add it to rpath.
|
||||
# This typically happens for libraries in /tmp that are later
|
||||
# copied to $out/lib. If not, we're screwed.
|
||||
if [ -n "${rpaths[$dir]:-}" ] || [[ "$dir" != "${NIX_STORE:-}"/* ]]; then
|
||||
# If the path is not in the store, don't add it to the rpath.
|
||||
# This typically happens for libraries in /tmp that are later
|
||||
# copied to $out/lib. If not, we're screwed.
|
||||
continue
|
||||
fi
|
||||
for path in "$dir"/*; do
|
||||
|
||||
+679
-273
File diff suppressed because it is too large
Load Diff
+7
-2
@@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "prefetch-npm-deps"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
@@ -11,7 +11,7 @@ backoff = "0.4.0"
|
||||
data-encoding = "2.5.0"
|
||||
digest = "0.10.7"
|
||||
env_logger = "0.11.3"
|
||||
isahc = { version = "1.7.2", default_features = false }
|
||||
isahc = { version = "1.7.2", default-features = false }
|
||||
log = "0.4.21"
|
||||
nix-nar = "0.3.0"
|
||||
rayon = "1.10.0"
|
||||
@@ -22,3 +22,8 @@ sha2 = "0.10.8"
|
||||
tempfile = "3.10.1"
|
||||
url = { version = "2.5.0", features = ["serde"] }
|
||||
walkdir = "2.5.0"
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
opt-level = 3
|
||||
+57
-59
@@ -38,7 +38,7 @@ fn cache_map_path() -> Option<PathBuf> {
|
||||
/// `dependencies` key in v2 lockfiles designed for backwards compatibility with v1 parsers is removed because of inconsistent data.
|
||||
fn fixup_lockfile(
|
||||
mut lock: Map<String, Value>,
|
||||
cache: &Option<HashMap<String, String>>,
|
||||
cache: Option<&HashMap<String, String>>,
|
||||
) -> anyhow::Result<Option<Map<String, Value>>> {
|
||||
let mut fixed = false;
|
||||
|
||||
@@ -64,29 +64,29 @@ fn fixup_lockfile(
|
||||
.ok_or_else(|| anyhow!("packages isn't a map"))?
|
||||
.values_mut()
|
||||
{
|
||||
if let Some(Value::String(resolved)) = package.get("resolved") {
|
||||
if let Some(Value::String(integrity)) = package.get("integrity") {
|
||||
if resolved.starts_with("git+") {
|
||||
if let Some(Value::String(resolved)) = package.get("resolved")
|
||||
&& let Some(Value::String(integrity)) = package.get("integrity")
|
||||
{
|
||||
if resolved.starts_with("git+") {
|
||||
fixed = true;
|
||||
|
||||
package
|
||||
.as_object_mut()
|
||||
.ok_or_else(|| anyhow!("package isn't a map"))?
|
||||
.remove("integrity");
|
||||
} else if let Some(cache_hashes) = cache {
|
||||
let cache_hash = cache_hashes
|
||||
.get(resolved)
|
||||
.expect("dependency should have a hash");
|
||||
|
||||
if integrity != cache_hash {
|
||||
fixed = true;
|
||||
|
||||
package
|
||||
*package
|
||||
.as_object_mut()
|
||||
.ok_or_else(|| anyhow!("package isn't a map"))?
|
||||
.remove("integrity");
|
||||
} else if let Some(cache_hashes) = cache {
|
||||
let cache_hash = cache_hashes
|
||||
.get(resolved)
|
||||
.expect("dependency should have a hash");
|
||||
|
||||
if integrity != cache_hash {
|
||||
fixed = true;
|
||||
|
||||
*package
|
||||
.as_object_mut()
|
||||
.ok_or_else(|| anyhow!("package isn't a map"))?
|
||||
.get_mut("integrity")
|
||||
.unwrap() = Value::String(cache_hash.clone());
|
||||
}
|
||||
.get_mut("integrity")
|
||||
.unwrap() = Value::String(cache_hash.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,17 +99,13 @@ fn fixup_lockfile(
|
||||
v => bail!("unsupported lockfile version {v}"),
|
||||
}
|
||||
|
||||
if fixed {
|
||||
Ok(Some(lock))
|
||||
} else {
|
||||
Ok(None)
|
||||
}
|
||||
if fixed { Ok(Some(lock)) } else { Ok(None) }
|
||||
}
|
||||
|
||||
// Recursive helper to fixup v1 lockfile deps
|
||||
fn fixup_v1_deps(
|
||||
dependencies: &mut Map<String, Value>,
|
||||
cache: &Option<HashMap<String, String>>,
|
||||
cache: Option<&HashMap<String, String>>,
|
||||
fixed: &mut bool,
|
||||
) {
|
||||
for dep in dependencies.values_mut() {
|
||||
@@ -117,31 +113,29 @@ fn fixup_v1_deps(
|
||||
.as_object()
|
||||
.expect("v1 dep must be object")
|
||||
.get("resolved")
|
||||
{
|
||||
if let Some(Value::String(integrity)) = dep
|
||||
&& let Some(Value::String(integrity)) = dep
|
||||
.as_object()
|
||||
.expect("v1 dep must be object")
|
||||
.get("integrity")
|
||||
{
|
||||
if resolved.starts_with("git+ssh://") {
|
||||
{
|
||||
if resolved.starts_with("git+ssh://") {
|
||||
*fixed = true;
|
||||
|
||||
dep.as_object_mut()
|
||||
.expect("v1 dep must be object")
|
||||
.remove("integrity");
|
||||
} else if let Some(cache_hashes) = cache {
|
||||
let cache_hash = cache_hashes
|
||||
.get(resolved)
|
||||
.expect("dependency should have a hash");
|
||||
|
||||
if integrity != cache_hash {
|
||||
*fixed = true;
|
||||
|
||||
dep.as_object_mut()
|
||||
*dep.as_object_mut()
|
||||
.expect("v1 dep must be object")
|
||||
.remove("integrity");
|
||||
} else if let Some(cache_hashes) = cache {
|
||||
let cache_hash = cache_hashes
|
||||
.get(resolved)
|
||||
.expect("dependency should have a hash");
|
||||
|
||||
if integrity != cache_hash {
|
||||
*fixed = true;
|
||||
|
||||
*dep.as_object_mut()
|
||||
.expect("v1 dep must be object")
|
||||
.get_mut("integrity")
|
||||
.unwrap() = Value::String(cache_hash.clone());
|
||||
}
|
||||
.get_mut("integrity")
|
||||
.unwrap() = Value::String(cache_hash.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,26 +179,30 @@ fn main() -> anyhow::Result<()> {
|
||||
process::exit(1);
|
||||
}
|
||||
|
||||
if let Ok(jobs) = env::var("NIX_BUILD_CORES") {
|
||||
if !jobs.is_empty() {
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.num_threads(
|
||||
jobs.parse()
|
||||
.expect("NIX_BUILD_CORES must be a whole number"),
|
||||
)
|
||||
.build_global()
|
||||
.unwrap();
|
||||
}
|
||||
if let Ok(jobs) = env::var("NIX_BUILD_CORES")
|
||||
&& !jobs.is_empty()
|
||||
{
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.num_threads(
|
||||
jobs.parse()
|
||||
.expect("NIX_BUILD_CORES must be a whole number"),
|
||||
)
|
||||
.build_global()
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
if args[1] == "--fixup-lockfile" {
|
||||
let lock = serde_json::from_str(&fs::read_to_string(&args[2])?)?;
|
||||
|
||||
let cache = cache_map_path()
|
||||
.map(|map_path| Ok::<_, anyhow::Error>(serde_json::from_slice(&fs::read(map_path)?)?))
|
||||
.map(|map_path| {
|
||||
Ok::<_, anyhow::Error>(serde_json::from_slice::<HashMap<String, String>>(
|
||||
&fs::read(map_path)?,
|
||||
)?)
|
||||
})
|
||||
.transpose()?;
|
||||
|
||||
if let Some(fixed) = fixup_lockfile(lock, &cache)? {
|
||||
if let Some(fixed) = fixup_lockfile(lock, cache.as_ref())? {
|
||||
println!("Fixing lockfile");
|
||||
|
||||
fs::write(&args[2], serde_json::to_string(&fixed)?)?;
|
||||
@@ -345,7 +343,7 @@ mod tests {
|
||||
hashes.insert(String::from("foo"), String::from("sha512-foo"));
|
||||
|
||||
assert_eq!(
|
||||
fixup_lockfile(input.as_object().unwrap().clone(), &Some(hashes))?,
|
||||
fixup_lockfile(input.as_object().unwrap().clone(), Some(hashes).as_ref())?,
|
||||
Some(expected.as_object().unwrap().clone())
|
||||
);
|
||||
|
||||
@@ -418,7 +416,7 @@ mod tests {
|
||||
hashes.insert(String::from("foo"), String::from("sha512-foo"));
|
||||
|
||||
assert_eq!(
|
||||
fixup_lockfile(input.as_object().unwrap().clone(), &Some(hashes))?,
|
||||
fixup_lockfile(input.as_object().unwrap().clone(), Some(hashes).as_ref())?,
|
||||
Some(expected.as_object().unwrap().clone())
|
||||
);
|
||||
|
||||
+7
-7
@@ -1,8 +1,8 @@
|
||||
use anyhow::{anyhow, bail, Context};
|
||||
use anyhow::{Context, anyhow, bail};
|
||||
use rayon::slice::ParallelSliceMut;
|
||||
use serde::{
|
||||
de::{self, Visitor},
|
||||
Deserialize, Deserializer,
|
||||
de::{self, Visitor},
|
||||
};
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
@@ -132,7 +132,7 @@ impl<'de> Deserialize<'de> for HashCollection {
|
||||
|
||||
struct HashCollectionVisitor;
|
||||
|
||||
impl<'de> Visitor<'de> for HashCollectionVisitor {
|
||||
impl Visitor<'_> for HashCollectionVisitor {
|
||||
type Value = HashCollection;
|
||||
|
||||
fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
|
||||
@@ -161,7 +161,7 @@ impl Hash {
|
||||
.ok_or_else(|| anyhow!("expected SRI hash, got {:?}", s.as_ref()))?
|
||||
.0;
|
||||
|
||||
if ALGOS.iter().any(|&a| algo == a) {
|
||||
if ALGOS.contains(&algo) {
|
||||
Ok(Hash(s.as_ref().to_string()))
|
||||
} else {
|
||||
Err(anyhow!("unknown hash algorithm {algo:?}"))
|
||||
@@ -215,7 +215,7 @@ fn to_new_packages(
|
||||
|
||||
if let UrlOrString::Url(v) = &package.version {
|
||||
if v.scheme() == "npm" {
|
||||
if let Some(UrlOrString::Url(ref url)) = &package.resolved {
|
||||
if let Some(UrlOrString::Url(url)) = &package.resolved {
|
||||
package.version = UrlOrString::Url(url.clone());
|
||||
}
|
||||
} else {
|
||||
@@ -272,8 +272,8 @@ fn get_initial_url() -> anyhow::Result<Url> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{
|
||||
get_initial_url, packages, to_new_packages, Hash, HashCollection, OldPackage, Package,
|
||||
UrlOrString,
|
||||
Hash, HashCollection, OldPackage, Package, UrlOrString, get_initial_url, packages,
|
||||
to_new_packages,
|
||||
};
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
+22
-9
@@ -1,4 +1,4 @@
|
||||
use anyhow::{anyhow, bail, Context};
|
||||
use anyhow::{Context, anyhow, bail};
|
||||
use lock::UrlOrString;
|
||||
use log::{debug, info};
|
||||
use rayon::prelude::*;
|
||||
@@ -8,7 +8,7 @@ use std::{
|
||||
io::Write,
|
||||
process::{Command, Stdio},
|
||||
};
|
||||
use tempfile::{tempdir, TempDir};
|
||||
use tempfile::{TempDir, tempdir};
|
||||
use url::Url;
|
||||
|
||||
use crate::util;
|
||||
@@ -33,7 +33,9 @@ pub fn lockfile(
|
||||
.collect::<anyhow::Result<Vec<_>>>()?;
|
||||
|
||||
if packages.is_empty() && !force_empty_cache {
|
||||
bail!("No cacheable dependencies were found. Please inspect the upstream `package-lock.json` file and ensure that remote dependencies have `resolved` URLs and `integrity` hashes. If the lockfile is missing this data, attempt to get upstream to fix it via a tool like <https://github.com/jeslie0/npm-lockfile-fix>. If generating an empty cache is intentional and you would like to do it anyways, set `forceEmptyCache = true`.");
|
||||
bail!(
|
||||
"No cacheable dependencies were found. Please inspect the upstream `package-lock.json` file and ensure that remote dependencies have `resolved` URLs and `integrity` hashes. If the lockfile is missing this data, attempt to get upstream to fix it via a tool like <https://github.com/jeslie0/npm-lockfile-fix>. If generating an empty cache is intentional and you would like to do it anyways, set `forceEmptyCache = true`."
|
||||
);
|
||||
}
|
||||
|
||||
let mut new = Vec::new();
|
||||
@@ -49,7 +51,11 @@ pub fn lockfile(
|
||||
|
||||
let path = dir.path().join("package");
|
||||
|
||||
info!("recursively parsing lockfile for {} at {path:?}", pkg.name);
|
||||
info!(
|
||||
"recursively parsing lockfile for {} at {}",
|
||||
pkg.name,
|
||||
path.display()
|
||||
);
|
||||
|
||||
let lockfile_contents = fs::read_to_string(path.join("package-lock.json"));
|
||||
|
||||
@@ -71,7 +77,10 @@ pub fn lockfile(
|
||||
"prepare",
|
||||
] {
|
||||
if scripts.contains_key(typ) && lockfile_contents.is_err() && !force_git_deps {
|
||||
bail!("Git dependency {} contains install scripts, but has no lockfile, which is something that will probably break. Open an issue if you can't feasibly patch this dependency out, and we'll come up with a workaround.\nIf you'd like to attempt to try to use this dependency anyways, set `forceGitDeps = true`.", pkg.name);
|
||||
bail!(
|
||||
"Git dependency {} contains install scripts, but has no lockfile, which is something that will probably break. Open an issue if you can't feasibly patch this dependency out, and we'll come up with a workaround.\nIf you'd like to attempt to try to use this dependency anyways, set `forceGitDeps = true`.",
|
||||
pkg.name
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -310,7 +319,9 @@ fn get_hosted_git_url(url: &Url) -> anyhow::Result<Option<Url>> {
|
||||
|
||||
match get_url() {
|
||||
Some(u) => Ok(Some(u)),
|
||||
None => Err(anyhow!("This lockfile either contains a Git dependency with an unsupported host, or a malformed URL in the lockfile: {url}"))
|
||||
None => Err(anyhow!(
|
||||
"This lockfile either contains a Git dependency with an unsupported host, or a malformed URL in the lockfile: {url}"
|
||||
)),
|
||||
}
|
||||
} else {
|
||||
Ok(None)
|
||||
@@ -327,15 +338,17 @@ mod tests {
|
||||
for (input, expected) in [
|
||||
(
|
||||
"git+ssh://git@github.com/castlabs/electron-releases.git#fc5f78d046e8d7cdeb66345a2633c383ab41f525",
|
||||
Some("https://codeload.github.com/castlabs/electron-releases/tar.gz/fc5f78d046e8d7cdeb66345a2633c383ab41f525"),
|
||||
Some(
|
||||
"https://codeload.github.com/castlabs/electron-releases/tar.gz/fc5f78d046e8d7cdeb66345a2633c383ab41f525",
|
||||
),
|
||||
),
|
||||
(
|
||||
"git+ssh://bitbucket.org/foo/bar#branch",
|
||||
Some("https://bitbucket.org/foo/bar/get/branch.tar.gz")
|
||||
Some("https://bitbucket.org/foo/bar/get/branch.tar.gz"),
|
||||
),
|
||||
(
|
||||
"git+ssh://git.sr.ht/~foo/bar#branch",
|
||||
Some("https://git.sr.ht/~foo/bar/archive/branch.tar.gz")
|
||||
Some("https://git.sr.ht/~foo/bar/archive/branch.tar.gz"),
|
||||
),
|
||||
] {
|
||||
assert_eq!(
|
||||
+21
-22
@@ -1,10 +1,10 @@
|
||||
use anyhow::bail;
|
||||
use backoff::{retry, ExponentialBackoff};
|
||||
use backoff::{ExponentialBackoff, retry};
|
||||
use data_encoding::BASE64;
|
||||
use digest::Digest;
|
||||
use isahc::{
|
||||
config::{CaCertificate, Configurable, RedirectPolicy, SslOption},
|
||||
Body, Request, RequestExt,
|
||||
config::{CaCertificate, Configurable, RedirectPolicy, SslOption},
|
||||
};
|
||||
use log::info;
|
||||
use nix_nar::{Encoder, NarError};
|
||||
@@ -22,18 +22,19 @@ pub fn get_url(url: &Url) -> Result<Body, anyhow::Error> {
|
||||
let mut url = url.clone();
|
||||
// Respect NIX_NPM_REGISTRY_OVERRIDES environment variable, which should be a JSON mapping in the shape of:
|
||||
// `{ "registry.example.com": "my-registry.local", ... }`
|
||||
if let Some(host) = url.host_str() {
|
||||
if let Ok(npm_mirrors) = env::var("NIX_NPM_REGISTRY_OVERRIDES") {
|
||||
if let Ok(mirrors) = serde_json::from_str::<Map<String, Value>>(&npm_mirrors) {
|
||||
if let Some(mirror) = mirrors.get(host).and_then(serde_json::Value::as_str) {
|
||||
let mirror_url = Url::parse(mirror)?;
|
||||
url.set_path(&(mirror_url.path().to_owned() + url.path()));
|
||||
url.set_host(Some(mirror_url.host_str().expect(format!("Mirror URL without host part: {mirror_url}").as_str())))?;
|
||||
eprintln!("Replaced URL {url_} with {url}");
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(host) = url.host_str()
|
||||
&& let Ok(npm_mirrors) = env::var("NIX_NPM_REGISTRY_OVERRIDES")
|
||||
&& let Ok(mirrors) = serde_json::from_str::<Map<String, Value>>(&npm_mirrors)
|
||||
&& let Some(mirror) = mirrors.get(host).and_then(serde_json::Value::as_str)
|
||||
{
|
||||
let mirror_url = Url::parse(mirror)?;
|
||||
url.set_path(&(mirror_url.path().to_owned() + url.path()));
|
||||
url.set_host(Some(mirror_url.host_str().unwrap_or_else(|| {
|
||||
panic!("Mirror URL without host part: {mirror_url}")
|
||||
})))?;
|
||||
eprintln!("Replaced URL {url_} with {url}");
|
||||
}
|
||||
|
||||
let mut request = Request::get(url.as_str()).redirect_policy(RedirectPolicy::Limit(10));
|
||||
|
||||
// Respect SSL_CERT_FILE if environment variable exists
|
||||
@@ -51,15 +52,13 @@ pub fn get_url(url: &Url) -> Result<Body, anyhow::Error> {
|
||||
|
||||
// Respect NIX_NPM_TOKENS environment variable, which should be a JSON mapping in the shape of:
|
||||
// `{ "registry.example.com": "example-registry-bearer-token", ... }`
|
||||
if let Some(host) = url.host_str() {
|
||||
if let Ok(npm_tokens) = env::var("NIX_NPM_TOKENS") {
|
||||
if let Ok(tokens) = serde_json::from_str::<Map<String, Value>>(&npm_tokens) {
|
||||
if let Some(token) = tokens.get(host).and_then(serde_json::Value::as_str) {
|
||||
info!("Found NPM token for {}. Adding authorization header to request.", host);
|
||||
request = request.header("Authorization", format!("Bearer {token}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if let Some(host) = url.host_str()
|
||||
&& let Ok(npm_tokens) = env::var("NIX_NPM_TOKENS")
|
||||
&& let Ok(tokens) = serde_json::from_str::<Map<String, Value>>(&npm_tokens)
|
||||
&& let Some(token) = tokens.get(host).and_then(serde_json::Value::as_str)
|
||||
{
|
||||
info!("Found NPM token for {host}. Adding authorization header to request.");
|
||||
request = request.header("Authorization", format!("Bearer {token}"));
|
||||
}
|
||||
|
||||
let res = request.body(())?.send()?;
|
||||
@@ -54,6 +54,19 @@ let
|
||||
|
||||
dontInstall = false;
|
||||
installPhase = "cp -pr --reflink=auto -- . $out";
|
||||
|
||||
# the original derivation might've set something like outputDev = "lib", but "lib" isn't an output anymore
|
||||
# some things get confused and error if one of these is set to an output that doesn't exist
|
||||
# ex: pkgs/build-support/setup-hooks/multiple-outputs.sh
|
||||
outputDev = "out";
|
||||
outputBin = "out";
|
||||
outputInclude = "out";
|
||||
outputLib = "out";
|
||||
outputDoc = "out";
|
||||
outputDevdoc = "out";
|
||||
outputMan = "out";
|
||||
outputDevman = "out";
|
||||
outputInfo = "out";
|
||||
};
|
||||
in
|
||||
|
||||
|
||||
@@ -33,11 +33,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# The fuloong2f is not supported by aalib still
|
||||
preConfigure = ''
|
||||
configureFlagsArray+=(
|
||||
"--bindir=$bin/bin"
|
||||
"--includedir=$dev/include"
|
||||
# The configure script does the correct thing when 'system' is already set
|
||||
# Export it explicitly in case __structuredAttrs is true.
|
||||
export system
|
||||
appendToVar configureFlags \
|
||||
"--bindir=$bin/bin" \
|
||||
"--includedir=$dev/include" \
|
||||
"--libdir=$out/lib"
|
||||
)
|
||||
'';
|
||||
|
||||
buildInputs = [ ncurses ];
|
||||
@@ -54,7 +56,7 @@ stdenv.mkDerivation rec {
|
||||
postInstall = ''
|
||||
mkdir -p $dev/bin
|
||||
mv $bin/bin/aalib-config $dev/bin/aalib-config
|
||||
substituteInPlace $out/lib/libaa.la --replace "${ncurses.dev}/lib" "${ncurses.out}/lib"
|
||||
substituteInPlace $out/lib/libaa.la --replace-fail "${ncurses.dev}/lib" "${ncurses.out}/lib"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -19,6 +19,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-SCQDORhmJmTb0CYm15zjEa7dkwc+lpW2s1d4DsMRovI=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "ABSL_BUILD_TEST_HELPERS" true)
|
||||
(lib.cmakeBool "ABSL_USE_EXTERNAL_GOOGLETEST" true)
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "alsa-lib";
|
||||
version = "1.2.14";
|
||||
version = "1.2.15.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://alsa/lib/alsa-lib-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-vpyIoLNgQ2fddBZ6K3VKNeFC9nApKuR6L97yei7pejI=";
|
||||
hash = "sha256-f5g8qJykIIcsoW6Kn4+X+2PbbBxuJYW5Fzegi7A/Vmw=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "alsa-ucm-conf";
|
||||
version = "1.2.14";
|
||||
version = "1.2.15.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://alsa/lib/alsa-ucm-conf-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-MumAn1ktkrl4qhAy41KTwzuNDx7Edfk3Aiw+6aMGnCE=";
|
||||
hash = "sha256-JGxdWdIXtvf0ehH9EPG3ZtJavLDZyZavMHm7nJrFobA=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "amf-headers";
|
||||
version = "1.4.36";
|
||||
version = "1.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GPUOpen-LibrariesAndSDKs";
|
||||
repo = "AMF";
|
||||
tag = "v${version}";
|
||||
sha256 = "sha256-0PgWEq+329/EhI0/CgPsCkJ4CiTsFe56w2O+AcjVUdc=";
|
||||
sha256 = "sha256-ZVC1e4S5CNpfl3ewHR9aVfYwxDBE7/BJ6OyH2kF00fQ=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
||||
@@ -48,6 +48,12 @@ clangStdenv.mkDerivation (finalAttrs: {
|
||||
url = "https://gitlab.com/ananicy-cpp/ananicy-cpp/-/commit/b2589a9b1faa2ecf54aeede40ea781c33bfb09a8.patch";
|
||||
hash = "sha256-nfyCdhvnWj446z5aPFCXGi79Xgja8W0Eopl6I30fOBM=";
|
||||
})
|
||||
|
||||
# fix build w/ glibc-2.42 (don't conflict with sched_* API from glibc 2.41)
|
||||
(fetchpatch {
|
||||
url = "https://gitlab.com/ananicy-cpp/ananicy-cpp/-/commit/99e64815bacaf3baa28ad89d022e33ebede94fa9.patch";
|
||||
hash = "sha256-V9yf0nUa91DXRufDYhufybQUTP6R1CUzF51SEBMdjmA=";
|
||||
})
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
@@ -16,7 +16,6 @@ let
|
||||
STRIP_PNG_TEXT = "NO";
|
||||
};
|
||||
Description = if stdenvNoCC.hostPlatform.isMacOS then "macOS" else "iOS";
|
||||
FamilyDisplayName = Description;
|
||||
FamilyIdentifier = lib.toLower xcodePlatform;
|
||||
FamilyName = Description;
|
||||
Identifier = CFBundleIdentifier;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
pkg-config,
|
||||
gobject-introspection,
|
||||
buildPackages,
|
||||
withDconf ? !stdenv.hostPlatform.isDarwin && lib.meta.availableOn stdenv.hostPlatform dconf,
|
||||
withIntrospection ?
|
||||
lib.meta.availableOn stdenv.hostPlatform gobject-introspection
|
||||
&& stdenv.hostPlatform.emulatorAvailable buildPackages,
|
||||
@@ -90,6 +91,13 @@ stdenv.mkDerivation rec {
|
||||
]
|
||||
++ lib.optionals (!systemdSupport) [
|
||||
"-Duse_systemd=false"
|
||||
]
|
||||
++ lib.optionals (!withIntrospection) [
|
||||
(lib.mesonEnable "introspection" false)
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isStatic [
|
||||
# The adaptor is only available as a shared object, as gtk2 loads it dynamically
|
||||
(lib.mesonBool "gtk2_atk_adaptor" false)
|
||||
];
|
||||
|
||||
passthru = {
|
||||
@@ -102,7 +110,7 @@ stdenv.mkDerivation rec {
|
||||
postFixup = ''
|
||||
# Cannot use wrapGAppsHook'due to a dependency cycle
|
||||
wrapProgram $out/libexec/at-spi-bus-launcher \
|
||||
--prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules" \
|
||||
${lib.optionalString withDconf ''--prefix GIO_EXTRA_MODULES : "${lib.getLib dconf}/lib/gio/modules"''} \
|
||||
--prefix XDG_DATA_DIRS : ${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}
|
||||
'';
|
||||
|
||||
|
||||
@@ -204,6 +204,36 @@ def find_dependency(soname: str, soarch: str, soabi: str) -> Optional[Path]:
|
||||
return None
|
||||
|
||||
|
||||
def find_first_matching_rpath_with_origin(binary: Path, lib_dir: Path, rpaths: list[str]) -> Optional[Path]:
|
||||
"""
|
||||
If lib_dir equals one of the existing $ORIGIN-based RPATH entries
|
||||
(after resolving $ORIGIN relative to this binary), return that $ORIGIN
|
||||
entry to preserve it; otherwise return None.
|
||||
|
||||
Note: we return a Path constructed from the RPATH string (which may
|
||||
contain $ORIGIN). This is intentional so that the caller can treat it
|
||||
uniformly with other Path entries when building the final RPATH string
|
||||
(via Path.as_posix). We do not expect this Path to exist on the
|
||||
filesystem; it functions as a display value.
|
||||
"""
|
||||
try:
|
||||
# resolve(strict=False) does not require the path to exist, but may still
|
||||
# raise RuntimeError (cycles) or OSError in odd environments. Guard those.
|
||||
lib_dir_realpath = lib_dir.resolve()
|
||||
except (OSError, RuntimeError):
|
||||
return None
|
||||
for rpath in rpaths:
|
||||
if "$ORIGIN" not in rpath:
|
||||
continue
|
||||
try:
|
||||
candidate_rpath_realpath = (binary.parent / rpath.replace("$ORIGIN", ".")).resolve()
|
||||
except (OSError, RuntimeError):
|
||||
continue
|
||||
if candidate_rpath_realpath == lib_dir_realpath:
|
||||
return Path(rpath)
|
||||
return None
|
||||
|
||||
|
||||
@dataclass
|
||||
class Dependency:
|
||||
file: Path # The file that contains the dependency
|
||||
@@ -211,7 +241,7 @@ class Dependency:
|
||||
found: bool = False # Whether it was found somewhere
|
||||
|
||||
|
||||
def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list[Path] = [], keep_libc: bool = False, extra_args: list[str] = []) -> list[Dependency]:
|
||||
def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list[Path] = [], keep_libc: bool = False, preserve_origin: bool = False, extra_args: list[str] = []) -> list[Dependency]:
|
||||
try:
|
||||
with open_elf(path) as elf:
|
||||
|
||||
@@ -242,6 +272,7 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
file_is_dynamic_executable = is_dynamic_executable(elf)
|
||||
|
||||
file_dependencies = get_dependencies(elf) + get_dlopen_dependencies(elf)
|
||||
existing_rpaths = get_rpath(elf)
|
||||
|
||||
except ELFError:
|
||||
return []
|
||||
@@ -279,7 +310,10 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
# and resolved automatically by the dynamic linker, unless
|
||||
# keep_libc is enabled.
|
||||
# 3. If a candidate is found in our library dependencies, that
|
||||
# dependency should be added to rpath.
|
||||
# dependency should be added to rpath. If --preserve-origin
|
||||
# is set and this file's existing RUNPATH/RPATH contains a $ORIGIN
|
||||
# entry that resolves to the same directory, we add that $ORIGIN
|
||||
# entry instead of an absolute path.
|
||||
# 4. If all of the above fail, libc dependencies should still be
|
||||
# considered found. This is in contrast to step 2, because
|
||||
# enabling keep_libc should allow libc to be found in step 3
|
||||
@@ -299,7 +333,8 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
was_found = True
|
||||
break
|
||||
elif found_dependency := find_dependency(candidate.name, file_arch, file_osabi):
|
||||
rpath.append(found_dependency)
|
||||
origin_rpath_entry = find_first_matching_rpath_with_origin(path, found_dependency, existing_rpaths) if preserve_origin else None
|
||||
rpath.append(origin_rpath_entry or found_dependency)
|
||||
dependencies.append(Dependency(path, candidate, found=True))
|
||||
print(f" {candidate} -> found: {found_dependency}")
|
||||
was_found = True
|
||||
@@ -315,6 +350,12 @@ def auto_patchelf_file(path: Path, runtime_deps: list[Path], append_rpaths: list
|
||||
|
||||
rpath.extend(append_rpaths)
|
||||
|
||||
# Keep any existing $ORIGIN entries that didn't match a discovered dependency (i.e. dlopen-only lookups)
|
||||
if preserve_origin:
|
||||
for existing_rpath in existing_rpaths:
|
||||
if "$ORIGIN" in existing_rpath:
|
||||
rpath.append(Path(existing_rpath))
|
||||
|
||||
# Dedup the rpath
|
||||
rpath_str = ":".join(dict.fromkeys(map(Path.as_posix, rpath)))
|
||||
|
||||
@@ -335,6 +376,7 @@ def auto_patchelf(
|
||||
ignore_missing: list[str] = [],
|
||||
append_rpaths: list[Path] = [],
|
||||
keep_libc: bool = False,
|
||||
preserve_origin: bool = False,
|
||||
add_existing: bool = True,
|
||||
extra_args: list[str] = []) -> None:
|
||||
|
||||
@@ -351,7 +393,7 @@ def auto_patchelf(
|
||||
dependencies = []
|
||||
for path in chain.from_iterable(glob(p, '*', recursive) for p in paths_to_patch):
|
||||
if not path.is_symlink() and path.is_file():
|
||||
dependencies += auto_patchelf_file(path, runtime_deps, append_rpaths, keep_libc, extra_args)
|
||||
dependencies += auto_patchelf_file(path, runtime_deps, append_rpaths, keep_libc, preserve_origin, extra_args)
|
||||
|
||||
missing = [dep for dep in dependencies if not dep.found]
|
||||
|
||||
@@ -431,6 +473,12 @@ def main() -> None:
|
||||
action="store_true",
|
||||
help="Attempt to search for and relink libc dependencies.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--preserve-origin",
|
||||
dest="preserve_origin",
|
||||
action="store_true",
|
||||
help="When possible, replace absolute RPATH entries with original $ORIGIN entries that resolve to the same directory.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--ignore-existing",
|
||||
dest="add_existing",
|
||||
@@ -460,6 +508,7 @@ def main() -> None:
|
||||
args.ignore_missing,
|
||||
append_rpaths=args.append_rpaths,
|
||||
keep_libc=args.keep_libc,
|
||||
preserve_origin=args.preserve_origin,
|
||||
add_existing=args.add_existing,
|
||||
extra_args=args.extra_args)
|
||||
|
||||
|
||||
-5309
File diff suppressed because it is too large
Load Diff
@@ -1,43 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "autobase";
|
||||
version = "7.20.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "holepunchto";
|
||||
repo = "autobase";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-SEeCbNja5BIgpQh0q0LKo452JClKQe6do5YHwRRBMcs=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-H9Xy1VD7WQvi0+86v6CMcmc0L3mB6KuSCtgQSF4AlkY=";
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
# ERROR: Missing package-lock.json from src
|
||||
# https://github.com/holepunchto/autobase/issues/315
|
||||
# Copy vendored package-lock.json to src via postPatch
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} ./package-lock.json
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--generate-lockfile"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Concise multiwriter for data structures with Hypercore";
|
||||
homepage = "https://github.com/holepunchto/autobase";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = [ ];
|
||||
teams = with lib.teams; [ ngi ];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,24 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Taron <philip.taron@gmail.com>
|
||||
Date: Wed, 7 Jan 2026 17:30:51 -0800
|
||||
Subject: [PATCH] console: include termios.h explicitly
|
||||
|
||||
ncurses 6.6 moved the termios.h include inside #ifdef NCURSES_INTERNALS
|
||||
in term.h, so applications can no longer rely on term.h to provide
|
||||
termios symbols. Include termios.h explicitly.
|
||||
---
|
||||
src/console/conio.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/console/conio.c b/src/console/conio.c
|
||||
index 2bea887..7ac61d6 100755
|
||||
--- a/src/console/conio.c
|
||||
+++ b/src/console/conio.c
|
||||
@@ -56,6 +56,7 @@
|
||||
|
||||
#include <curses.h>
|
||||
#include <term.h>
|
||||
+#include <termios.h>
|
||||
|
||||
#ifdef HAVE_SUN_OS
|
||||
#ifndef _TERM_H
|
||||
@@ -21,6 +21,12 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-KUr9PS651bccPQ6I/fGetRO/24Q7KNNcBVLkrgYoJ6E=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# ncurses 6.6 moved the termios.h include inside #ifdef NCURSES_INTERNALS in term.h,
|
||||
# so applications can no longer rely on term.h to provide termios symbols.
|
||||
./0001-console-include-termios.h-explicitly.patch
|
||||
];
|
||||
|
||||
# libtool.m4 only matches macOS 10.*
|
||||
postPatch = lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
|
||||
substituteInPlace configure \
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bison";
|
||||
version = "3.8.2";
|
||||
version = "3.8.2"; # Check the note above doInstallCheck before updating.
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/${pname}/${pname}-${version}.tar.gz";
|
||||
@@ -46,7 +46,9 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Normal check and install check largely execute the same test suite
|
||||
doCheck = false;
|
||||
doInstallCheck = true;
|
||||
# Tests were disabled on LLVM/Darwin due to https://github.com/NixOS/nixpkgs/issues/463659
|
||||
# TODO: enable doInstallCheck unconditionally when fixed upstream.
|
||||
doInstallCheck = !stdenv.cc.isClang;
|
||||
|
||||
meta = {
|
||||
homepage = "https://www.gnu.org/software/bison/";
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "bmake";
|
||||
version = "20250804";
|
||||
version = "20251111";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.crufty.net/ftp/pub/sjg/bmake-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-C0kDdkSyUyBtLnENRuMoWeYt/ixsjnIYrkOfLvUN6K0=";
|
||||
hash = "sha256-RaP4UVZ3uo85M9ghP0u2EaXDyIOAvi5GIi+kRwlQYGA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
libbfd,
|
||||
libbfd_2_38,
|
||||
elfutils,
|
||||
openssl,
|
||||
readline,
|
||||
zlib,
|
||||
python3,
|
||||
@@ -50,6 +51,7 @@ stdenv.mkDerivation rec {
|
||||
++ [
|
||||
elfutils
|
||||
zlib
|
||||
openssl
|
||||
readline
|
||||
];
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
cmake,
|
||||
python3Packages,
|
||||
staticOnly ? stdenv.hostPlatform.isStatic,
|
||||
@@ -20,6 +21,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-kl8ZHt71v17QR2bDP+ad/5uixf+GStEPLQ5ooFoC5i8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fixes build on LoongArch64 & IA64
|
||||
# https://github.com/google/brotli/commit/e230f474b87134e8c6c85b630084c612057f253e
|
||||
(fetchurl {
|
||||
url = "https://github.com/google/brotli/commit/e230f474b87134e8c6c85b630084c612057f253e.patch";
|
||||
hash = "sha256-QERl8RHJz7tFr++hZIYwdj1/ogPpjArC+ia8S/bWxKk=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = lib.optional staticOnly "-DBUILD_SHARED_LIBS=OFF";
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
From 0fbeb87f65ad9e9e6cead10d778291db71489f34 Mon Sep 17 00:00:00 2001
|
||||
From: iucoen <68678186+iucoen@users.noreply.github.com>
|
||||
Date: Thu, 5 Jun 2025 20:08:43 -0700
|
||||
Subject: [PATCH] Fix IPv6 link-local nameservers in /etc/resolv.conf (#997)
|
||||
|
||||
There are two issues that broke link-local nameservers in resolv.conf
|
||||
1. channel->sock_funcs needs to be initialized before
|
||||
ares_init_by_sysconfig()
|
||||
2. The aif_nametoindex and aif_indextoname function pointers were not
|
||||
initlized at all.
|
||||
---
|
||||
src/lib/ares_init.c | 4 ++--
|
||||
src/lib/ares_set_socket_functions.c | 2 ++
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lib/ares_init.c b/src/lib/ares_init.c
|
||||
index ae78262a11..ce6181833c 100644
|
||||
--- a/src/lib/ares_init.c
|
||||
+++ b/src/lib/ares_init.c
|
||||
@@ -271,6 +271,8 @@ int ares_init_options(ares_channel_t **channelptr,
|
||||
goto done;
|
||||
}
|
||||
|
||||
+ ares_set_socket_functions_def(channel);
|
||||
+
|
||||
/* Initialize Server List */
|
||||
channel->servers =
|
||||
ares_slist_create(channel->rand_state, server_sort_cb, server_destroy_cb);
|
||||
@@ -346,8 +348,6 @@ int ares_init_options(ares_channel_t **channelptr,
|
||||
goto done;
|
||||
}
|
||||
|
||||
- ares_set_socket_functions_def(channel);
|
||||
-
|
||||
/* Initialize the event thread */
|
||||
if (channel->optmask & ARES_OPT_EVENT_THREAD) {
|
||||
ares_event_thread_t *e = NULL;
|
||||
diff --git a/src/lib/ares_set_socket_functions.c b/src/lib/ares_set_socket_functions.c
|
||||
index cfe434327d..9994e81df5 100644
|
||||
--- a/src/lib/ares_set_socket_functions.c
|
||||
+++ b/src/lib/ares_set_socket_functions.c
|
||||
@@ -127,6 +127,8 @@ ares_status_t
|
||||
channel->sock_funcs.asendto = funcs->asendto;
|
||||
channel->sock_funcs.agetsockname = funcs->agetsockname;
|
||||
channel->sock_funcs.abind = funcs->abind;
|
||||
+ channel->sock_funcs.aif_nametoindex = funcs->aif_nametoindex;
|
||||
+ channel->sock_funcs.aif_indextoname = funcs->aif_indextoname;
|
||||
}
|
||||
|
||||
/* Implement newer versions here ...*/
|
||||
@@ -18,19 +18,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "c-ares";
|
||||
version = "1.34.5";
|
||||
version = "1.34.6";
|
||||
|
||||
src = fetchurl {
|
||||
# Note: tag name varies in some versions, e.g. v1.30.0, c-ares-1_17_0.
|
||||
url = "https://github.com/c-ares/c-ares/releases/download/v${version}/c-ares-${version}.tar.gz";
|
||||
hash = "sha256-fZNXkOmvCBwlxJX9E8LPzaR5KYNBjpY1jvbnMg7gY0Y=";
|
||||
hash = "sha256-kS3XzDs+innFL9f7nA9Ozwqqc+Re/aiAJmotbia4TvU=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix being unable to use Ipv6 link-local DNS servers. See: https://github.com/c-ares/c-ares/pull/997.
|
||||
./fix-link-local-dns-servers.patch
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
|
||||
@@ -23,7 +23,7 @@ let
|
||||
lib.concatStringsSep "\n\n" extraCertificateStrings
|
||||
);
|
||||
|
||||
srcVersion = "3.117";
|
||||
srcVersion = "3.119.1";
|
||||
version = if nssOverride != null then nssOverride.version else srcVersion;
|
||||
meta = {
|
||||
homepage = "https://curl.haxx.se/docs/caextract.html";
|
||||
@@ -47,7 +47,7 @@ let
|
||||
owner = "nss-dev";
|
||||
repo = "nss";
|
||||
rev = "NSS_${lib.replaceStrings [ "." ] [ "_" ] version}_RTM";
|
||||
hash = "sha256-sAs0TiV3TK/WtgHvEjl2KFAgebyWZYmcRcmxjpn2AME=";
|
||||
hash = "sha256-GxLTqHcVWGiFezcwdctXJ8k9wqizVJPHyLBPZzphLro=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
@@ -12,19 +12,19 @@
|
||||
|
||||
let
|
||||
# this version may need to be updated along with package version
|
||||
cargoVersion = "0.90.0";
|
||||
cargoVersion = "0.93.0";
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-c";
|
||||
version = "0.10.15";
|
||||
version = "0.10.19";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname;
|
||||
version = "${version}+cargo-${cargoVersion}";
|
||||
hash = "sha256-szqDSHGihE+Oj8L3EBlC5XH4kSBYOptd0Xtk3MhXooQ=";
|
||||
hash = "sha256-PrBmB+0tmU2MAUnRr+wx4g9hu0Y9i6WfR8U89bwiLVY=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-36ygs/EhCktG1jmBnP9c7EgnfcWnGrqqcW3qAw+Yfy4=";
|
||||
cargoHash = "sha256-EM/vAfW/ucOfK/XmAQn9Zk75eFb7pp8uZoByKbALCyo=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "catch2";
|
||||
version = "3.11.0";
|
||||
version = "3.12.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "catchorg";
|
||||
repo = "Catch2";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-7Dx7PhtRwkbo8vHF57sAns2fQZ442D3cMyCt25RvzJc=";
|
||||
hash = "sha256-M1n2jWiA0hNCNqO3zSXRANiaMVCebn7/VU/4FfcjoA8=";
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.cc.isClang [
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
--- a/src/core/util_string.cpp 2014-10-27 22:52:11.875981552 +0100
|
||||
+++ b/src/core/util_string.cpp 2014-10-27 22:54:18.613001994 +0100
|
||||
@@ -40,6 +40,10 @@
|
||||
#include <linux/limits.h>
|
||||
#endif // __PLATFORM_LINUX__
|
||||
|
||||
+#ifdef __PLATFORM_MACOSX__
|
||||
+#include <limits.h>
|
||||
+#endif // __PLATFORM_MACOSX__
|
||||
+
|
||||
#include <stdio.h>
|
||||
using namespace std;
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cmocka";
|
||||
version = "1.1.8";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cmocka.org/files/${lib.versions.majorMinor version}/cmocka-${version}.tar.xz";
|
||||
hash = "sha256-WENbVYdm1/THKboWO9867Di+07x2batoTjUm7Qqnx4A=";
|
||||
hash = "sha256-PzUzOCuimrOr9cT0snt50WXw31HqWH3nSbEbaLQBkYA=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
-5112
File diff suppressed because it is too large
Load Diff
@@ -1,39 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "corestore";
|
||||
version = "7.4.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "holepunchto";
|
||||
repo = "corestore";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-/UhiuEBoAJc1U2/VYVWLyEGcXUndH0QmM++FN4KCTHo=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-hQYvQeTwlIWImdNhgpnJjDC24Fx4G0eST7tptWV1Xgw=";
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
# ERROR: Missing package-lock.json from src
|
||||
# Upstream doesn't want to maintain a lockfile in their repo: https://github.com/holepunchto/corestore/issues/119
|
||||
# Copy vendored package-lock.json to src via postPatch
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} ./package-lock.json
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Simple corestore that wraps a random-access-storage module";
|
||||
homepage = "https://github.com/holepunchto/corestore";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ themadbit ];
|
||||
teams = with lib.teams; [ ngi ];
|
||||
};
|
||||
})
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "cryptsetup";
|
||||
version = "2.8.1";
|
||||
version = "2.8.3";
|
||||
|
||||
outputs = [
|
||||
"bin"
|
||||
@@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url =
|
||||
"mirror://kernel/linux/utils/cryptsetup/v${lib.versions.majorMinor finalAttrs.version}/"
|
||||
+ "cryptsetup-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-LDN563ZZfcq1CRFEmwE+JpfEv/zHFtu/DZsOj7u0b7Q=";
|
||||
hash = "sha256-SoojuLnRoyUEUuQKzq1EIaA+RaOJVK0FlWNPQmaqgA8=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
@@ -27,13 +27,13 @@ assert useVulkan -> withExamples;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "dav1d";
|
||||
version = "1.5.2";
|
||||
version = "1.5.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "videolan";
|
||||
repo = "dav1d";
|
||||
rev = version;
|
||||
hash = "sha256-rxRO5EWjrOUsCYXd2rDDhfcEZbfSuMfjujRAHTqUYhI=";
|
||||
hash = "sha256-E3da/LJ8HNy1osExmupovqnL8JHgVNzPUCG5F8TJKXQ=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ed";
|
||||
version = "1.22.2";
|
||||
version = "1.22.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/ed/ed-${finalAttrs.version}.tar.lz";
|
||||
hash = "sha256-9Y0VJCBW4Vr3bxPzTGDYkPoqLVywq++RwRXk2DeU/+M=";
|
||||
hash = "sha256-mHoeu7rT/PY6H/qeKbP6feBlFQ0WMZ0KSd2LV/gdPpw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ lzip ];
|
||||
|
||||
@@ -84,6 +84,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
installTargets = lib.singleton "install" ++ lib.optional stdenv.hostPlatform.is64bit "install64";
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
meta = {
|
||||
description = "ERESI Reverse Engineering Software Interface";
|
||||
license = lib.licenses.gpl2Only;
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "fast-float";
|
||||
version = "8.1.0";
|
||||
version = "8.2.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fastfloat";
|
||||
repo = "fast_float";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-kTLmk+mxfdN/+vKdyohcaNSeoAkhJf3uesaBOz123ag=";
|
||||
hash = "sha256-IZCZZayK3INU5P8HwZvWfOJuRfBrbPYuMQCjgCjHCWE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "fluidsynth";
|
||||
version = "2.5.1";
|
||||
version = "2.5.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FluidSynth";
|
||||
repo = "fluidsynth";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-gTkW2X7fcmxJwYf13Yma6cBigz4sbsb99dBSYTDlcyY=";
|
||||
hash = "sha256-Ei6ts6gmC3jg1b7nORUCYxoAzoPoN3foyVnrmhpqHTs=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
libICE,
|
||||
libXext,
|
||||
libXi,
|
||||
@@ -16,29 +15,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "freeglut";
|
||||
version = "3.6.0";
|
||||
version = "3.8.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/freeglut/freeglut-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "sha256-nD1NZRb7+gKA7ck8d2mPtzA+RDwaqvN9Jp4yiKbD6lI=";
|
||||
hash = "sha256-Z03K/yUBDgnkUK7EWLiHDZ6YxG+ZU420V6tlmzIdmYk=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "freeglut-fix-cmake-4.patch";
|
||||
url = "https://github.com/freeglut/freeglut/commit/2294389397912c9a6505a88221abb7dca0a4fb79.patch";
|
||||
hash = "sha256-buNhlVUbDekklnar6KFWN/GUKE+jMEqTGrY3LY0LwVs=";
|
||||
})
|
||||
|
||||
# Fix build with gcc15
|
||||
# https://github.com/freeglut/freeglut/pull/187
|
||||
(fetchpatch {
|
||||
name = "freeglut-fix-fgPlatformDestroyContext-prototype-for-C23.patch";
|
||||
url = "https://github.com/freeglut/freeglut/commit/800772e993a3ceffa01ccf3fca449d3279cde338.patch";
|
||||
hash = "sha256-agXw3JHq81tx5514kkorvuU5mX4E3AV930hy1OJl4L0=";
|
||||
})
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
|
||||
@@ -12,10 +12,7 @@
|
||||
buildPackages,
|
||||
|
||||
# Run time
|
||||
ncurses,
|
||||
readline,
|
||||
gmp,
|
||||
mpfr,
|
||||
expat,
|
||||
libipt,
|
||||
zlib,
|
||||
@@ -24,14 +21,23 @@
|
||||
dejagnu,
|
||||
sourceHighlight,
|
||||
libiconv,
|
||||
xxHash,
|
||||
|
||||
withTui ? true,
|
||||
ncurses,
|
||||
withGmp ? true,
|
||||
gmp,
|
||||
withMpfr ? true,
|
||||
mpfr,
|
||||
withGuile ? false,
|
||||
guile,
|
||||
pythonSupport ? stdenv.hostPlatform == stdenv.buildPlatform && !stdenv.hostPlatform.isCygwin,
|
||||
python3 ? null,
|
||||
python3,
|
||||
enableDebuginfod ? lib.meta.availableOn stdenv.hostPlatform elfutils,
|
||||
elfutils,
|
||||
guile ? null,
|
||||
hostCpuOnly ? false,
|
||||
enableSim ? false,
|
||||
enableUbsan ? false,
|
||||
safePaths ? [
|
||||
# $debugdir:$datadir/auto-load are whitelisted by default by GDB
|
||||
"$debugdir"
|
||||
@@ -43,39 +49,45 @@
|
||||
}:
|
||||
|
||||
let
|
||||
basename = "gdb";
|
||||
targetPrefix = lib.optionalString (
|
||||
inherit (lib)
|
||||
optional
|
||||
optionals
|
||||
optionalString
|
||||
withFeature
|
||||
enableFeature
|
||||
withFeatureAs
|
||||
;
|
||||
targetPrefix = optionalString (
|
||||
stdenv.targetPlatform != stdenv.hostPlatform
|
||||
) "${stdenv.targetPlatform.config}-";
|
||||
pname = targetPrefix + "gdb" + optionalString hostCpuOnly "-host-cpu-only";
|
||||
in
|
||||
|
||||
assert pythonSupport -> python3 != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = targetPrefix + basename + lib.optionalString hostCpuOnly "-host-cpu-only";
|
||||
version = "16.3";
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
inherit pname;
|
||||
version = "17.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gdb/${basename}-${version}.tar.xz";
|
||||
hash = "sha256-vPzQlVKKmHkXrPn/8/FnIYFpSSbMGNYJyZ0AQsACJMU=";
|
||||
url = "mirror://gnu/gdb/gdb-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-FJlvX3TJ9o9aVD/cRbyngAIH+R+SrupsLnkYIsfG2HY=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
optionalString stdenv.hostPlatform.isDarwin ''
|
||||
substituteInPlace gdb/darwin-nat.c \
|
||||
--replace '#include "bfd/mach-o.h"' '#include "mach-o.h"'
|
||||
--replace-fail '#include "bfd/mach-o.h"' '#include "mach-o.h"'
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isMusl ''
|
||||
substituteInPlace sim/erc32/erc32.c --replace sys/fcntl.h fcntl.h
|
||||
substituteInPlace sim/erc32/interf.c --replace sys/fcntl.h fcntl.h
|
||||
substituteInPlace sim/erc32/sis.c --replace sys/fcntl.h fcntl.h
|
||||
substituteInPlace sim/ppc/emul_unix.c --replace sys/termios.h termios.h
|
||||
+ optionalString stdenv.hostPlatform.isMusl ''
|
||||
substituteInPlace sim/erc32/erc32.c --replace-fail sys/fcntl.h fcntl.h
|
||||
substituteInPlace sim/erc32/interf.c --replace-fail sys/fcntl.h fcntl.h
|
||||
substituteInPlace sim/erc32/sis.c --replace-fail sys/fcntl.h fcntl.h
|
||||
substituteInPlace sim/ppc/emul_unix.c --replace-fail sys/termios.h termios.h
|
||||
'';
|
||||
|
||||
patches = [
|
||||
./debug-info-from-env.patch
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
++ optionals stdenv.hostPlatform.isDarwin [
|
||||
./darwin-target-match.patch
|
||||
];
|
||||
|
||||
@@ -89,20 +101,22 @@ stdenv.mkDerivation rec {
|
||||
buildInputs = [
|
||||
ncurses
|
||||
readline
|
||||
gmp
|
||||
mpfr
|
||||
expat
|
||||
libipt
|
||||
zlib
|
||||
zstd
|
||||
xz
|
||||
guile
|
||||
sourceHighlight
|
||||
xxHash
|
||||
dejagnu # for tests
|
||||
]
|
||||
++ lib.optional pythonSupport python3
|
||||
++ lib.optional doCheck dejagnu
|
||||
++ lib.optional enableDebuginfod (elfutils.override { enableDebuginfod = true; })
|
||||
++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
|
||||
++ optional withTui ncurses
|
||||
++ optional withMpfr mpfr
|
||||
++ optional withGmp gmp
|
||||
++ optional pythonSupport python3
|
||||
++ optional withGuile guile
|
||||
++ optional enableDebuginfod (elfutils.override { enableDebuginfod = true; })
|
||||
++ optional stdenv.hostPlatform.isDarwin libiconv;
|
||||
|
||||
propagatedNativeBuildInputs = [ setupDebugInfoDirs ];
|
||||
|
||||
@@ -111,24 +125,23 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
# darwin build fails with format hardening since v7.12
|
||||
hardeningDisable = lib.optionals stdenv.hostPlatform.isDarwin [ "format" ];
|
||||
hardeningDisable = optionals stdenv.hostPlatform.isDarwin [ "format" ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-format-nonliteral";
|
||||
|
||||
# Workaround for Apple Silicon, configurePlatforms must be disabled
|
||||
configurePlatforms =
|
||||
lib.optionals (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64))
|
||||
[
|
||||
"build"
|
||||
"host"
|
||||
"target"
|
||||
];
|
||||
configurePlatforms = optionals (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) [
|
||||
"build"
|
||||
"host"
|
||||
"target"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
# remove precompiled docs, required for man gdbinit to mention /etc/gdb/gdbinit
|
||||
rm gdb/doc/*.info*
|
||||
rm gdb/doc/*.5
|
||||
rm gdb/doc/*.1
|
||||
|
||||
# fix doc build https://sourceware.org/bugzilla/show_bug.cgi?id=27808
|
||||
rm gdb/doc/GDBvn.texi
|
||||
|
||||
@@ -146,33 +159,37 @@ stdenv.mkDerivation rec {
|
||||
# subset of the platform description.
|
||||
"--program-prefix=${targetPrefix}"
|
||||
|
||||
"--disable-werror"
|
||||
(enableFeature true "werror")
|
||||
(enableFeature true "64-bit-bfd")
|
||||
(enableFeature false "install-libbfd")
|
||||
(enableFeature withTui "tui")
|
||||
(withFeature withTui "curses")
|
||||
(enableFeature false "shared")
|
||||
(enableFeature true "static")
|
||||
(withFeature true "system-readline")
|
||||
(withFeature true "system-zlib")
|
||||
(withFeature true "expat")
|
||||
(withFeatureAs true "libexpat-prefix" "${expat.dev}")
|
||||
(withFeatureAs withGmp "gmp" "${gmp.dev}")
|
||||
(withFeatureAs withMpfr "mpfr" "${mpfr.dev}")
|
||||
(withFeature pythonSupport "python")
|
||||
(withFeature withGuile "guile")
|
||||
(enableFeature enableSim "sim")
|
||||
(enableFeature enableUbsan "ubsan")
|
||||
(withFeatureAs true "system-gdbinit" "/etc/gdb/gdbinit")
|
||||
(withFeatureAs true "system-gdbinit-dir" "/etc/gdb/gdbinit.d")
|
||||
(withFeatureAs true "auto-load-safe-path" (builtins.concatStringsSep ":" safePaths))
|
||||
(withFeature enableDebuginfod "debuginfod")
|
||||
(enableFeature (!stdenv.hostPlatform.isMusl) "nls")
|
||||
]
|
||||
++ lib.optional (!hostCpuOnly) "--enable-targets=all"
|
||||
++ optional (!hostCpuOnly) "--enable-targets=all"
|
||||
++ [
|
||||
"--enable-64-bit-bfd"
|
||||
"--disable-install-libbfd"
|
||||
"--disable-shared"
|
||||
"--enable-static"
|
||||
"--with-system-zlib"
|
||||
"--with-system-readline"
|
||||
|
||||
"--with-system-gdbinit=/etc/gdb/gdbinit"
|
||||
"--with-system-gdbinit-dir=/etc/gdb/gdbinit.d"
|
||||
|
||||
"--with-gmp=${gmp.dev}"
|
||||
"--with-mpfr=${mpfr.dev}"
|
||||
"--with-expat"
|
||||
"--with-libexpat-prefix=${expat.dev}"
|
||||
"--with-auto-load-safe-path=${builtins.concatStringsSep ":" safePaths}"
|
||||
(enableFeature (
|
||||
!stdenv.hostPlatform.isStatic && !stdenv.hostPlatform.isLoongArch64
|
||||
) "inprocess-agent")
|
||||
]
|
||||
++ lib.optional (!pythonSupport) "--without-python"
|
||||
++ lib.optional stdenv.hostPlatform.isMusl "--disable-nls"
|
||||
++ lib.optional stdenv.hostPlatform.isStatic "--disable-inprocess-agent"
|
||||
++ lib.optional enableDebuginfod "--with-debuginfod=yes"
|
||||
++ lib.optional (!enableSim) "--disable-sim"
|
||||
# Workaround for Apple Silicon, "--target" must be "faked", see eg: https://github.com/Homebrew/homebrew-core/pull/209753
|
||||
++ lib.optional (
|
||||
++ optional (
|
||||
stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64
|
||||
) "--target=x86_64-apple-darwin";
|
||||
|
||||
@@ -181,9 +198,6 @@ stdenv.mkDerivation rec {
|
||||
rm -v $out/share/info/bfd.info
|
||||
'';
|
||||
|
||||
# TODO: Investigate & fix the test failures.
|
||||
doCheck = false;
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-gdb" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
@@ -199,24 +213,19 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
meta = {
|
||||
mainProgram = "gdb";
|
||||
|
||||
description = "GNU Project debugger";
|
||||
|
||||
mainProgram = "gdb";
|
||||
longDescription = ''
|
||||
GDB, the GNU Project debugger, allows you to see what is going
|
||||
on `inside' another program while it executes -- or what another
|
||||
program was doing at the moment it crashed.
|
||||
'';
|
||||
|
||||
homepage = "https://www.gnu.org/software/gdb/";
|
||||
|
||||
license = lib.licenses.gpl3Plus;
|
||||
|
||||
platforms = with lib.platforms; linux ++ cygwin ++ freebsd ++ darwin;
|
||||
maintainers = with lib.maintainers; [
|
||||
pierron
|
||||
globin
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
configureFlags = lib.optional (!gifview) "--disable-gifview";
|
||||
|
||||
LDFLAGS = lib.optionalString static "-static";
|
||||
env.LDFLAGS = lib.optionalString static "-static";
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
|
||||
@@ -130,7 +130,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
url = "https://lore.kernel.org/git/20251201031040.1120091-1-brianmlyles@gmail.com/raw";
|
||||
hash = "sha256-vvhbvg74OIMzfksHiErSnjOZ+W0M/T9J8GOQ4E4wKbU=";
|
||||
})
|
||||
|
||||
# Fixes t8020 test on big-endian
|
||||
(fetchurl {
|
||||
name = "last-modified-fix-bug-caused-by-inproper-initialized-memory.patch";
|
||||
url = "https://lore.kernel.org/git/20251128-toon-big-endian-ci-v1-1-80da0f629c1e@iotcl.com/raw";
|
||||
hash = "sha256-WdewOwD7hMhnahhUUEYAlM58tT3MkxUlBa3n8IwrESU=";
|
||||
})
|
||||
]
|
||||
++ lib.optionals withSsh [
|
||||
# Hard-code the ssh executable to ${pkgs.openssh}/bin/ssh instead of
|
||||
|
||||
@@ -2,21 +2,20 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
bison,
|
||||
cmake,
|
||||
jq,
|
||||
python3,
|
||||
spirv-headers,
|
||||
spirv-tools,
|
||||
config,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "glslang";
|
||||
version = "16.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "KhronosGroup";
|
||||
repo = "glslang";
|
||||
rev = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-cEREniYgSd62mnvKaQkgs69ETL5pLl5Gyv3hKOtSv3w=";
|
||||
};
|
||||
|
||||
@@ -26,48 +25,40 @@ stdenv.mkDerivation rec {
|
||||
"dev"
|
||||
];
|
||||
|
||||
# These get set at all-packages, keep onto them for child drvs
|
||||
passthru = {
|
||||
spirv-tools = spirv-tools;
|
||||
spirv-headers = spirv-headers;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3
|
||||
bison
|
||||
jq
|
||||
];
|
||||
|
||||
cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ];
|
||||
propagatedBuildInputs = [
|
||||
spirv-tools
|
||||
spirv-headers
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
|
||||
ln -s "${spirv-headers.src}" External/spirv-tools/external/spirv-headers
|
||||
'';
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
|
||||
(lib.cmakeBool "BUILD_EXTERNAL" false)
|
||||
(lib.cmakeBool "ALLOW_EXTERNAL_SPIRV_TOOLS" true)
|
||||
];
|
||||
|
||||
# This is a dirty fix for lib/cmake/SPIRVTargets.cmake:51 which includes this directory
|
||||
postInstall = ''
|
||||
mkdir -p $dev/include/External
|
||||
moveToOutput lib/pkgconfig "''${!outputDev}"
|
||||
moveToOutput lib/cmake "''${!outputDev}"
|
||||
'';
|
||||
|
||||
# Fix the paths in .pc, even though it's unclear if these .pc are really useful.
|
||||
postFixup = ''
|
||||
substituteInPlace $dev/lib/pkgconfig/*.pc \
|
||||
--replace-fail '=''${prefix}//' '=/' \
|
||||
--replace-fail "includedir=$dev/$dev" "includedir=$dev"
|
||||
|
||||
# add a symlink for backwards compatibility
|
||||
ln -s $bin/bin/glslang $bin/bin/glslangValidator
|
||||
'';
|
||||
|
||||
passthru = lib.optionalAttrs config.allowAliases {
|
||||
# Added 2026-01-06, https://github.com/NixOS/nixpkgs/pull/477412
|
||||
spirv-tools = throw "'glslang' no longer pins to specific 'spirv-tools'";
|
||||
|
||||
# Added 2026-01-06, https://github.com/NixOS/nixpkgs/pull/477412
|
||||
spirv-headers = throw "'glslang' no longer pins to specific 'spirv-headers'";
|
||||
};
|
||||
|
||||
meta = {
|
||||
inherit (src.meta) homepage;
|
||||
inherit (finalAttrs.src.meta) homepage;
|
||||
description = "Khronos reference front-end for GLSL and ESSL";
|
||||
license = lib.licenses.asl20;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = [ lib.maintainers.ralith ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
version ?
|
||||
# This is a workaround for update-source-version to be able to update this
|
||||
let
|
||||
_version = "0-unstable-2025-09-18";
|
||||
_version = "0-unstable-2025-10-08";
|
||||
in
|
||||
_version,
|
||||
rev ? "81b24e01531ecf0eff12ec9359a555ec3944ec4e",
|
||||
hash ? "sha256-sm5GWbkm3ua7EkCWTuY4TG6EXKe3asXTrH1APnNARJQ=",
|
||||
rev ? "07d3c6f4dc290fae5ca6152ebcb37d6815c411ab",
|
||||
hash ? "sha256-kIPhfuJBQSISdRjloe0N2JrqvuVrEkNijb92/9zSE9I=",
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
Applied the following incremental gnulib commits:
|
||||
|
||||
- 55a366a06fbd98bf13adc531579e3513cee97a32
|
||||
- 65ed9d3b24ad09fd61d326c83e7f1b05f6e9d65f
|
||||
- ce8e9de0bf34bc63dffc67ab384334c509175f64
|
||||
- 6164b4cb0887b5331a4e64449107decd37d32735
|
||||
|
||||
With adjustments specific to the structure & differences in gnutls:
|
||||
|
||||
- The gnulib version included in the gnutls 3.8.11 release tarball is older than the one in the 3.8.11 tag on GitLab, necessitating this patching.
|
||||
Maybe an issue with their release making process.
|
||||
- gnulib code is duplicated across gl and src/gl, with the tests only existing the latter.
|
||||
Unsure why this is duplicated, but applied to both versions.
|
||||
- A Makefile.in is used for the test flags instead of the fancy automake modules
|
||||
in the upstream gnulib project, so we add -lm to the float test there.
|
||||
Surrounding texts in this file are slightly different in every project.
|
||||
diff '--color=auto' -ruN a/gl/float.c b/gl/float.c
|
||||
--- a/gl/float.c 2025-11-20 03:09:15.000000000 +0100
|
||||
+++ b/gl/float.c 2026-01-04 14:19:05.770105827 +0100
|
||||
@@ -23,7 +23,7 @@
|
||||
#if GNULIB_defined_long_double_union
|
||||
# if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
|
||||
const union gl_long_double_union gl_LDBL_MAX =
|
||||
- { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } };
|
||||
+ { { DBL_MAX, DBL_MAX / 0x1p53 } };
|
||||
# elif defined __i386__
|
||||
const union gl_long_double_union gl_LDBL_MAX =
|
||||
{ { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } };
|
||||
diff '--color=auto' -ruN a/gl/float.in.h b/gl/float.in.h
|
||||
--- a/gl/float.in.h 2025-11-20 03:09:15.000000000 +0100
|
||||
+++ b/gl/float.in.h 2026-01-04 14:22:50.690169887 +0100
|
||||
@@ -113,44 +113,38 @@
|
||||
# define LDBL_MAX_10_EXP 4932
|
||||
#endif
|
||||
|
||||
-/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are
|
||||
- wrong.
|
||||
- On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */
|
||||
-#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
|
||||
+/* On PowerPC with gcc 15 when using __ibm128 long double, the value of
|
||||
+ LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX, and LDBL_NORM_MAX are wrong. */
|
||||
+#if ((defined _ARCH_PPC || defined _POWER) && LDBL_MANT_DIG == 106 \
|
||||
+ && defined __GNUC__)
|
||||
# undef LDBL_MIN_EXP
|
||||
# define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
# undef LDBL_MIN_10_EXP
|
||||
# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
# undef LDBL_MIN
|
||||
# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */
|
||||
-#endif
|
||||
-#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
|
||||
# undef LDBL_MAX
|
||||
-/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }.
|
||||
- It is not easy to define:
|
||||
- #define LDBL_MAX 1.79769313486231580793728971405302307166e308L
|
||||
- is too small, whereas
|
||||
- #define LDBL_MAX 1.79769313486231580793728971405302307167e308L
|
||||
- is too large. Apparently a bug in GCC decimal-to-binary conversion.
|
||||
- Also, I can't get values larger than
|
||||
- #define LDBL63 ((long double) (1ULL << 63))
|
||||
- #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
|
||||
- #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
|
||||
- #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
|
||||
- #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL)
|
||||
- which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }.
|
||||
- So, define it like this through a reference to an external variable
|
||||
+/* LDBL_MAX is 2**1024 - 2**918, represented as: { 0x7FEFFFFF, 0xFFFFFFFF,
|
||||
+ 0x7C9FFFFF, 0xFFFFFFFF }.
|
||||
+
|
||||
+ Do not write it as a constant expression, as GCC would likely treat
|
||||
+ that as infinity due to the vagaries of this platform's funky arithmetic.
|
||||
+ Instead, define it through a reference to an external variable.
|
||||
+ Like the following, but using a union to avoid type mismatches:
|
||||
|
||||
- const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL };
|
||||
+ const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / 0x1p53 };
|
||||
extern const long double LDBL_MAX;
|
||||
|
||||
- or through a pointer cast
|
||||
+ The following alternative would not work as well when GCC is optimizing:
|
||||
+
|
||||
+ #define LDBL_MAX (*(long double const *) (double[])
|
||||
+ { DBL_MAX, DBL_MAX / 0x1p53 })
|
||||
|
||||
- #define LDBL_MAX \
|
||||
- (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL })
|
||||
+ The following alternative would require GCC 6 or later:
|
||||
|
||||
- Unfortunately, this is not a constant expression, and the latter expression
|
||||
- does not work well when GCC is optimizing.. */
|
||||
+ #define LDBL_MAX __builtin_pack_longdouble (DBL_MAX, DBL_MAX / 0x1p53)
|
||||
+
|
||||
+ Unfortunately none of the alternatives are constant expressions. */
|
||||
# if !GNULIB_defined_long_double_union
|
||||
union gl_long_double_union
|
||||
{
|
||||
@@ -161,6 +155,8 @@
|
||||
# endif
|
||||
extern const union gl_long_double_union gl_LDBL_MAX;
|
||||
# define LDBL_MAX (gl_LDBL_MAX.ld)
|
||||
+# undef LDBL_NORM_MAX
|
||||
+# define LDBL_NORM_MAX LDBL_MAX
|
||||
#endif
|
||||
|
||||
/* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong.
|
||||
@@ -181,6 +177,21 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* On PowerPC platforms, 'long double' has a double-double representation.
|
||||
+ Up to ISO C 17, this was outside the scope of ISO C because it can represent
|
||||
+ numbers with mantissas of the form 1.<52 bits><many zeroes><52 bits>, such as
|
||||
+ 1.0L + 4.94065645841246544176568792868221e-324L = 1 + 2^-1074; see
|
||||
+ ISO C 17 § 5.2.4.2.2.(3).
|
||||
+ In ISO C 23, wording has been included that makes this 'long double'
|
||||
+ representation compliant; see ISO C 23 § 5.2.5.3.3.(8)-(9). In this setting,
|
||||
+ numbers with mantissas of the form 1.<52 bits><many zeroes><52 bits> are
|
||||
+ called "unnormalized". And since LDBL_EPSILON must be normalized (per
|
||||
+ ISO C 23 § 5.2.5.3.3.(33)), it must be 2^-105. */
|
||||
+#if defined __powerpc__ && LDBL_MANT_DIG == 106
|
||||
+# undef LDBL_EPSILON
|
||||
+# define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */
|
||||
+#endif
|
||||
+
|
||||
/* ============================ ISO C11 support ============================ */
|
||||
|
||||
/* 'float' properties */
|
||||
@@ -309,7 +320,11 @@
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LDBL_NORM_MAX
|
||||
-# define LDBL_NORM_MAX LDBL_MAX
|
||||
+# ifdef __LDBL_NORM_MAX__
|
||||
+# define LDBL_NORM_MAX __LDBL_NORM_MAX__
|
||||
+# else
|
||||
+# define LDBL_NORM_MAX LDBL_MAX
|
||||
+# endif
|
||||
#endif
|
||||
#ifndef LDBL_SNAN
|
||||
/* For sh, beware of <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111814>. */
|
||||
diff '--color=auto' -ruN a/src/gl/float.c b/src/gl/float.c
|
||||
--- a/src/gl/float.c 2025-11-20 03:09:15.000000000 +0100
|
||||
+++ b/src/gl/float.c 2026-01-04 14:19:23.234252595 +0100
|
||||
@@ -23,7 +23,7 @@
|
||||
#if GNULIB_defined_long_double_union
|
||||
# if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
|
||||
const union gl_long_double_union gl_LDBL_MAX =
|
||||
- { { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL } };
|
||||
+ { { DBL_MAX, DBL_MAX / 0x1p53 } };
|
||||
# elif defined __i386__
|
||||
const union gl_long_double_union gl_LDBL_MAX =
|
||||
{ { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } };
|
||||
diff '--color=auto' -ruN a/src/gl/float.in.h b/src/gl/float.in.h
|
||||
--- a/src/gl/float.in.h 2025-11-20 03:09:15.000000000 +0100
|
||||
+++ b/src/gl/float.in.h 2026-01-04 14:24:52.632412768 +0100
|
||||
@@ -113,44 +113,38 @@
|
||||
# define LDBL_MAX_10_EXP 4932
|
||||
#endif
|
||||
|
||||
-/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are
|
||||
- wrong.
|
||||
- On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */
|
||||
-#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
|
||||
+/* On PowerPC with gcc 15 when using __ibm128 long double, the value of
|
||||
+ LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX, and LDBL_NORM_MAX are wrong. */
|
||||
+#if ((defined _ARCH_PPC || defined _POWER) && LDBL_MANT_DIG == 106 \
|
||||
+ && defined __GNUC__)
|
||||
# undef LDBL_MIN_EXP
|
||||
# define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
# undef LDBL_MIN_10_EXP
|
||||
# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
# undef LDBL_MIN
|
||||
# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */
|
||||
-#endif
|
||||
-#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
|
||||
# undef LDBL_MAX
|
||||
-/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }.
|
||||
- It is not easy to define:
|
||||
- #define LDBL_MAX 1.79769313486231580793728971405302307166e308L
|
||||
- is too small, whereas
|
||||
- #define LDBL_MAX 1.79769313486231580793728971405302307167e308L
|
||||
- is too large. Apparently a bug in GCC decimal-to-binary conversion.
|
||||
- Also, I can't get values larger than
|
||||
- #define LDBL63 ((long double) (1ULL << 63))
|
||||
- #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
|
||||
- #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
|
||||
- #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63)
|
||||
- #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL)
|
||||
- which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }.
|
||||
- So, define it like this through a reference to an external variable
|
||||
+/* LDBL_MAX is 2**1024 - 2**918, represented as: { 0x7FEFFFFF, 0xFFFFFFFF,
|
||||
+ 0x7C9FFFFF, 0xFFFFFFFF }.
|
||||
+
|
||||
+ Do not write it as a constant expression, as GCC would likely treat
|
||||
+ that as infinity due to the vagaries of this platform's funky arithmetic.
|
||||
+ Instead, define it through a reference to an external variable.
|
||||
+ Like the following, but using a union to avoid type mismatches:
|
||||
|
||||
- const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL };
|
||||
+ const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / 0x1p53 };
|
||||
extern const long double LDBL_MAX;
|
||||
|
||||
- or through a pointer cast
|
||||
+ The following alternative would not work as well when GCC is optimizing:
|
||||
+
|
||||
+ #define LDBL_MAX (*(long double const *) (double[])
|
||||
+ { DBL_MAX, DBL_MAX / 0x1p53 })
|
||||
|
||||
- #define LDBL_MAX \
|
||||
- (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL })
|
||||
+ The following alternative would require GCC 6 or later:
|
||||
|
||||
- Unfortunately, this is not a constant expression, and the latter expression
|
||||
- does not work well when GCC is optimizing.. */
|
||||
+ #define LDBL_MAX __builtin_pack_longdouble (DBL_MAX, DBL_MAX / 0x1p53)
|
||||
+
|
||||
+ Unfortunately none of the alternatives are constant expressions. */
|
||||
# if !GNULIB_defined_long_double_union
|
||||
union gl_long_double_union
|
||||
{
|
||||
@@ -161,6 +155,8 @@
|
||||
# endif
|
||||
extern const union gl_long_double_union gl_LDBL_MAX;
|
||||
# define LDBL_MAX (gl_LDBL_MAX.ld)
|
||||
+# undef LDBL_NORM_MAX
|
||||
+# define LDBL_NORM_MAX LDBL_MAX
|
||||
#endif
|
||||
|
||||
/* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong.
|
||||
@@ -181,6 +177,21 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+/* On PowerPC platforms, 'long double' has a double-double representation.
|
||||
+ Up to ISO C 17, this was outside the scope of ISO C because it can represent
|
||||
+ numbers with mantissas of the form 1.<52 bits><many zeroes><52 bits>, such as
|
||||
+ 1.0L + 4.94065645841246544176568792868221e-324L = 1 + 2^-1074; see
|
||||
+ ISO C 17 § 5.2.4.2.2.(3).
|
||||
+ In ISO C 23, wording has been included that makes this 'long double'
|
||||
+ representation compliant; see ISO C 23 § 5.2.5.3.3.(8)-(9). In this setting,
|
||||
+ numbers with mantissas of the form 1.<52 bits><many zeroes><52 bits> are
|
||||
+ called "unnormalized". And since LDBL_EPSILON must be normalized (per
|
||||
+ ISO C 23 § 5.2.5.3.3.(33)), it must be 2^-105. */
|
||||
+#if defined __powerpc__ && LDBL_MANT_DIG == 106
|
||||
+# undef LDBL_EPSILON
|
||||
+# define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */
|
||||
+#endif
|
||||
+
|
||||
/* ============================ ISO C11 support ============================ */
|
||||
|
||||
/* 'float' properties */
|
||||
@@ -309,7 +320,11 @@
|
||||
# endif
|
||||
#endif
|
||||
#ifndef LDBL_NORM_MAX
|
||||
-# define LDBL_NORM_MAX LDBL_MAX
|
||||
+# ifdef __LDBL_NORM_MAX__
|
||||
+# define LDBL_NORM_MAX __LDBL_NORM_MAX__
|
||||
+# else
|
||||
+# define LDBL_NORM_MAX LDBL_MAX
|
||||
+# endif
|
||||
#endif
|
||||
#ifndef LDBL_SNAN
|
||||
/* For sh, beware of <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111814>. */
|
||||
diff '--color=auto' -ruN a/src/gl/tests/Makefile.in b/src/gl/tests/Makefile.in
|
||||
--- a/src/gl/tests/Makefile.in 2025-11-20 03:09:50.000000000 +0100
|
||||
+++ b/src/gl/tests/Makefile.in 2026-01-04 14:10:49.765136843 +0100
|
||||
@@ -821,7 +821,7 @@
|
||||
$(am__DEPENDENCIES_1)
|
||||
test_float_h_SOURCES = test-float-h.c
|
||||
test_float_h_OBJECTS = test-float-h.$(OBJEXT)
|
||||
-test_float_h_LDADD = $(LDADD)
|
||||
+test_float_h_LDADD = $(LDADD) -lm
|
||||
test_float_h_DEPENDENCIES = libtests.a ../../../src/gl/libgnu_gpl.la \
|
||||
libtests.a ../../../src/gl/libgnu_gpl.la libtests.a \
|
||||
$(am__DEPENDENCIES_1)
|
||||
diff '--color=auto' -ruN a/src/gl/tests/test-float-h.c b/src/gl/tests/test-float-h.c
|
||||
--- a/src/gl/tests/test-float-h.c 2025-11-20 03:09:15.000000000 +0100
|
||||
+++ b/src/gl/tests/test-float-h.c 2026-01-04 14:26:11.677858229 +0100
|
||||
@@ -101,6 +101,8 @@
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
+#include <math.h>
|
||||
+
|
||||
#include "fpucw.h"
|
||||
#include "isnanf-nolibm.h"
|
||||
#include "isnand-nolibm.h"
|
||||
@@ -396,6 +398,44 @@
|
||||
|
||||
/* -------------------- Check macros for 'long double' -------------------- */
|
||||
|
||||
+static int
|
||||
+test_isfinitel (long double volatile x)
|
||||
+{
|
||||
+ if (x != x)
|
||||
+ return 0;
|
||||
+ long double volatile zero = x * 0;
|
||||
+ return zero == 0;
|
||||
+}
|
||||
+
|
||||
+/* Return X after normalization. This makes a difference on platforms
|
||||
+ where long double can represent unnormalized values. For example,
|
||||
+ suppose x = 1 + 2**-106 on PowerPC with IBM long double where
|
||||
+ FLT_RADIX = 2, LDBL_MANT_DIG = 106, and LDBL_EPSILON = 2**-105.
|
||||
+ Then 1 < x < 1 + LDBL_EPSILON, and normalize_long_double (x) returns 1. */
|
||||
+static long double
|
||||
+normalize_long_double (long double volatile x)
|
||||
+{
|
||||
+ if (FLT_RADIX == 2 && test_isfinitel (x))
|
||||
+ {
|
||||
+ int xexp;
|
||||
+ long double volatile
|
||||
+ frac = frexpl (x, &xexp),
|
||||
+ significand = frac * pow2l (LDBL_MANT_DIG),
|
||||
+ normalized_significand = truncl (significand),
|
||||
+ normalized_x = normalized_significand * pow2l (xexp - LDBL_MANT_DIG);
|
||||
+
|
||||
+ /* The test_isfinitel defends against PowerPC with IBM long double,
|
||||
+ which fritzes out near LDBL_MAX. */
|
||||
+ if (test_isfinitel (normalized_x))
|
||||
+ x = normalized_x;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Hope that X is already normalized. */
|
||||
+ }
|
||||
+ return x;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
test_long_double (void)
|
||||
{
|
||||
@@ -455,7 +495,7 @@
|
||||
for (n = 0; n <= 2 * LDBL_MANT_DIG; n++)
|
||||
{
|
||||
volatile long double half_n = pow2l (- n); /* 2^-n */
|
||||
- volatile long double x = me - half_n;
|
||||
+ volatile long double x = normalize_long_double (me - half_n);
|
||||
if (x < me)
|
||||
ASSERT (x <= 1.0L);
|
||||
}
|
||||
@@ -484,7 +524,7 @@
|
||||
#endif
|
||||
|
||||
/* Check the value of LDBL_NORM_MAX. */
|
||||
- ASSERT (LDBL_NORM_MAX == LDBL_MAX);
|
||||
+ ASSERT (LDBL_NORM_MAX == normalize_long_double (LDBL_MAX));
|
||||
|
||||
/* Check the value of LDBL_SNAN. */
|
||||
ASSERT (isnanl (LDBL_SNAN));
|
||||
@@ -85,6 +85,11 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
./nix-ssl-cert-file.patch
|
||||
|
||||
# Fixes test-float failure on ppc64 with C23
|
||||
# https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00021.html
|
||||
# Multiple upstream commits squashed with adjustments, see header
|
||||
./gnulib-float-h-tests-port-to-C23-PowerPC-GCC.patch
|
||||
];
|
||||
|
||||
# Skip some tests:
|
||||
|
||||
@@ -108,7 +108,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
installCheckPhase =
|
||||
let
|
||||
disabledTests = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
disabledTests = ''
|
||||
bigtable_internal_data_connection_impl_test
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
common_internal_async_connection_ready_test
|
||||
bigtable_async_read_stream_test
|
||||
bigtable_metadata_update_policy_test
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
lvm2,
|
||||
nilfs-utils,
|
||||
ntfs3g,
|
||||
reiserfsprogs,
|
||||
udftools,
|
||||
xfsprogs,
|
||||
xfsdump,
|
||||
@@ -97,7 +96,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
lvm2
|
||||
nilfs-utils
|
||||
ntfs3g
|
||||
reiserfsprogs
|
||||
udftools
|
||||
xfsprogs
|
||||
xfsdump
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
libsForQt5,
|
||||
qt6Packages,
|
||||
python3,
|
||||
testers,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "gpgme";
|
||||
version = "2.0.1";
|
||||
|
||||
@@ -32,10 +33,16 @@ stdenv.mkDerivation rec {
|
||||
outputBin = "dev"; # gpgme-config; not so sure about gpgme-tool
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnupg/gpgme/gpgme-${version}.tar.bz2";
|
||||
url = "mirror://gnupg/gpgme/gpgme-${finalAttrs.version}.tar.bz2";
|
||||
hash = "sha256-ghqwaVyELqtRdSqBmAySsEEMfq3QQQP3kdXSpSZ4SWY=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# remove -unknown suffix from pkgconfig version
|
||||
substituteInPlace autogen.sh \
|
||||
--replace-fail 'tmp="-unknown"' 'tmp=""'
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Don't use deprecated LFS64 APIs (removed in musl 1.2.4)
|
||||
# https://dev.gnupg.org/D600
|
||||
@@ -92,6 +99,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
passthru.tests = {
|
||||
inherit gpa;
|
||||
pkg-config = testers.hasPkgConfigModules {
|
||||
package = finalAttrs.finalPackage;
|
||||
versionCheck = true;
|
||||
};
|
||||
python = python3.pkgs.gpgme;
|
||||
qt5 = libsForQt5.qgpgme;
|
||||
qt6 = qt6Packages.qgpgme;
|
||||
@@ -99,7 +110,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
meta = {
|
||||
homepage = "https://gnupg.org/software/gpgme/index.html";
|
||||
changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;f=NEWS;hb=gpgme-${version}";
|
||||
changelog = "https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;f=NEWS;hb=gpgme-${finalAttrs.version}";
|
||||
description = "Library for making GnuPG easier to use";
|
||||
longDescription = ''
|
||||
GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG
|
||||
@@ -111,7 +122,11 @@ stdenv.mkDerivation rec {
|
||||
lgpl21Plus
|
||||
gpl3Plus
|
||||
];
|
||||
pkgConfigModules = [
|
||||
"gpgme"
|
||||
"gpgme-glib"
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
lib,
|
||||
libgpg-error,
|
||||
stdenv,
|
||||
testers,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
@@ -16,6 +17,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-1HlgScBnCKJvMJb3SO8JU0fho8HlcFYXAf6VLD9WU4I=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
# remove -unknown suffix from pkgconfig version
|
||||
substituteInPlace cmake/modules/G10GetFullVersion.cmake \
|
||||
--replace-fail '"''${version}-unknown"' '"''${version}"'
|
||||
'';
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"dev"
|
||||
@@ -35,12 +42,20 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
libgpg-error
|
||||
];
|
||||
|
||||
passthru.tests = {
|
||||
pkg-config = testers.hasPkgConfigModules {
|
||||
package = finalAttrs.finalPackage;
|
||||
versionCheck = true;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
changelog = "https://dev.gnupg.org/source/gpgmepp/browse/master/NEWS;gpgmepp-${finalAttrs.version}?as=remarkup";
|
||||
description = "C++ bindings/wrapper for GPGME";
|
||||
homepage = "https://dev.gnupg.org/source/gpgmepp";
|
||||
license = lib.licenses.lgpl21Plus;
|
||||
maintainers = [ lib.maintainers.dotlambda ];
|
||||
pkgConfigModules = [ "gpgmepp" ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
commit e49b934b77a76443005f92a737dae7370b50e5f7
|
||||
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
|
||||
Date: Tue Jan 23 19:39:03 2024 -0600
|
||||
|
||||
[libgroff]: Fix underspecified getenv() prototype.
|
||||
|
||||
* src/libs/libgroff/getopt.c: Do it. Seen when building groff on a
|
||||
non-glibc-based system (clang 17 complains).
|
||||
|
||||
---
|
||||
Link: https://lists.libreplanet.org/archive/html/groff-commit/2024-01/msg00103.html
|
||||
diff --git a/src/libs/libgroff/getopt.c b/src/libs/libgroff/getopt.c
|
||||
index 6d4ee5b3a..77f8da1ed 100644
|
||||
--- a/src/libs/libgroff/getopt.c
|
||||
+++ b/src/libs/libgroff/getopt.c
|
||||
@@ -124,7 +124,7 @@ static struct _getopt_data getopt_data;
|
||||
whose names are inconsistent. */
|
||||
|
||||
#ifndef getenv
|
||||
-extern char *getenv ();
|
||||
+extern char *getenv (const char *);
|
||||
#endif
|
||||
|
||||
#endif /* not __GNU_LIBRARY__ */
|
||||
@@ -34,6 +34,12 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-a5dX9ZK3UYtJAutq9+VFcL3Mujeocf3bLTCuOGNRHBM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Backport e49b934 "Fix underspecified `getenv()` prototype." for non-glibc systems with C23
|
||||
# This can be dropped in the next release, when the local getopt implementation in libgroff is removed
|
||||
./fix-underspecified-getenv-prototype.patch
|
||||
];
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
"man"
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
fetchpatch,
|
||||
pkg-config,
|
||||
glib,
|
||||
freetype,
|
||||
@@ -34,13 +35,22 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "harfbuzz${lib.optionalString withIcu "-icu"}";
|
||||
version = "12.2.0";
|
||||
version = "12.3.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/harfbuzz/harfbuzz/releases/download/${finalAttrs.version}/harfbuzz-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-7LYDqkJqiyRmVxhme9pkqEwVBNt0VO5Mrb02Lupk5UU=";
|
||||
hash = "sha256-hmDr08J9lAf8hDO10XK6+6XwMXywu0M58o5TcMk9Qrc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
# https://github.com/harfbuzz/harfbuzz/security/advisories/GHSA-xvjr-f2r9-c7ww
|
||||
name = "CVE-2026-22693.patch";
|
||||
url = "https://github.com/harfbuzz/harfbuzz/commit/1265ff8d990284f04d8768f35b0e20ae5f60daae.patch";
|
||||
hash = "sha256-mdgIhp1ndPSfzplBRB7s+BN2T5Z9dEYZ0bAmSDCUPSE=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs src/*.py test
|
||||
''
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hwdata";
|
||||
version = "0.402";
|
||||
version = "0.403";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vcrhonek";
|
||||
repo = "hwdata";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-akLI2MdF6BDwvSoKt1jhlMyhKQv4TWxLFZWF7ivIezA=";
|
||||
hash = "sha256-90Op2armm7Fg0Eyj5+Md0IMos915wqjv8cqTYVJF/NA=";
|
||||
};
|
||||
|
||||
doCheck = false; # this does build machine-specific checks (e.g. enumerates PCI bus)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
lib,
|
||||
fetchurl,
|
||||
fetchFromGitHub,
|
||||
patchelfUnstable,
|
||||
}:
|
||||
|
||||
buildNpmPackage {
|
||||
@@ -30,6 +31,23 @@ buildNpmPackage {
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
patchelfUnstable # --clear-execstack is only available on 0.18
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# glibc 2.41+ refuses to make the stack executable if it isn't executable,
|
||||
# but a library loaded via `dlopen()` mandates it.
|
||||
# According to https://github.com/holepunchto/sodium-native/issues/214
|
||||
# this isn't necessary in this case.
|
||||
while IFS= read -r -d ''' file; do
|
||||
# Skip PEs with the same name
|
||||
if patchelf --print-rpath "$file" &>/dev/null; then
|
||||
patchelf "$file" --clear-execstack
|
||||
fi
|
||||
done < <(find $out/lib/node_modules -name 'sodium-native.node' -print0)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "HyperCmd Utils";
|
||||
homepage = "https://github.com/holepunchto/hyper-cmd-utils";
|
||||
|
||||
-5272
File diff suppressed because it is too large
Load Diff
@@ -1,42 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "hypercore";
|
||||
version = "11.13.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "holepunchto";
|
||||
repo = "hypercore";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-YaSmKjJKWkA4UUK/1LF9wqS4PvdFHrrc+yzvz+QmL0A=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-ZJxVmQWKgHyKkuYfGIlANXFcROjI7fibg6mxIhDZowM=";
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} ./package-lock.json
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--generate-lockfile"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Secure, distributed append-only log";
|
||||
homepage = "https://github.com/holepunchto/hypercore";
|
||||
license = lib.licenses.mit;
|
||||
teams = with lib.teams; [ ngi ];
|
||||
maintainers = [ lib.maintainers.goodylove ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
|
||||
})
|
||||
@@ -3,6 +3,7 @@
|
||||
lib,
|
||||
fetchurl,
|
||||
fetchFromGitHub,
|
||||
patchelfUnstable,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
@@ -28,8 +29,25 @@ buildNpmPackage rec {
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
patchelfUnstable # --clear-execstack is only available on 0.18
|
||||
];
|
||||
|
||||
doInstallCheck = true;
|
||||
|
||||
postInstall = ''
|
||||
# glibc 2.41+ refuses to make the stack executable if it isn't executable,
|
||||
# but a library loaded via `dlopen()` mandates it.
|
||||
# According to https://github.com/holepunchto/sodium-native/issues/214
|
||||
# this isn't necessary in this case.
|
||||
while IFS= read -r -d ''' file; do
|
||||
# Skip PEs with the same name
|
||||
if patchelf --print-rpath "$file" &>/dev/null; then
|
||||
patchelf "$file" --clear-execstack
|
||||
fi
|
||||
done < <(find $out/lib/node_modules -name 'sodium-native.node' -print0)
|
||||
'';
|
||||
|
||||
installCheckPhase = ''
|
||||
$out/bin/hypershell --help
|
||||
'';
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
lib,
|
||||
patchelfUnstable,
|
||||
}:
|
||||
|
||||
buildNpmPackage {
|
||||
@@ -30,6 +31,23 @@ buildNpmPackage {
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
patchelfUnstable # --clear-execstack is only available on 0.18
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
# glibc 2.41+ refuses to make the stack executable if it isn't executable,
|
||||
# but a library loaded via `dlopen()` mandates it.
|
||||
# According to https://github.com/holepunchto/sodium-native/issues/214
|
||||
# this isn't necessary in this case.
|
||||
while IFS= read -r -d ''' file; do
|
||||
# Skip PEs with the same name
|
||||
if patchelf --print-rpath "$file" &>/dev/null; then
|
||||
patchelf "$file" --clear-execstack
|
||||
fi
|
||||
done < <(find $out/lib/node_modules -name 'sodium-native.node' -print0)
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Run SSH over hyperswarm";
|
||||
homepage = "https://github.com/mafintosh/hyperssh";
|
||||
|
||||
-4969
File diff suppressed because it is too large
Load Diff
@@ -1,41 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
buildNpmPackage (finalAttrs: {
|
||||
pname = "hyperswarm";
|
||||
version = "4.12.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "holepunchto";
|
||||
repo = "hyperswarm";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-BQ1/kNJAFoxPJ2I3dyV7EHafKfbbDqCQw039VT4YLT8=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-4ysUYFIFlzr57J7MdZit1yX3Dgpb2eY0rdYnwyppwK0=";
|
||||
|
||||
dontNpmBuild = true;
|
||||
|
||||
postPatch = ''
|
||||
cp ${./package-lock.json} ./package-lock.json
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--generate-lockfile"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Distributed Networking Stack for Connecting Peers";
|
||||
homepage = "https://github.com/holepunchto/hyperswarm";
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.unix;
|
||||
teams = with lib.teams; [ ngi ];
|
||||
maintainers = [ ];
|
||||
};
|
||||
})
|
||||
@@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
# Explicitly link against libgcc_s, to work around the infamous
|
||||
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
|
||||
LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-lgcc_s";
|
||||
env.LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-lgcc_s";
|
||||
|
||||
buildInputs = [
|
||||
ncurses
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchgit,
|
||||
fetchpatch,
|
||||
autoreconfHook,
|
||||
pkg-config,
|
||||
ell,
|
||||
@@ -14,24 +13,6 @@
|
||||
gitUpdater,
|
||||
}:
|
||||
|
||||
let
|
||||
# fix segfault in iwctl with readline-8.3
|
||||
# https://lists.gnu.org/archive/html/bug-readline/2025-07/msg00007.htmlP
|
||||
readline-patch = fetchpatch {
|
||||
url = "https://lists.gnu.org/archive/html/bug-readline/2025-07/txtmA7rksnmmi.txt";
|
||||
hash = "sha256-QSS1GUJ2i/bF2ksvUtw27oqFHuTHALi+7QwxMFt9ZaM=";
|
||||
stripLen = 2;
|
||||
};
|
||||
|
||||
myreadline = (
|
||||
readline.overrideAttrs (
|
||||
_final: prev: {
|
||||
patches = (prev.patches or [ ]) ++ [ readline-patch ];
|
||||
}
|
||||
)
|
||||
);
|
||||
in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "iwd";
|
||||
version = "3.10";
|
||||
@@ -66,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
buildInputs = [
|
||||
ell
|
||||
python3Packages.python
|
||||
myreadline
|
||||
readline
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ openssl ];
|
||||
|
||||
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
||||
];
|
||||
|
||||
# See https://trac.macports.org/ticket/60656
|
||||
LDFLAGS = if stdenv.hostPlatform.isDarwin then "-Wl,-w" else null;
|
||||
env = lib.optionalAttrs stdenv.hostPlatform.isDarwin { LDFLAGS = "-Wl,-w"; };
|
||||
|
||||
meta = {
|
||||
description = "Color management engine";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "less";
|
||||
version = "679";
|
||||
version = "685";
|
||||
|
||||
# `less` is provided by the following sources:
|
||||
# - meta.homepage
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
# homepage, and only those not marked as beta.
|
||||
src = fetchurl {
|
||||
url = "https://www.greenwoodsoftware.com/less/less-${finalAttrs.version}.tar.gz";
|
||||
hash = "sha256-m2iCDDT6igr2sOAbdPApi83UCgSJxhZJtHBYkIoVPXg=";
|
||||
hash = "sha256-JwEEHnZ+aX7kIM4IJWQc7cjyC1FXar6Z2SwWZtMy6dw=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
@@ -54,6 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
mainProgram = "less";
|
||||
maintainers = with lib.maintainers; [
|
||||
mdaniels5757
|
||||
yiyu
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libadwaita";
|
||||
version = "1.8.2";
|
||||
version = "1.8.3";
|
||||
|
||||
outputs = [
|
||||
"out"
|
||||
@@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
owner = "GNOME";
|
||||
repo = "libadwaita";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-bymC3B5mY4r7oteA6WRViWIyazt0YE6T+P+RHrYifyY=";
|
||||
hash = "sha256-IrniaMcsM1ZADNNgAmT3ELbkcwPTpYIBf8lOY4TaLd0=";
|
||||
};
|
||||
|
||||
depsBuildBuild = [
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libapparmor";
|
||||
version = "4.1.2";
|
||||
version = "4.1.3";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "apparmor";
|
||||
repo = "apparmor";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-CwWNfH2Ykv4e+8ONytdM7J+aItAMVrq0yYrYzRXAe1w=";
|
||||
hash = "sha256-8L4skun873OMZISpGm25Ana4RzTzCmKhhK5tfyEmbd8=";
|
||||
};
|
||||
sourceRoot = "${finalAttrs.src.name}/libraries/libapparmor";
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
cmake,
|
||||
nix,
|
||||
samba,
|
||||
testers,
|
||||
|
||||
# for passthru.lore
|
||||
binlore,
|
||||
@@ -102,14 +103,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
acl
|
||||
];
|
||||
|
||||
hardeningDisable = [ "strictflexarrays3" ];
|
||||
hardeningDisable = [
|
||||
"strictflexarrays3"
|
||||
]
|
||||
# some tests won't compile because this makes memcpy a macro:
|
||||
# libarchive/test/test_write_format_mtree_preset_digests.c:2020:29: error: macro "memcpy" passed 66 arguments, but takes just 3
|
||||
++ lib.optional stdenv.hostPlatform.isCygwin "fortify";
|
||||
|
||||
configureFlags = lib.optional (!xarSupport) "--without-xml2";
|
||||
|
||||
preBuild = lib.optionalString stdenv.hostPlatform.isCygwin ''
|
||||
echo "#include <windows.h>" >> config.h
|
||||
'';
|
||||
|
||||
# https://github.com/libarchive/libarchive/issues/1475
|
||||
doCheck = !stdenv.hostPlatform.isMusl;
|
||||
|
||||
@@ -140,10 +142,14 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
maintainers = with lib.maintainers; [ jcumming ];
|
||||
platforms = lib.platforms.all;
|
||||
inherit (acl.meta) badPlatforms;
|
||||
pkgConfigModules = [ "libarchive" ];
|
||||
};
|
||||
|
||||
passthru.tests = {
|
||||
inherit cmake nix samba;
|
||||
pkg-config = testers.hasPkgConfigModules {
|
||||
package = finalAttrs.finalPackage;
|
||||
};
|
||||
};
|
||||
|
||||
# bsdtar is detected as "cannot" because its exec is internal to
|
||||
|
||||
@@ -29,10 +29,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
configureFlags = [ "--sysconfdir=/etc" ];
|
||||
|
||||
LDFLAGS = lib.optionals stdenv.hostPlatform.isStatic [
|
||||
"-static-libgcc"
|
||||
"-static"
|
||||
];
|
||||
env = lib.optionalAttrs stdenv.hostPlatform.isStatic {
|
||||
LDFLAGS = toString [
|
||||
"-static-libgcc"
|
||||
"-static"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "AX.25 library for hamradio applications";
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
meson,
|
||||
ninja,
|
||||
withJava ? false,
|
||||
jdk21_headless, # Newer JDK's depend on a release with a fix for https://code.videolan.org/videolan/libbluray/-/issues/46
|
||||
jdk21, # Newer JDK's depend on a release with a fix for https://code.videolan.org/videolan/libbluray/-/issues/46
|
||||
ant,
|
||||
stripJavaArchivesHook,
|
||||
withAACS ? false,
|
||||
@@ -34,13 +34,21 @@ stdenv.mkDerivation rec {
|
||||
hash = "sha256-d5N7rwfq3aSysxHPOvTFAmnS6jFlBB9YQ9lkdsTJJ3c=";
|
||||
};
|
||||
|
||||
postPatch =
|
||||
lib.optionalString withAACS ''
|
||||
substituteInPlace src/libbluray/disc/aacs.c --replace-fail 'getenv("LIBAACS_PATH")' '"${libaacs}/lib/libaacs"'
|
||||
''
|
||||
+ lib.optionalString withBDplus ''
|
||||
substituteInPlace src/libbluray/disc/bdplus.c --replace-fail 'getenv("LIBBDPLUS_PATH")' '"${libbdplus}/lib/libbdplus"'
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
]
|
||||
++ lib.optionals withJava [
|
||||
jdk21_headless
|
||||
jdk21
|
||||
ant
|
||||
stripJavaArchivesHook
|
||||
];
|
||||
@@ -53,13 +61,13 @@ stdenv.mkDerivation rec {
|
||||
|
||||
propagatedBuildInputs = lib.optional withAACS libaacs;
|
||||
|
||||
env.JAVA_HOME = lib.optionalString withJava jdk21_headless.home; # Fails at runtime without this
|
||||
env.NIX_LDFLAGS =
|
||||
lib.optionalString withAACS "-L${libaacs}/lib -laacs"
|
||||
+ lib.optionalString withBDplus " -L${libbdplus}/lib -lbdplus";
|
||||
|
||||
mesonFlags =
|
||||
lib.optional (!withJava) "-Dbdj_jar=disabled"
|
||||
++ lib.optional withJava "-Djdk_home=${jdk21.home}"
|
||||
++ lib.optional (!withMetadata) "-dlibxml2=disabled"
|
||||
++ lib.optional (!withFonts) "-Dfreetype=disabled";
|
||||
|
||||
@@ -67,7 +75,7 @@ stdenv.mkDerivation rec {
|
||||
homepage = "http://www.videolan.org/developers/libbluray.html";
|
||||
description = "Library to access Blu-Ray disks for video playback";
|
||||
license = lib.licenses.lgpl21;
|
||||
maintainers = [ ];
|
||||
maintainers = [ lib.maintainers.amarshall ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
squid,
|
||||
tor,
|
||||
uwsgi,
|
||||
testers,
|
||||
libcap,
|
||||
}:
|
||||
|
||||
assert usePam -> pam != null;
|
||||
@@ -127,6 +129,9 @@ stdenv.mkDerivation rec {
|
||||
tor
|
||||
uwsgi
|
||||
;
|
||||
pkg-config = testers.hasPkgConfigModules {
|
||||
package = libcap;
|
||||
};
|
||||
};
|
||||
|
||||
meta = {
|
||||
@@ -134,5 +139,9 @@ stdenv.mkDerivation rec {
|
||||
homepage = "https://sites.google.com/site/fullycapable";
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.bsd3;
|
||||
pkgConfigModules = [
|
||||
"libcap"
|
||||
"libpsx"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "libcdio";
|
||||
version = "2.2.0";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "libcdio";
|
||||
repo = "libcdio";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-izjZk2kz9PkLm9+INUdl1e7jMz3nUsQKdplKI9Io+CM=";
|
||||
hash = "sha256-NZj6sMIhBORh2ZBs/WGI4BYri1REog4ovUug1t5p8Y8=";
|
||||
};
|
||||
|
||||
env = lib.optionalAttrs stdenv.hostPlatform.is32bit {
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libdecor";
|
||||
version = "0.2.4";
|
||||
version = "0.2.5";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "libdecor";
|
||||
repo = "libdecor";
|
||||
rev = version;
|
||||
hash = "sha256-l0MmNpC+449BaluynbzG5d0/v57F5rltOIBzBagkYbc=";
|
||||
hash = "sha256-sUktv/k+4IdJ55uH3F6z8XqaAOTic6miuyZ9U+NhtQQ=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libdrm";
|
||||
version = "2.4.129";
|
||||
version = "2.4.131";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dri.freedesktop.org/${pname}/${pname}-${version}.tar.xz";
|
||||
hash = "sha256-WXgYP5eNaX4mpQugZhdJZO+wq5fKoeyqG4Yfvl3fd9w=";
|
||||
hash = "sha256-RbqZg7UciWQGo9ZU3oHTE7lTt25jkeJ5cHPVQ8X2F9U=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libfabric";
|
||||
version = "2.3.1";
|
||||
version = "2.4.0";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
||||
owner = "ofiwg";
|
||||
repo = "libfabric";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Zaf7iGr2/HWiMcH7zERz5Y9YzJ0QpHCCs+bU+qmoQTI=";
|
||||
sha256 = "sha256-C8k1caArVPBTtSggvAM7S660HpP99y9vac7oyf+HW2c=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
diff --git a/src/getopt.c b/src/getopt.c
|
||||
index 4744e43..19776f3 100644
|
||||
--- a/src/getopt.c
|
||||
+++ b/src/getopt.c
|
||||
@@ -208,7 +208,7 @@ static char *posixly_correct;
|
||||
whose names are inconsistent. */
|
||||
|
||||
#ifndef getenv
|
||||
-extern char *getenv ();
|
||||
+extern char *getenv (const char *);
|
||||
#endif
|
||||
|
||||
static char *
|
||||
diff --git a/src/getopt.h b/src/getopt.h
|
||||
index b0147e9..6f1e784 100644
|
||||
--- a/src/getopt.h
|
||||
+++ b/src/getopt.h
|
||||
@@ -133,7 +133,7 @@ struct option
|
||||
errors, only prototype getopt for the GNU C library. */
|
||||
extern int getopt (int __argc, char *const *__argv, const char *__shortopts);
|
||||
# else /* not __GNU_LIBRARY__ */
|
||||
-extern int getopt ();
|
||||
+extern int getopt (int, char *const*, const char *);
|
||||
# endif /* __GNU_LIBRARY__ */
|
||||
|
||||
# ifndef __need_getopt
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user