Merge branch 'master' into haskell-updates

This commit is contained in:
Vladimír Čunát 2024-01-25 15:03:20 +01:00
commit 3f23d91f84
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
283 changed files with 2776 additions and 1920 deletions

View File

@ -86,9 +86,9 @@ One advantage is that when `pkgs.zlib` is updated, it will automatically update
postPatch = pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
substituteInPlace configure \
--replace '/usr/bin/libtool' 'ar' \
--replace 'AR="libtool"' 'AR="ar"' \
--replace 'ARFLAGS="-o"' 'ARFLAGS="-r"'
--replace-fail '/usr/bin/libtool' 'ar' \
--replace-fail 'AR="libtool"' 'AR="ar"' \
--replace-fail 'ARFLAGS="-o"' 'ARFLAGS="-r"'
'';
})
```

View File

@ -701,7 +701,7 @@ with import <nixpkgs> {};
hello = attrs: lib.optionalAttrs (lib.versionAtLeast attrs.version "1.0") {
postPatch = ''
substituteInPlace lib/zoneinfo.rs \
--replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
--replace-fail "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
'';
};
};

View File

@ -54,7 +54,7 @@ Some common issues when packaging software for Darwin:
# ...
prePatch = ''
substituteInPlace Makefile \
--replace '/usr/bin/xcrun clang' clang
--replace-fail '/usr/bin/xcrun clang' clang
'';
}
```

View File

@ -230,9 +230,9 @@ stdenv.mkDerivation rec {
postInstall = ''
substituteInPlace $out/bin/solo5-virtio-mkimage \
--replace "/usr/lib/syslinux" "${syslinux}/share/syslinux" \
--replace "/usr/share/syslinux" "${syslinux}/share/syslinux" \
--replace "cp " "cp --no-preserve=mode "
--replace-fail "/usr/lib/syslinux" "${syslinux}/share/syslinux" \
--replace-fail "/usr/share/syslinux" "${syslinux}/share/syslinux" \
--replace-fail "cp " "cp --no-preserve=mode "
wrapProgram $out/bin/solo5-virtio-mkimage \
--prefix PATH : ${lib.makeBinPath [ dosfstools mtools parted syslinux ]}
@ -1253,9 +1253,20 @@ postInstall = ''
Performs string substitution on the contents of \<infile\>, writing the result to \<outfile\>. The substitutions in \<subs\> are of the following form:
#### `--replace` \<s1\> \<s2\> {#fun-substitute-replace}
#### `--replace-fail` \<s1\> \<s2\> {#fun-substitute-replace-fail}
Replace every occurrence of the string \<s1\> by \<s2\>.
Will error if no change is made.
#### `--replace-warn` \<s1\> \<s2\> {#fun-substitute-replace-warn}
Replace every occurrence of the string \<s1\> by \<s2\>.
Will print a warning if no change is made.
#### `--replace-quiet` \<s1\> \<s2\> {#fun-substitute-replace-quiet}
Replace every occurrence of the string \<s1\> by \<s2\>.
Will do nothing if no change can be made.
#### `--subst-var` \<varName\> {#fun-substitute-subst-var}
@ -1269,8 +1280,8 @@ Example:
```shell
substitute ./foo.in ./foo.out \
--replace /usr/bin/bar $bar/bin/bar \
--replace "a string containing spaces" "some other text" \
--replace-fail /usr/bin/bar $bar/bin/bar \
--replace-fail "a string containing spaces" "some other text" \
--subst-var someVar
```

View File

@ -7432,6 +7432,12 @@
githubId = 1401179;
name = "Guanpeng Xu";
};
herbetom = {
email = "nixos@tomherbers.de";
github = "herbetom";
githubId = 15121114;
name = "Tom Herbers";
};
hexa = {
email = "hexa@darmstadt.ccc.de";
matrix = "@hexa:lossy.network";

View File

@ -92,6 +92,24 @@ To use your custom kernel package in your NixOS configuration, set
boot.kernelPackages = pkgs.linuxPackagesFor yourCustomKernel;
```
## Rust {#sec-linux-rust}
The Linux kernel does not have Rust language support enabled by
default. For kernel versions 6.7 or newer, experimental Rust support
can be enabled. In a NixOS configuration, set:
```nix
boot.kernelPatches = [
{
name = "Rust Support";
patch = null;
features = {
rust = true;
};
}
];
```
## Developing kernel modules {#sec-linux-config-developing-modules}
This section was moved to the [Nixpkgs manual](https://nixos.org/nixpkgs/manual#sec-linux-kernel-developing-modules).

View File

@ -133,6 +133,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- `services.resolved.fallbackDns` can now be used to disable the upstream fallback servers entirely by setting it to an empty list. To get the previous behaviour of the upstream defaults set it to null, the new default, instead.
- `xxd` has been moved from `vim` default output to its own output to reduce closure size. The canonical way to reference it across all platforms is `unixtools.xxd`.
- `services.avahi.nssmdns` got split into `services.avahi.nssmdns4` and `services.avahi.nssmdns6` which enable the mDNS NSS switch for IPv4 and IPv6 respectively.
Since most mDNS responders only register IPv4 addresses, most users want to keep the IPv6 support disabled to avoid long timeouts.
@ -231,6 +233,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
- The option [`services.nextcloud.config.dbport`] of the Nextcloud module was removed to match upstream.
The port can be specified in [`services.nextcloud.config.dbhost`](#opt-services.nextcloud.config.dbhost).
- `stdenv`: The `--replace` flag in `substitute`, `substituteInPlace`, `substituteAll`, `substituteAllStream`, and `substituteStream` is now deprecated if favor of the new `--replace-fail`, `--replace-warn` and `--replace-quiet`. The deprecated `--replace` equates to `--replace-warn`.
- The Yama LSM is now enabled by default in the kernel, which prevents ptracing
non-child processes. This means you will not be able to attach gdb to an
existing process, but will need to start that process from gdb (so it is a

View File

@ -195,7 +195,6 @@
./programs/haguichi.nix
./programs/hamster.nix
./programs/htop.nix
./programs/hyprland.nix
./programs/iay.nix
./programs/iftop.nix
./programs/i3lock.nix
@ -273,6 +272,7 @@
./programs/wavemon.nix
./programs/wayland/cardboard.nix
./programs/wayland/labwc.nix
./programs/wayland/hyprland.nix
./programs/wayland/river.nix
./programs/wayland/sway.nix
./programs/wayland/waybar.nix

View File

@ -14,20 +14,20 @@ JWE files have to be created through the clevis command line. 3 types of policie
Secrets are pinned against the presence of a TPM2 device, for example:
```
echo hi | clevis encrypt tpm2 '{}' > hi.jwe
echo -n hi | clevis encrypt tpm2 '{}' > hi.jwe
```
2) Tang policies
Secrets are pinned against the presence of a Tang server, for example:
```
echo hi | clevis encrypt tang '{"url": "http://tang.local"}' > hi.jwe
echo -n hi | clevis encrypt tang '{"url": "http://tang.local"}' > hi.jwe
```
3) Shamir Secret Sharing
Using Shamir's Secret Sharing ([sss](https://en.wikipedia.org/wiki/Shamir%27s_secret_sharing)), secrets are pinned using a combination of the two preceding policies. For example:
```
echo hi | clevis encrypt sss \
echo -n hi | clevis encrypt sss \
'{"t": 2, "pins": {"tpm2": {"pcr_ids": "0"}, "tang": {"url": "http://tang.local"}}}' \
> hi.jwe
```

View File

@ -1076,7 +1076,7 @@ in
boot.initrd.systemd = {
contents."/etc/crypttab".source = stage1Crypttab;
extraBin.systemd-cryptsetup = "${config.boot.initrd.systemd.package}/lib/systemd/systemd-cryptsetup";
extraBin.systemd-cryptsetup = "${config.boot.initrd.systemd.package}/bin/systemd-cryptsetup";
additionalUpstreamUnits = [
"cryptsetup-pre.target"
@ -1084,7 +1084,7 @@ in
"remote-cryptsetup.target"
];
storePaths = [
"${config.boot.initrd.systemd.package}/lib/systemd/systemd-cryptsetup"
"${config.boot.initrd.systemd.package}/bin/systemd-cryptsetup"
"${config.boot.initrd.systemd.package}/lib/systemd/system-generators/systemd-cryptsetup-generator"
];

View File

@ -70,6 +70,7 @@ let
"systemd-tmpfiles-setup.service"
"timers.target"
"umount.target"
"systemd-bsod.service"
] ++ cfg.additionalUpstreamUnits;
upstreamWants = [
@ -424,6 +425,7 @@ in {
storePaths = [
# systemd tooling
"${cfg.package}/lib/systemd/systemd-executor"
"${cfg.package}/lib/systemd/systemd-fsck"
"${cfg.package}/lib/systemd/systemd-hibernate-resume"
"${cfg.package}/lib/systemd/systemd-journald"
@ -433,6 +435,7 @@ in {
"${cfg.package}/lib/systemd/systemd-shutdown"
"${cfg.package}/lib/systemd/systemd-sulogin-shell"
"${cfg.package}/lib/systemd/systemd-sysctl"
"${cfg.package}/lib/systemd/systemd-bsod"
# generators
"${cfg.package}/lib/systemd/system-generators/systemd-debug-generator"

View File

@ -451,6 +451,7 @@ in {
kerberos = handleTest ./kerberos/default.nix {};
kernel-generic = handleTest ./kernel-generic.nix {};
kernel-latest-ath-user-regd = handleTest ./kernel-latest-ath-user-regd.nix {};
kernel-rust = runTestOn ["x86_64-linux"] ./kernel-rust.nix;
keter = handleTest ./keter.nix {};
kexec = handleTest ./kexec.nix {};
keycloak = discoverTests (import ./keycloak.nix);

View File

@ -0,0 +1,30 @@
{ pkgs, ... }: {
name = "kernel-rust";
meta = with pkgs.lib.maintainers; {
maintainers = [ blitz ];
};
nodes.machine = { config, pkgs, ... }:
{
boot.kernelPackages = pkgs.linuxPackages_testing;
boot.extraModulePackages = [
config.boot.kernelPackages.rust-out-of-tree-module
];
boot.kernelPatches = [
{
name = "Rust Support";
patch = null;
features = {
rust = true;
};
}
];
};
testScript = ''
machine.wait_for_unit("default.target")
machine.succeed("modprobe rust_out_of_tree")
'';
}

View File

@ -21,11 +21,11 @@ assert withConplay -> !libOnly;
stdenv.mkDerivation rec {
pname = "${lib.optionalString libOnly "lib"}mpg123";
version = "1.32.3";
version = "1.32.4";
src = fetchurl {
url = "mirror://sourceforge/mpg123/mpg123-${version}.tar.bz2";
hash = "sha256-LZkTpX1O6PSXoYLG6CWCYCQJeCpPtIHpif7r9ENYZ7Q=";
hash = "sha256-WplmQzj7L3UbZi9A7iWATQydtrV13LXOdBxtxkIkoIo=";
};
outputs = [ "out" "dev" "man" ] ++ lib.optional withConplay "conplay";

View File

@ -48,13 +48,13 @@ let
} else portaudio;
in stdenv'.mkDerivation (finalAttrs: {
pname = "musescore";
version = "4.2.0";
version = "4.2.1";
src = fetchFromGitHub {
owner = "musescore";
repo = "MuseScore";
rev = "v${finalAttrs.version}";
sha256 = "sha256-vNA1VPCHLt5kuhIix8kgeq1VlbuIX1lOY3nJaufvuyc=";
sha256 = "sha256-YCeO/ijxA+tZxNviqmlIBkAdjPTrKoOoo1QyMIOqhWU=";
};
cmakeFlags = [

View File

@ -10,16 +10,16 @@ let
inherit tiling_wm;
};
stableVersion = {
version = "2023.1.1.27"; # "Android Studio Hedgehog | 2023.1.1 Patch 1"
sha256Hash = "sha256-XF+XyHGk7dPTBHKcx929qdFHu6hRJWFO382mh4SuWDs=";
version = "2023.1.1.28"; # "Android Studio Hedgehog | 2023.1.1 Patch 2"
sha256Hash = "sha256-E50Nu0kJNTto+/VcCbbTGjRRIESp1PAs4PGprMyhKPk=";
};
betaVersion = {
version = "2023.2.1.20"; # "Android Studio Iguana | 2023.2.1 Beta 2"
sha256Hash = "sha256-cFEPgFAKkFx0d7PC4fTElTQVrBZMQs0RL3wR+hqTh2I=";
};
latestVersion = {
version = "2023.3.1.4"; # "Android Studio Jellyfish | 2023.3.1 Canary 4"
sha256Hash = "sha256-txHkRZ87KnZvzbpBA19mZzQ0HKHWAJsSnNlQCUDsWmA=";
version = "2023.3.1.5"; # "Android Studio Jellyfish | 2023.3.1 Canary 5"
sha256Hash = "sha256-cxlACtSpDBoM5KHAWCEvqPbuKnvH7aDzOo3P+Folgqk=";
};
in {
# Attributes are named by their corresponding release channels

View File

@ -12,11 +12,10 @@
# now defaults to false because some tests can be flaky (clipboard etc), see
# also: https://github.com/neovim/neovim/issues/16233
, doCheck ? false
, nodejs ? null, fish ? null, python3 ? null
}:
let
stdenv.mkDerivation (finalAttrs:
let
nvim-lpeg-dylib = luapkgs: if stdenv.isDarwin
then (luapkgs.lpeg.overrideAttrs (oa: {
preConfigure = ''
@ -42,7 +41,7 @@ let
(nvim-lpeg-dylib ps)
luabitop
mpack
] ++ lib.optionals doCheck [
] ++ lib.optionals finalAttrs.doCheck [
luv
coxpcall
busted
@ -64,17 +63,17 @@ let
in deterministicLuajit.withPackages(ps: [ ps.mpack (nvim-lpeg-dylib ps) ])
else lua.luaOnBuild;
pyEnv = python3.withPackages(ps: with ps; [ pynvim msgpack ]);
in
stdenv.mkDerivation rec {
in {
pname = "neovim-unwrapped";
version = "0.9.5";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "neovim";
repo = "neovim";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-CcaBqA0yFCffNPmXOJTo8c9v1jrEBiqAl8CG5Dj5YxE=";
};
@ -87,7 +86,7 @@ in
dontFixCmake = true;
inherit lua;
inherit lua treesitter-parsers;
buildInputs = [
gperf
@ -105,15 +104,17 @@ in
tree-sitter
unibilium
] ++ lib.optionals stdenv.isDarwin [ libiconv CoreServices ]
++ lib.optionals doCheck [ glibcLocales procps ]
++ lib.optionals finalAttrs.doCheck [ glibcLocales procps ]
;
inherit doCheck;
doCheck = false;
# to be exhaustive, one could run
# make oldtests too
checkPhase = ''
runHook preCheck
make functionaltest
runHook postCheck
'';
nativeBuildInputs = [
@ -123,7 +124,9 @@ in
];
# extra programs test via `make functionaltest`
nativeCheckInputs = [
nativeCheckInputs = let
pyEnv = python3.withPackages(ps: with ps; [ pynvim msgpack ]);
in [
fish
nodejs
pyEnv # for src/clint.py
@ -166,11 +169,11 @@ in
ln -s \
${tree-sitter.buildGrammar {
inherit language src;
version = "neovim-${version}";
version = "neovim-${finalAttrs.version}";
}}/parser \
$out/lib/nvim/parser/${language}.so
'')
treesitter-parsers);
finalAttrs.treesitter-parsers);
shellHook=''
export VIMRUNTIME=$PWD/runtime
@ -199,4 +202,4 @@ in
maintainers = with maintainers; [ manveru rvolosatovs ];
platforms = platforms.unix;
};
}
})

View File

@ -102,7 +102,7 @@ let
--replace 'Name=Neovim' 'Name=Neovim wrapper'
''
+ lib.optionalString finalAttrs.withPython3 ''
makeWrapper ${python3Env.interpreter} $out/bin/nvim-python3 --unset PYTHONPATH
makeWrapper ${python3Env.interpreter} $out/bin/nvim-python3 --unset PYTHONPATH --unset PYTHONSAFEPATH
''
+ lib.optionalString (finalAttrs.rubyEnv != null) ''
ln -s ${finalAttrs.rubyEnv}/bin/neovim-ruby-host $out/bin/nvim-ruby

View File

@ -1,12 +1,14 @@
{ lib, fetchFromGitHub }:
rec {
version = "9.0.2116";
version = "9.1.0004";
outputs = [ "out" "xxd" ];
src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
hash = "sha256-ZKcNg/RrjvEsxpIcTjzQYi1xig3zLeTV+PXaBb4gUuM=";
hash = "sha256-Y5ZSJLEFdptEMA0xvstr6H1G4iiaYXpkJGSSFwoTfc0=";
};
enableParallelBuilding = true;
@ -14,12 +16,21 @@ rec {
hardeningDisable = [ "fortify" ];
postPatch =
# Use man from $PATH; escape sequences are still problematic.
''
substituteInPlace runtime/ftplugin/man.vim \
--replace "/usr/bin/man " "man "
'';
# Use man from $PATH; escape sequences are still problematic.
postPatch = ''
substituteInPlace runtime/ftplugin/man.vim \
--replace "/usr/bin/man " "man "
'';
# man page moving is done in postFixup instead of postInstall otherwise fixupPhase moves it right back where it was
postFixup = ''
moveToOutput bin/xxd "$xxd"
moveToOutput share/man/man1/xxd.1.gz "$xxd"
for manFile in $out/share/man/*/man1/xxd.1*; do
# moveToOutput does not take full paths or wildcards...
moveToOutput "share/man/$(basename "$(dirname "$(dirname "$manFile")")")/man1/xxd.1.gz" "$xxd"
done
'';
meta = with lib; {
description = "The most popular clone of the VI editor";
@ -28,5 +39,6 @@ rec {
maintainers = with maintainers; [ das_j equirosa ];
platforms = platforms.unix;
mainProgram = "vim";
outputsToInstall = [ "out" "xxd" ];
};
}

View File

@ -15,7 +15,7 @@ in
stdenv.mkDerivation {
pname = "vim";
inherit (common) version src postPatch hardeningDisable enableParallelBuilding enableParallelInstalling meta;
inherit (common) version outputs src postPatch hardeningDisable enableParallelBuilding enableParallelInstalling postFixup meta;
nativeBuildInputs = [ gettext pkg-config ];
buildInputs = [ ncurses bash gawk ]
@ -62,11 +62,4 @@ stdenv.mkDerivation {
'';
__impureHostDeps = [ "/dev/ptmx" ];
# To fix the trouble in vim73, that it cannot cross-build with this patch
# to bypass a configure script check that cannot be done cross-building.
# http://groups.google.com/group/vim_dev/browse_thread/thread/66c02efd1523554b?pli=1
# patchPhase = ''
# sed -i -e 's/as_fn_error.*int32.*/:/' src/auto/configure
# '';
}

View File

@ -66,7 +66,7 @@ in stdenv.mkDerivation {
pname = "vim-full";
inherit (common) version postPatch hardeningDisable enableParallelBuilding meta;
inherit (common) version outputs postPatch hardeningDisable enableParallelBuilding meta;
src = builtins.getAttr source {
default = common.src; # latest release
@ -181,7 +181,7 @@ in stdenv.mkDerivation {
ln -sfn '${nixosRuntimepath}' "$out"/share/vim/vimrc
'';
postFixup = lib.optionalString wrapPythonDrv ''
postFixup = common.postFixup + lib.optionalString wrapPythonDrv ''
wrapProgram "$out/bin/vim" --prefix PATH : "${python3}/bin" \
--set NIX_PYTHONPATH "${python3}/${python3.sitePackages}"
'';

View File

@ -16419,5 +16419,17 @@ final: prev:
meta.homepage = "https://github.com/jhradilek/vim-snippets/";
};
haskell-scope-highlighting-nvim = buildVimPlugin {
pname = "haskell-scope-highlighting-nvim";
version = "2023-04-29";
src = fetchFromGitHub {
owner = "kiyoon";
repo = "haskell-scope-highlighting.nvim";
rev = "ffeda85bae909816cbbf9d061aea9115cf8166f2";
sha256 = "sha256-f0y6rU0IqN8RZ7d1iyvHot2zLQ0yt4JOZhpdhlGZrqc=";
};
meta.homepage = "https://github.com/kiyoon/haskell-scope-highlighting.nvim/";
};
}

View File

@ -97,7 +97,6 @@
, errcheck
, go-motion
, go-tools
, gocode
, gocode-gomod
, godef
, gogetdoc
@ -110,6 +109,7 @@
, iferr
, impl
, reftools
, revive
, # hurl dependencies
hurl
, # must be lua51Packages
@ -670,6 +670,10 @@
dependencies = with self; [ plenary-nvim ];
};
haskell-scope-highlighting-nvim = super.haskell-scope-highlighting-nvim.overrideAttrs {
dependencies = with self; [ nvim-treesitter ];
};
hex-nvim = super.hex-nvim.overrideAttrs {
postPatch = ''
substituteInPlace lua/hex.lua --replace xxd ${xxd}/bin/xxd
@ -1530,13 +1534,11 @@
vim-go =
let
binPath = lib.makeBinPath [
# TODO: package commented packages
asmfmt
delve
errcheck
go-motion
go-tools # contains staticcheck
gocode
go-tools # contains staticcheck, keyify
gocode-gomod
godef
gogetdoc
@ -1544,15 +1546,12 @@
golangci-lint
gomodifytags
gopls
# gorename
gotags
gotools
# guru
gotools # contains guru, gorename
iferr
impl
# keyify
reftools
# revive
revive
];
in
super.vim-go.overrideAttrs {

View File

@ -347,6 +347,7 @@ https://github.com/m4xshen/hardtime.nvim/,HEAD,
https://git.sr.ht/~sircmpwn/hare.vim,HEAD,
https://github.com/ThePrimeagen/harpoon/,master,
https://github.com/ThePrimeagen/harpoon/,harpoon2,harpoon2
https://github.com/kiyoon/haskell-scope-highlighting.nvim/,HEAD,
https://github.com/MrcJkb/haskell-tools.nvim/,HEAD,
https://github.com/neovimhaskell/haskell-vim/,,
https://github.com/wenzel-hoffman/haskell-with-unicode.vim/,HEAD,

View File

@ -63,7 +63,7 @@ stdenv.mkDerivation ({
install -Dt ${coreDir} ${coreFilename}
makeWrapper ${retroarch}/bin/retroarch $out/bin/${mainProgram} \
--add-flags "-L ${coreDir}/${coreFilename} $@"
--add-flags "-L ${coreDir}/${coreFilename}"
runHook postInstall
'';

View File

@ -3,6 +3,7 @@
bison, flex, fontforge, makeWrapper, pkg-config,
nixosTests,
supportFlags,
wineRelease,
patches,
moltenvk,
buildScript ? null, configureFlags ? [], mainProgram ? "wine"
@ -46,7 +47,7 @@ stdenv.mkDerivation ((lib.optionalAttrs (buildScript != null) {
}) // rec {
inherit version src;
pname = prevName + lib.optionalString supportFlags.waylandSupport "-wayland";
pname = prevName + lib.optionalString (wineRelease == "wayland") "-wayland";
# Fixes "Compiler cannot create executables" building wineWow with mingwSupport
strictDeps = true;

View File

@ -36,7 +36,7 @@
sdlSupport ? false,
usbSupport ? false,
mingwSupport ? wineRelease != "stable",
waylandSupport ? wineRelease == "wayland",
waylandSupport ? stdenv.isLinux,
x11Support ? stdenv.isLinux,
embedInstallers ? false, # The Mono and Gecko MSI installers
moltenvk ? darwin.moltenvk # Allow users to override MoltenVK easily

View File

@ -8,7 +8,7 @@ let
in with src; {
wine32 = pkgsi686Linux.callPackage ./base.nix {
pname = "wine";
inherit src version supportFlags patches moltenvk;
inherit src version supportFlags patches moltenvk wineRelease;
pkgArches = [ pkgsi686Linux ];
geckos = [ gecko32 ];
mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc ];
@ -17,7 +17,7 @@ in with src; {
};
wine64 = callPackage ./base.nix {
pname = "wine64";
inherit src version supportFlags patches moltenvk;
inherit src version supportFlags patches moltenvk wineRelease;
pkgArches = [ pkgs ];
mingwGccs = with pkgsCross; [ mingwW64.buildPackages.gcc ];
geckos = [ gecko64 ];
@ -28,7 +28,7 @@ in with src; {
};
wineWow = callPackage ./base.nix {
pname = "wine-wow";
inherit src version supportFlags patches moltenvk;
inherit src version supportFlags patches moltenvk wineRelease;
stdenv = stdenv_32bit;
pkgArches = [ pkgs pkgsi686Linux ];
geckos = [ gecko32 gecko64 ];
@ -44,7 +44,8 @@ in with src; {
};
wineWow64 = callPackage ./base.nix {
pname = "wine-wow64";
inherit src version supportFlags patches moltenvk;
inherit src version patches moltenvk wineRelease;
supportFlags = supportFlags // { mingwSupport = true; }; # Required because we request "--enable-archs=x86_64"
pkgArches = [ pkgs ];
mingwGccs = with pkgsCross; [ mingw32.buildPackages.gcc mingwW64.buildPackages.gcc ];
geckos = [ gecko64 ];

View File

@ -24,27 +24,27 @@ let fetchurl = args@{url, hash, ...}:
in rec {
stable = fetchurl rec {
version = "8.0.2";
url = "https://dl.winehq.org/wine/source/8.0/wine-${version}.tar.xz";
hash = "sha256-bsj7byxy1XbLEfUrL41Zr2RASAIVRlHRIrmEZtkdyEc=";
version = "9.0";
url = "https://dl.winehq.org/wine/source/9.0/wine-${version}.tar.xz";
hash = "sha256-fP0JClOV9bdtlbtd76yKMSyN5MBwwRY7i1jaODMMpu4=";
## see http://wiki.winehq.org/Gecko
gecko32 = fetchurl rec {
version = "2.47.3";
version = "2.47.4";
url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86.msi";
hash = "sha256-5bmwbTzjVWRqjS5y4ETjfh4MjRhGTrGYWtzRh6f0jgE=";
hash = "sha256-Js7MR3BrCRkI9/gUvdsHTGG+uAYzGOnvxaf3iYV3k9Y=";
};
gecko64 = fetchurl rec {
version = "2.47.3";
version = "2.47.4";
url = "https://dl.winehq.org/wine/wine-gecko/${version}/wine-gecko-${version}-x86_64.msi";
hash = "sha256-pT7pVDkrbR/j1oVF9uTiqXr7yNyLA6i0QzSVRc4TlnU=";
hash = "sha256-5ZC32YijLWqkzx2Ko6o9M3Zv3Uz0yJwtzCCV7LKNBm8=";
};
## see http://wiki.winehq.org/Mono
mono = fetchurl rec {
version = "7.4.0";
version = "8.1.0";
url = "https://dl.winehq.org/wine/wine-mono/${version}/wine-mono-${version}-x86.msi";
hash = "sha256-ZBP/Mo679+x2icZI/rNUbYEC3thlB50fvwMxsUs6sOw=";
hash = "sha256-DtPsUzrvebLzEhVZMc97EIAAmsDFtMK8/rZ4rJSOCBA=";
};
patches = [
@ -69,9 +69,9 @@ in rec {
unstable = fetchurl rec {
# NOTE: Don't forget to change the hash for staging as well.
version = "9.0-rc1";
version = "9.0";
url = "https://dl.winehq.org/wine/source/9.0/wine-${version}.tar.xz";
hash = "sha256-GDd3V74ffxeGzopWqET2ZXKIH/z3RcC0yjTwmmDi8zA=";
hash = "sha256-fP0JClOV9bdtlbtd76yKMSyN5MBwwRY7i1jaODMMpu4=";
inherit (stable) patches;
## see http://wiki.winehq.org/Gecko
@ -117,7 +117,7 @@ in rec {
staging = fetchFromGitHub rec {
# https://github.com/wine-staging/wine-staging/releases
inherit (unstable) version;
hash = "sha256-jjy4r9VEJsU7FJ7RmE8+cgHTAkZVGruNUD5hzmGSB8c=";
hash = "sha256-lE/95OZigifreaRRCPkvA+Z0FqsBmm018jD6leSysXU=";
owner = "wine-staging";
repo = "wine-staging";
rev = "v${version}";
@ -157,8 +157,8 @@ in rec {
winetricks = fetchFromGitHub rec {
# https://github.com/Winetricks/winetricks/releases
version = "20230212";
hash = "sha256-pd37QTcqY5ZaVBssGecuqziOIq1p0JH0ZDB+oLmp9JU=";
version = "20240105";
hash = "sha256-YTEgb19aoM54KK8/IjrspoChzVnWAEItDlTxpfpS52w=";
owner = "Winetricks";
repo = "winetricks";
rev = version;

View File

@ -49,13 +49,13 @@ in
stdenv.mkDerivation (finalAttrs: {
pname = "imagemagick";
version = "7.1.1-25";
version = "7.1.1-26";
src = fetchFromGitHub {
owner = "ImageMagick";
repo = "ImageMagick";
rev = finalAttrs.version;
hash = "sha256-HKDeeh8DNj0y7wS4DqctXhmNaOqZ02JeBXRFrEpH0M4=";
hash = "sha256-diJhCRDT0SbAYZdBPoxZJWlrUW2Nz4/d7H0Nnybw0Yw=";
};
outputs = [ "out" "dev" "doc" ]; # bin/ isn't really big

View File

@ -1,14 +1,9 @@
{ lib
, fetchurl
, gnustep
, llvmPackages_9
}:
let
# Earlier llvm than 9 segfaults
gnustep' = gnustep.override { llvmPackages = llvmPackages_9; };
in gnustep'.gsmakeDerivation rec {
gnustep.gsmakeDerivation rec {
pname = "pikopixel";
version = "1.0-b10";
@ -20,9 +15,9 @@ in gnustep'.gsmakeDerivation rec {
sourceRoot = "PikoPixel.Sources.${version}/PikoPixel";
buildInputs = [
gnustep'.base
gnustep'.gui
gnustep'.back
gnustep.base
gnustep.gui
gnustep.back
];
# Fix the Exec and Icon paths in the .desktop file, and save the file in the

View File

@ -2,14 +2,14 @@
rustPlatform.buildRustPackage rec {
pname = "lscolors";
version = "0.16.0";
version = "0.17.0";
src = fetchCrate {
inherit version pname;
hash = "sha256-gLtQIqdU6syTo+Z+P59kIpwEtiGCr/DOom9+jA8Uq98=";
hash = "sha256-efkSiwxL7sZIwFXJZunddAb4lTOfhj8oOEOUW3kyRXI=";
};
cargoHash = "sha256-OA9iYGwKElvRaKoyelH9w5ZphoLKrbk8VXwZ2NyLLQY=";
cargoHash = "sha256-1Cyg4WT4xYqc3s5AOXR9GfcS3qKOgscYujGXR9fzuCA=";
buildFeatures = [ "nu-ansi-term" ];

View File

@ -98,9 +98,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkg-config ]
++ lib.optional (enableGL || enableX11) copyDesktopItems
++ lib.optional (stdenv.isDarwin && (enableGL || enableX11)) desktopToDarwinBundle
++ lib.optionals (enableCxx || enablePython) [ python3 python3.pkgs.setuptools python3.pkgs.libclang ]
++ lib.optionals (enablePython) [ which swig ]
++ lib.optionals stdenv.isDarwin [ desktopToDarwinBundle fixDarwinDylibNames xcbuild ];
++ lib.optionals stdenv.isDarwin [ fixDarwinDylibNames xcbuild ];
buildInputs = [ freetype harfbuzz openjpeg jbig2dec libjpeg gumbo ]
++ lib.optionals enableX11 [ libX11 libXext libXi libXrandr ]
@ -126,7 +127,7 @@ stdenv.mkDerivation rec {
done
'';
desktopItems = [
desktopItems = lib.optionals (enableGL || enableX11) [
(makeDesktopItem {
name = pname;
desktopName = pname;

View File

@ -14,13 +14,13 @@
python310Packages.buildPythonApplication rec {
pname = "nwg-displays";
version = "0.3.10";
version = "0.3.12";
src = fetchFromGitHub {
owner = "nwg-piotr";
repo = "nwg-displays";
rev = "v${version}";
hash = "sha256-clL34Ewzf0sJEWiye4L4e1RrPFIHkmotLpPaibGvVY4=";
rev = "refs/tags/v${version}";
hash = "sha256-cr+2ejpXEOg0e86tT37o9400J299DQSkOrQUZE5+V2s=";
};
nativeBuildInputs = [

View File

@ -1,15 +1,15 @@
{
"packageVersion": "121.0.1-1",
"packageVersion": "122.0-1",
"source": {
"rev": "121.0.1-1",
"sha256": "15zcrl47w6ib00wai63kks5ykcpfh5wfa0ixxj62v06v50bnd78x"
"rev": "122.0-1",
"sha256": "18b2pfh61cxkl7ww0fi5wjv580ca7i5sshviqym8w0w38lhp7rsv"
},
"settings": {
"rev": "41623492f2b6970972014f6ce196015d3d7f1b59",
"sha256": "0ayyyw44q0gh668bzlv6cfl7baa0818bnz83g53l5j2f10xd52by"
},
"firefox": {
"version": "121.0.1",
"sha512": "7810850a922cb4a274ced6556e14256d3ff518a96f10a0f86d1f8e40daa0a8b1a5cfcc9cbf1391029d920944e94a9149951ee107a0e718a294954bb50b6ced2e"
"version": "122.0",
"sha512": "619b735c16970207f3f8fb31dd2350a5e665a802c30501c89aee4817b8b0f7f466da93c66ab238e94967587e538e6858934b18164ff312dbdbfbc3b2bf8bd824"
}
}

View File

@ -2,16 +2,16 @@
buildGoModule rec {
pname = "dnscontrol";
version = "4.8.1";
version = "4.8.2";
src = fetchFromGitHub {
owner = "StackExchange";
repo = "dnscontrol";
rev = "v${version}";
hash = "sha256-vH+BHTDQNFZTZjTvxV8ItGkTDj6G5q1t2YC/1LVYXUs=";
hash = "sha256-9myo073/yl9CWwmVb3Gkihf6I/60kSOl0Pk8+dE39KM=";
};
vendorHash = "sha256-InLafJxxOVKGW0bhithJV7qYFjsgDEDGeTBwGvPVG4E=";
vendorHash = "sha256-jOLFqCeBxQLXgUAdDbk/QnPBAtMBQi5VR+oKjgZLb28=";
subPackages = [ "." ];

View File

@ -13,7 +13,7 @@ buildGoModule rec {
CGO_ENABLED = 0;
ldflags = [ "-X github.com/mzz2017/gg/cmd.Version=${version}" "-s" "-w" "-buildid=" ];
ldflags = [ "-X github.com/mzz2017/gg/cmd.Version=${version}" "-s" "-w" ];
vendorHash = "sha256-fnM4ycqDyruCdCA1Cr4Ki48xeQiTG4l5dLVuAafEm14=";
subPackages = [ "." ];

View File

@ -44,13 +44,13 @@ rec {
thunderbird-115 = (buildMozillaMach rec {
pname = "thunderbird";
version = "115.6.1";
version = "115.7.0";
application = "comm/mail";
applicationName = "Mozilla Thunderbird";
binaryName = pname;
src = fetchurl {
url = "mirror://mozilla/thunderbird/releases/${version}/source/thunderbird-${version}.source.tar.xz";
sha512 = "f2efaff8b209234b202671b5322fb14a367b955e28c4b24b139af091b838186126e3d387ca21e57ed089629af876e86b38588789b1ef3db14f4f8703095467b3";
sha512 = "de9edb81cf5da494101bf927a5b963ccdec0cc9bff87ebd72d896c6e25102c1113b326f67302a81abd237048aa1e6150c4a97fe4b1892bc80030cbab9099e2d8";
};
extraPatches = [
# The file to be patched is different from firefox's `no-buildconfig-ffx90.patch`.

View File

@ -0,0 +1,12 @@
diff -rup rsync-3.2.7/configure.sh rsync-3.2.7-fixed/configure.sh
--- rsync-3.2.7/configure.sh 2022-10-20 17:57:22
+++ rsync-3.2.7-fixed/configure.sh 2024-01-01 19:51:58
@@ -7706,7 +7706,7 @@ else $as_nop
#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
-main()
+int main()
{
if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
exit(1);

View File

@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
# https://github.com/WayneD/rsync/issues/511#issuecomment-1774612577
# original source: https://build.opensuse.org/package/view_file/network/rsync/rsync-fortified-strlcpy-fix.patch?expand=1&rev=3f8dd2f4a404c96c0f69176e60893714
./rsync-fortified-strlcpy-fix.patch
# https://github.com/WayneD/rsync/pull/558
./configure.ac-fix-failing-IPv6-check.patch
];
buildInputs = [ libiconv zlib popt ]

View File

@ -1,15 +1,15 @@
{ lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, gawk, gnugrep, gnused, jre }:
{ lib, stdenv, fetchurl, dpkg, makeWrapper, coreutils, gawk, gnugrep, gnused, openjdk17 }:
with lib;
stdenv.mkDerivation rec {
pname = "marvin";
version = "23.12.0";
version = "23.17.0";
src = fetchurl {
name = "marvin-${version}.deb";
url = "http://dl.chemaxon.com/marvin/${version}/marvin_linux_${versions.majorMinor version}.deb";
hash = "sha256-5ycOteXcdgZaeDl3WQ95H2lD0OnnobCbmnVlfYwVdeI=";
hash = "sha256-zE/9EaOsNJwzE4Doasm9N8QG4t7wDOxqpV/Nhc4p7Ws=";
};
nativeBuildInputs = [ dpkg makeWrapper ];
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
installPhase = ''
wrapBin() {
makeWrapper $1 $out/bin/$(basename $1) \
--set INSTALL4J_JAVA_HOME "${jre}" \
--set INSTALL4J_JAVA_HOME "${openjdk17}" \
--prefix PATH : ${makeBinPath [ coreutils gawk gnugrep gnused ]}
}
cp -r opt $out

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchFromGitLab, gfortran, perl, procps
{ lib, stdenv, fetchFromGitLab, gfortran, which, perl, procps
, libyaml, libxc, fftw, blas, lapack, gsl, netcdf, arpack, autoreconfHook
, python3
, enableFma ? stdenv.hostPlatform.fmaSupport
@ -22,6 +22,7 @@ stdenv.mkDerivation rec {
};
nativeBuildInputs = [
which
perl
procps
autoreconfHook

View File

@ -9,6 +9,8 @@
, qtsvg
, qttools
, qtserialport
, qtwayland
, qt5compat
, boost
, libngspice
, libgit2
@ -18,38 +20,60 @@
let
# SHA256 of the fritzing-parts HEAD on the master branch,
# which contains the latest stable parts definitions
partsSha = "4713511c894cb2894eae505b9307c6555afcc32c";
partsSha = "015626e6cafb1fc7831c2e536d97ca2275a83d32";
parts = fetchFromGitHub {
owner = "fritzing";
repo = "fritzing-parts";
rev = partsSha;
sha256 = "sha256-QiOGWc+99MJhOVrXyNOinR8rTVvW/E+wPfoB6QvbhY0=";
hash = "sha256-5jw56cqxpT/8bf1q551WG53J6Lw5pH0HEtRUoNNMc+A=";
};
# Header-only library
svgpp = fetchFromGitHub {
owner = "svgpp";
repo = "svgpp";
rev = "v1.3.0";
hash = "sha256-kJEVnMYnDF7bThDB60bGXalYgpn9c5/JCZkRSK5GoE4=";
};
in
stdenv.mkDerivation rec {
pname = "fritzing";
version = "unstable-2022-07-01";
version = "1.0.1";
src = fetchFromGitHub {
owner = pname;
repo = "fritzing-app";
rev = "40d23c29b0463d5c968c3c4b34ed5ffc05c5a258";
sha256 = "sha256-smvfuxQWF/LMFFXHOKb3zUZsEet/XoiaxXOR5QMaYzw=";
rev = "8f5f1373835050ce014299c78d91c24beea9b633";
hash = "sha256-jLVNzSh2KwXpi3begtp/53sdBmQQbCnKMCm2p770etg=";
};
buildInputs = [ qtbase qtsvg qtserialport boost libgit2 quazip libngspice ];
nativeBuildInputs = [ qmake pkg-config qttools wrapQtAppsHook ];
patches = [
# Fix error caused by implicit call
(fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-Quick-Dirty-patch-to-allow-finding-quazip-qt5-on-Arc.patch?h=fritzing&id=1ae0dc88464f375a54b156e6761315bcb04bcc1f";
sha256 = "sha256-iS18EWw920gyeXDoHBRGwXvwMJurJS21H77Erl+fqog=";
url = "https://aur.archlinux.org/cgit/aur.git/plain/0003-ParseResult-operator-bool-in-explicit.patch?h=fritzing&id=b2c79b55f0a2811e80bb1136b1e021fbc56937c9";
hash = "sha256-9HdcNqLHEB0HQbF7AaTdUIJUbafwsRKPA+wfF4g8veU=";
})
];
nativeBuildInputs = [ qmake pkg-config qttools wrapQtAppsHook ];
buildInputs = [
qtbase
qtsvg
qtserialport
qtwayland
qt5compat
boost
libgit2
quazip
libngspice
];
postPatch = ''
# Use packaged quazip, libgit and ngspice
sed -i "/pri\/quazipdetect.pri/d" phoenix.pro
sed -i "/pri\/spicedetect.pri/d" phoenix.pro
substituteInPlace phoenix.pro \
--replace 'LIBGIT_STATIC = true' 'LIBGIT_STATIC = false'
@ -61,7 +85,11 @@ stdenv.mkDerivation rec {
cp -a ${parts}/* parts/
'';
env.NIX_CFLAGS_COMPILE = "-I${lib.getDev quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}/quazip";
env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " [
"-I${lib.getDev quazip}/include/QuaZip-Qt${lib.versions.major qtbase.version}-${quazip.version}/quazip"
"-I${svgpp}/include"
];
env.NIX_LDFLAGS = "-lquazip1-qt${lib.versions.major qtbase.version}";
qmakeFlags = [
"phoenix.pro"

View File

@ -19,7 +19,7 @@ buildGoModule rec {
nativeBuildInputs = [ makeWrapper ];
ldflags = [ "-s" "-w" "-buildid=" "-X github.com/sigstore/gitsign/pkg/version.gitVersion=${version}" ];
ldflags = [ "-s" "-w" "-X github.com/sigstore/gitsign/pkg/version.gitVersion=${version}" ];
preCheck = ''
# test all paths

View File

@ -23,11 +23,11 @@ let
self = python3Packages.buildPythonApplication rec {
pname = "mercurial${lib.optionalString fullBuild "-full"}";
version = "6.6.1";
version = "6.6.2";
src = fetchurl {
url = "https://mercurial-scm.org/release/mercurial-${version}.tar.gz";
sha256 = "sha256-opRlo/5Ao+jUm6g0MTSsKrooa2g//rg42gz25FIflpU=";
sha256 = "sha256-y0lNe+fdwvydMXHIiDCvnAKyHHU+PlET3vrJwDc7S2A=";
};
format = "other";
@ -37,7 +37,7 @@ let
cargoDeps = if rustSupport then rustPlatform.fetchCargoTarball {
inherit src;
name = "mercurial-${version}";
sha256 = "sha256-wLV0qdCfMgGpZRxnZik/lRwZHm/66p0sJn/mYVRvRkQ=";
sha256 = "sha256-yOysqMrTWDx/ENcJng8Rm338NI9vpuBGH6Yq8B7+MFg=";
sourceRoot = "mercurial-${version}/rust";
} else null;
cargoRoot = if rustSupport then "rust" else null;

View File

@ -31,7 +31,7 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
})
];
pythonRelaxDeps = [ "attrs" ];
pythonRelaxDeps = [ "attrs" "ruamel.yaml" ];
nativeBuildInputs = [
wrapQtAppsHook

View File

@ -44,7 +44,7 @@
, libmtp
, liboggz
, libopus
, libplacebo
, libplacebo_5
, libpulseaudio
, libraw1394
, librsvg
@ -164,7 +164,7 @@ stdenv.mkDerivation (finalAttrs: {
libmtp
liboggz
libopus
libplacebo
libplacebo_5
libpulseaudio
libraw1394
librsvg

View File

@ -525,10 +525,10 @@ stdenv.mkDerivation {
# additional -isystem flags will confuse gfortran (see
# https://github.com/NixOS/nixpkgs/pull/209870#issuecomment-1500550903)
+ optionalString (libcxx == null && isClang && (useGccForLibs && gccForLibs.langCC or false)) ''
for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*; do
for dir in ${gccForLibs}/include/c++/*; do
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
done
for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*/${targetPlatform.config}; do
for dir in ${gccForLibs}/include/c++/*/${targetPlatform.config}; do
echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
done
''

View File

@ -39,6 +39,8 @@
# Not needed with buildGoModule
, goPackagePath ? ""
, ldflags ? [ ]
# needed for buildFlags{,Array} warning
, buildFlags ? ""
, buildFlagsArray ? ""
@ -154,6 +156,9 @@ let
GOFLAGS = lib.optionals (!proxyVendor) [ "-mod=vendor" ] ++ lib.optionals (!allowGoReference) [ "-trimpath" ];
inherit CGO_ENABLED enableParallelBuilding GO111MODULE GOTOOLCHAIN;
# If not set to an explicit value, set the buildid empty for reproducibility.
ldflags = ldflags ++ lib.optionals (!lib.any (lib.hasPrefix "-buildid=") ldflags) [ "-buildid=" ];
configurePhase = args.configurePhase or (''
runHook preConfigure
@ -301,4 +306,5 @@ in
lib.warnIf (args' ? vendorSha256) "`vendorSha256` is deprecated. Use `vendorHash` instead"
lib.warnIf (buildFlags != "" || buildFlagsArray != "")
"Use the `ldflags` and/or `tags` attributes instead of `buildFlags`/`buildFlagsArray`"
lib.warnIf (builtins.elem "-buildid=" ldflags) "`-buildid=` is set by default as ldflag by buildGoModule"
package

View File

@ -37,6 +37,8 @@
, CGO_ENABLED ? go.CGO_ENABLED
, ldflags ? [ ]
# needed for buildFlags{,Array} warning
, buildFlags ? ""
, buildFlagsArray ? ""
@ -91,6 +93,9 @@ let
GOARM = toString (lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
# If not set to an explicit value, set the buildid empty for reproducibility.
ldflags = ldflags ++ lib.optionals (!lib.any (lib.hasPrefix "-buildid=") ldflags) [ "-buildid=" ];
configurePhase = args.configurePhase or (''
runHook preConfigure
@ -280,4 +285,5 @@ let
in
lib.warnIf (buildFlags != "" || buildFlagsArray != "")
"Use the `ldflags` and/or `tags` attributes instead of `buildFlags`/`buildFlagsArray`"
lib.warnIf (builtins.elem "-buildid=" ldflags) "`-buildid=` is set by default as ldflag by buildGoModule"
package

View File

@ -18,7 +18,7 @@ buildGoModule rec {
vendorHash = "sha256-8+PdkanodNZW/xeFf+tDm3Ej7DRSpBBtiT/CqjnWthw=";
CGO_ENABLED = "0";
ldflags = [ "-s" "-w" "-buildid=" "-X github.com/gomods/athens/pkg/build.version=${version}" ];
ldflags = [ "-s" "-w" "-X github.com/gomods/athens/pkg/build.version=${version}" ];
subPackages = [ "cmd/proxy" ];

View File

@ -0,0 +1,158 @@
{ lib
, stdenv
, alsa-lib
, dbus
, docutils
, ell
, enableExperimental ? false
, fetchpatch
, fetchurl
, glib
, json_c
, libical
, pkg-config
, python3
, readline
, systemdMinimal
, udev
}:
stdenv.mkDerivation (finalAttrs: {
pname = "bluez";
version = "5.71";
src = fetchurl {
url = "mirror://kernel/linux/bluetooth/bluez-${finalAttrs.version}.tar.xz";
hash = "sha256-uCjUGMk87R9Vthb7VILPAVN0QL+zT72hpWTz7OlHNdg=";
};
buildInputs = [
alsa-lib
dbus
ell
glib
json_c
libical
python3
readline
udev
];
nativeBuildInputs = [
docutils
pkg-config
python3.pkgs.wrapPython
];
outputs = [ "out" "dev" "test" ];
postPatch = ''
substituteInPlace tools/hid2hci.rules \
--replace /sbin/udevadm ${systemdMinimal}/bin/udevadm \
--replace "hid2hci " "$out/lib/udev/hid2hci "
'' +
# Disable some tests:
# - test-mesh-crypto depends on the following kernel settings:
# CONFIG_CRYPTO_[USER|USER_API|USER_API_AEAD|USER_API_HASH|AES|CCM|AEAD|CMAC]
''
if [[ ! -f unit/test-mesh-crypto.c ]]; then
echo "unit/test-mesh-crypto.c no longer exists"
false
fi
echo 'int main() { return 77; }' > unit/test-mesh-crypto.c
'';
configureFlags = [
"--localstatedir=/var"
(lib.enableFeature enableExperimental "experimental")
(lib.enableFeature true "btpclient")
(lib.enableFeature true "cups")
(lib.enableFeature true "external-ell")
(lib.enableFeature true "health")
(lib.enableFeature true "hid2hci")
(lib.enableFeature true "library")
(lib.enableFeature true "logger")
(lib.enableFeature true "mesh")
(lib.enableFeature true "midi")
(lib.enableFeature true "nfc")
(lib.enableFeature true "pie")
(lib.enableFeature true "sixaxis")
# Set "deprecated" to provide ciptool, sdptool, and rfcomm (unmaintained);
# superseded by new D-Bus APIs
(lib.enableFeature true "deprecated")
(lib.withFeatureAs true "dbusconfdir" "${placeholder "out"}/share")
(lib.withFeatureAs true "dbussessionbusdir" "${placeholder "out"}/share/dbus-1/services")
(lib.withFeatureAs true "dbussystembusdir" "${placeholder "out"}/share/dbus-1/system-services")
(lib.withFeatureAs true "systemdsystemunitdir" "${placeholder "out"}/etc/systemd/system")
(lib.withFeatureAs true "systemduserunitdir" "${placeholder "out"}/etc/systemd/user")
(lib.withFeatureAs true "udevdir" "${placeholder "out"}/lib/udev")
];
makeFlags = [
"rulesdir=${placeholder "out"}/lib/udev/rules.d"
];
# Work around `make install' trying to create /var/lib/bluetooth.
installFlags = [
"statedir=$(TMPDIR)/var/lib/bluetooth"
];
doCheck = stdenv.hostPlatform.isx86_64;
postInstall = let
pythonPath = with python3.pkgs; [
dbus-python
pygobject3
recursivePthLoader
];
in
''
mkdir -p $test/{bin,test}
cp -a test $test
pushd $test/test
for t in \
list-devices \
monitor-bluetooth \
simple-agent \
test-adapter \
test-device \
test-thermometer \
; do
ln -s ../test/$t $test/bin/bluez-$t
done
popd
wrapPythonProgramsIn $test/test "$test/test ${toString pythonPath}"
# for bluez4 compatibility for NixOS
mkdir $out/sbin
ln -s ../libexec/bluetooth/bluetoothd $out/sbin/bluetoothd
ln -s ../libexec/bluetooth/obexd $out/sbin/obexd
# Add extra configuration
mkdir $out/etc/bluetooth
ln -s /etc/bluetooth/main.conf $out/etc/bluetooth/main.conf
# https://github.com/NixOS/nixpkgs/issues/204418
ln -s /etc/bluetooth/input.conf $out/etc/bluetooth/input.conf
ln -s /etc/bluetooth/network.conf $out/etc/bluetooth/network.conf
# Add missing tools, ref https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/bluez
for files in $(find tools/ -type f -perm -755); do
filename=$(basename $files)
install -Dm755 tools/$filename $out/bin/$filename
done
install -Dm755 attrib/gatttool $out/bin/gatttool
'';
enableParallelBuilding = true;
meta = {
homepage = "https://www.bluez.org/";
description = "Official Linux Bluetooth protocol stack";
changelog = "https://git.kernel.org/pub/scm/bluetooth/bluez.git/tree/ChangeLog?h=${finalAttrs.version}";
license = with lib.licenses; [ bsd2 gpl2Plus lgpl21Plus mit ];
mainProgram = "btinfo";
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = lib.platforms.linux;
};
})

View File

@ -0,0 +1,77 @@
{ lib
, stdenv
, fetchFromGitLab
, meson
, ninja
, pkg-config
, python3Packages
, vulkan-headers
, vulkan-loader
, shaderc
, lcms2
, libGL
, libX11
, libunwind
, libdovi
}:
stdenv.mkDerivation rec {
pname = "libplacebo";
version = "5.264.1";
src = fetchFromGitLab {
domain = "code.videolan.org";
owner = "videolan";
repo = pname;
rev = "v${version}";
hash = "sha256-YEefuEfJURi5/wswQKskA/J1UGzessQQkBpltJ0Spq8=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
vulkan-headers
python3Packages.jinja2
python3Packages.glad2
];
buildInputs = [
vulkan-loader
shaderc
lcms2
libGL
libX11
libunwind
libdovi
];
mesonFlags = with lib; [
(mesonOption "vulkan-registry" "${vulkan-headers}/share/vulkan/registry/vk.xml")
(mesonBool "demos" false) # Don't build and install the demo programs
(mesonEnable "d3d11" false) # Disable the Direct3D 11 based renderer
(mesonEnable "glslang" false) # rely on shaderc for GLSL compilation instead
] ++ optionals stdenv.isDarwin [
(mesonEnable "unwind" false) # libplacebo doesnt build with `darwin.libunwind`
];
postPatch = ''
substituteInPlace meson.build \
--replace 'python_env.append' '#'
'';
meta = with lib; {
description = "Reusable library for GPU-accelerated video/image rendering primitives";
longDescription = ''
Reusable library for GPU-accelerated image/view processing primitives and
shaders, as well a batteries-included, extensible, high-quality rendering
pipeline (similar to mpv's vo_gpu). Supports Vulkan, OpenGL and Metal (via
MoltenVK).
'';
homepage = "https://code.videolan.org/videolan/libplacebo";
changelog = "https://code.videolan.org/videolan/libplacebo/-/tags/v${version}";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ primeos tadeokondrak ];
platforms = platforms.all;
};
}

View File

@ -1,27 +0,0 @@
From a908a574daf8bac10bb2a0ee3771052d2167a85f Mon Sep 17 00:00:00 2001
From: Randy Eckenrode <randy@largeandhighquality.com>
Date: Sun, 3 Dec 2023 15:41:20 -0500
Subject: [PATCH] Fix test failure on Darwin on a case-sensitive fs
This was encountered while looking into an issue with
https://github.com/NixOS/nixpkgs/pull/268583.
I run my Nix store on case-sensitive APFS, so the test fails due to
trying to link `-framework ldap` instead of `-framework LDAP`.
---
test cases/osx/5 extra frameworks/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test cases/osx/5 extra frameworks/meson.build b/test cases/osx/5 extra frameworks/meson.build
index f6c01e63a1bd..96532846c632 100644
--- a/test cases/osx/5 extra frameworks/meson.build
+++ b/test cases/osx/5 extra frameworks/meson.build
@@ -7,7 +7,7 @@ dep_main = dependency('Foundation')
assert(dep_main.type_name() == 'extraframeworks', 'type_name is ' + dep_main.type_name())
# https://github.com/mesonbuild/meson/issues/10002
-ldap_dep = dependency('ldap', method : 'extraframework')
+ldap_dep = dependency('LDAP', method : 'extraframework')
assert(ldap_dep.type_name() == 'extraframeworks', 'type_name is ' + ldap_dep.type_name())
stlib = static_library('stat', 'stat.c', install : true, dependencies: [opengl_dep, ldap_dep])

View File

@ -18,13 +18,13 @@ let
in
python3.pkgs.buildPythonApplication rec {
pname = "meson";
version = "1.3.0";
version = "1.3.1";
src = fetchFromGitHub {
owner = "mesonbuild";
repo = "meson";
rev = "refs/tags/${version}";
hash = "sha256-Jt3PWnbv/8P6Rvf3E/Yli2vdtfgx3CmsW+jlc9CK5KA=";
hash = "sha256-KNNtHi3jx0MRiOgmluA4ucZJWB2WeIYdApfHuspbCqg=";
};
patches = [
@ -65,9 +65,6 @@ python3.pkgs.buildPythonApplication rec {
# Nixpkgs cctools does not have bitcode support.
./006-disable-bitcode.patch
# https://github.com/mesonbuild/meson/pull/12587
./007-darwin-case-sensitivity.patch
];
buildInputs = lib.optionals (python3.pythonOlder "3.9") [

View File

@ -4,17 +4,18 @@
, sudachidict
, runCommand
, sudachi-rs
, writeScript
}:
rustPlatform.buildRustPackage rec {
pname = "sudachi-rs";
version = "0.6.7";
version = "0.6.8";
src = fetchFromGitHub {
owner = "WorksApplications";
repo = "sudachi.rs";
rev = "refs/tags/v${version}";
hash = "sha256-VzNOI6PP9sKBsNfB5yIxAI8jI8TEdM4tD49Jl/2tkSE=";
hash = "sha256-9GXU+YDPuQ+roqQfUE5q17Hl6AopsvGhRPjZ+Ui+n24=";
};
postPatch = ''
@ -22,7 +23,7 @@ rustPlatform.buildRustPackage rec {
--replace '"resources"' '"${placeholder "out"}/share/resources"'
'';
cargoHash = "sha256-b2NtgHcMkimzFFuqohAo9KdSaIq6oi3qo/k8/VugyFs=";
cargoHash = "sha256-Ufo3dB2KGDDNiebp7hLhQrUMLsefO8wRpJQDz57Yb8Y=";
# prepare the resources before the build so that the binary can find sudachidict
preBuild = ''
@ -30,12 +31,22 @@ rustPlatform.buildRustPackage rec {
install -Dm644 resources/* -t $out/share/resources
'';
passthru.tests = {
# detects an error that sudachidict is not found
cli = runCommand "${pname}-cli-test" { } ''
mkdir $out
echo "" | ${lib.getExe sudachi-rs} > $out/result
passthru = {
updateScript = writeScript "update.sh" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update
set -eu -o pipefail
nix-update sudachi-rs
nix-update --version=skip python3Packages.sudachipy
'';
tests = {
# detects an error that sudachidict is not found
cli = runCommand "${pname}-cli-test" { } ''
mkdir $out
echo "" | ${lib.getExe sudachi-rs} > $out/result
'';
};
};
meta = with lib; {

View File

@ -31,13 +31,13 @@ in
stdenv.mkDerivation {
pname = "swaylock-fancy";
version = "unstable-2023-11-21";
version = "unstable-2023-12-22";
src = fetchFromGitHub {
owner = "Big-B";
repo = "swaylock-fancy";
rev = "ff37ae3c6d0f100f81ff64fdb9d422c37de2f4f6";
hash = "sha256-oS4YCbZOIrMP4QSM5eHWzTn18k3w2OnJ2k+64x/DnuM=";
rev = "0b93740e1dfc39883c125c212a1adc16b01c14f1";
hash = "sha256-ko4SeHGNBiPMvxFXhD+U2r0Mwc14C2IN5CaJYI0V8u8=";
};
postPatch = ''

View File

@ -16,7 +16,7 @@ buildGoModule rec {
vendorHash = "sha256-RsjUPLe8omoN+XGyNhHDxzNfZR7VVTkh/f/On1oCRqM=";
CGO_ENABLED = "0";
ldflags = [ "-s" "-w" "-buildid=" "-X main.version=${version}" ];
ldflags = [ "-s" "-w" "-X main.version=${version}" ];
flags = [ "-trimpath" ];
meta = with lib; {

View File

@ -0,0 +1,26 @@
{ lib, stdenv, fetchFromGitHub, cmake, vulkan-headers }:
stdenv.mkDerivation (finalAttrs: {
pname = "volk";
version = "1.3.275.0";
src = fetchFromGitHub {
owner = "zeux";
repo = "volk";
rev = "vulkan-sdk-${finalAttrs.version}";
hash = "sha256-uTjLgJMGN8nOVhVIl/GNhO2jXe9ebhc9vzAwCDwfuf4=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ vulkan-headers ];
cmakeFlags = ["-DVOLK_INSTALL=1"];
meta = with lib; {
description = " Meta loader for Vulkan API";
homepage = "https://github.com/zeux/volk";
platforms = platforms.all;
license = licenses.mit;
maintainers = with maintainers; [ k900 ];
};
})

View File

@ -0,0 +1,39 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "yanic";
version = "1.5.0";
src = fetchFromGitHub {
owner = "FreifunkBremen";
repo = "yanic";
rev = "v${version}";
sha256 = "sha256-++tF6nTFIDeqWSqlBDXw/zEfl5YYa4ufzVZaUG2c8Zo=";
};
vendorHash = "sha256-D9V53/+C/+iv1U4kVrYWzJ8iD0MA1QcR8f5ifejFhLo=";
ldflags = [ "-s" "-w" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd yanic \
--bash <($out/bin/yanic completion bash) \
--fish <($out/bin/yanic completion fish) \
--zsh <($out/bin/yanic completion zsh)
'';
meta = with lib; {
description = "A tool to collect and aggregate respondd data";
homepage = "https://github.com/FreifunkBremen/yanic";
changelog = "https://github.com/FreifunkBremen/yanic/releases/tag/${src.rev}";
license = licenses.agpl3Only;
maintainers = with maintainers; [ herbetom ];
mainProgram = "yanic";
};
}

View File

@ -2,11 +2,11 @@
stdenvNoCC.mkDerivation rec {
pname = "iana-etc";
version = "20230316";
version = "20231227";
src = fetchzip {
url = "https://github.com/Mic92/iana-etc/releases/download/${version}/iana-etc-${version}.tar.gz";
sha256 = "sha256-5acFYPSwevEw5tZNbQDpui3stWuMdnhaKHqC8lhnsOY=";
sha256 = "sha256-8Pa6LtAml8axjrUS32UbFIqTtM8v124U2Tt0J4sC0Is=";
};
installPhase = ''

View File

@ -135,6 +135,8 @@ let
# We pick "/" path to effectively avoid sysroot offset and make it work
# as a native case.
"--with-build-sysroot=/"
# Same with the stdlibc++ headers embedded in the gcc output
"--with-gxx-include-dir=${placeholder "out"}/include/c++/${version}/"
]
# Basic configuration

View File

@ -12,9 +12,20 @@ inputs to be retained in runtime closure.
Typical examples are `nix` -> `nlohmann_json` and `pipewire` ->
`lttng-ust.dev`.
For this reason we want to remove the occurrences of hashes in the
expansion of `__FILE__`. `nuke-references` does it by replacing hashes
by `eeeeee...` but those paths are also used for debug symbols. It is
handy to be able to invert the transformation to go back to the original
store path for debuginfod servers. The chosen solution is to make the
hash uppercase:
- it does not trigger runtime references (except for all digit hashes,
which are unlikely enough)
- it visually looks like a bogus store path
- it is easy to find the original store path if required
Ideally we would like to use `-fmacro-prefix-map=` feature of `gcc` as:
-fmacro-prefix-map=/nix/store/$hash1-nlohmann-json-ver=/nix/store/eeee.eee-nlohmann-json-ver
-fmacro-prefix-map=/nix/store/$hash1-nlohmann-json-ver=/nix/store/$HASH1-nlohmann-json-ver
-fmacro-prefix-map=/nix/...
In practice it quickly exhausts argument length limit due to `gcc`
@ -25,9 +36,9 @@ is present in the environment.
Tested as:
$ printf "# 0 \"/nix/store/01234567890123456789012345678901-pppppp-vvvvvvv\" \nconst char * f(void) { return __FILE__; }" | NIX_STORE=/nix/store ./gcc/xgcc -Bgcc -x c - -S -o -
$ printf "# 0 \"/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-pppppp-vvvvvvv\" \nconst char * f(void) { return __FILE__; }" | NIX_STORE=/nix/store ./gcc/xgcc -Bgcc -x c - -S -o -
...
.string "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-pppppp-vvvvvvv"
.string "/nix/store/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-pppppp-vvvvvvv"
...
Mangled successfully.
@ -43,7 +54,7 @@ Mangled successfully.
/* Perform user-specified mapping of filename prefixes. Return the
GC-allocated new name corresponding to FILENAME or FILENAME if no
remapping was performed. */
@@ -76,7 +79,30 @@ remap_filename (file_prefix_map *maps, const char *filename)
@@ -76,7 +79,31 @@ remap_filename (file_prefix_map *maps, const char *filename)
if (filename_ncmp (filename, map->old_prefix, map->old_len) == 0)
break;
if (!map)
@ -51,8 +62,7 @@ Mangled successfully.
+ {
+ if (maps == macro_prefix_maps)
+ {
+ /* Remap all fo $NIX_STORE/.{32} paths to
+ * equivalent $NIX_STORE/e{32}.
+ /* Remap the 32 characters after $NIX_STORE/ to uppercase
+ *
+ * That way we avoid argument parameters explosion
+ * and still avoid embedding headers into runtime closure:
@ -66,7 +76,9 @@ Mangled successfully.
+ {
+ s = (char *) ggc_alloc_atomic (name_len + 1);
+ memcpy(s, name, name_len + 1);
+ memset(s + nix_store_len + 1, 'e', 32);
+ for (int i = nix_store_len + 1; i < nix_store_len + 1 + 32; i++) {
+ s[i] = TOUPPER(s[i]);
+ }
+ return s;
+ }
+ }
@ -75,7 +87,7 @@ Mangled successfully.
name = filename + map->old_len;
name_len = strlen (name) + 1;
@@ -90,7 +116,6 @@ remap_filename (file_prefix_map *maps, const char *filename)
@@ -90,7 +117,6 @@ remap_filename (file_prefix_map *maps, const char *filename)
ignore it in DW_AT_producer (dwarf2out.cc). */
/* Linked lists of file_prefix_map structures. */

View File

@ -0,0 +1,60 @@
From f4029de35fb1b293a4fd586574b1b4b73ddf7880 Mon Sep 17 00:00:00 2001
From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
Date: Wed, 26 Jul 2023 22:36:26 +0530
Subject: [PATCH] [aarch64/match.pd] Fix ICE observed in PR110280.
gcc/ChangeLog:
PR tree-optimization/110280
* match.pd (vec_perm_expr(v, v, mask) -> v): Explicitly build vector
using build_vector_from_val with the element of input operand, and
mask's type if operand and mask's types don't match.
gcc/testsuite/ChangeLog:
PR tree-optimization/110280
* gcc.target/aarch64/sve/pr110280.c: New test.
(cherry picked from commit 85d8e0d8d5342ec8b4e6a54e22741c30b33c6f04)
---
gcc/match.pd | 9 ++++++++-
gcc/testsuite/gcc.target/aarch64/sve/pr110280.c | 12 ++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
diff --git a/gcc/match.pd b/gcc/match.pd
index 9118244825054..c3bb4fbc0a7a2 100644
--- a/gcc/match.pd
+++ b/gcc/match.pd
@@ -8292,7 +8292,14 @@ and,
(simplify
(vec_perm vec_same_elem_p@0 @0 @1)
- @0)
+ (if (types_match (type, TREE_TYPE (@0)))
+ @0
+ (with
+ {
+ tree elem = uniform_vector_p (@0);
+ }
+ (if (elem)
+ { build_vector_from_val (type, elem); }))))
/* Push VEC_PERM earlier if that may help FMA perception (PR101895). */
(simplify
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
new file mode 100644
index 0000000000000..d3279f383629f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sve/pr110280.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+#include "arm_sve.h"
+
+svuint32_t l()
+{
+ _Alignas(16) const unsigned int lanes[4] = {0, 0, 0, 0};
+ return svld1rq_u32(svptrue_b8(), lanes);
+}
+
+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "optimized" } } */

View File

@ -12,9 +12,20 @@ inputs to be retained in runtime closure.
Typical examples are `nix` -> `nlohmann_json` and `pipewire` ->
`lttng-ust.dev`.
For this reason we want to remove the occurrences of hashes in the
expansion of `__FILE__`. `nuke-references` does it by replacing hashes
by `eeeeee...` but those paths are also used for debug symbols. It is
handy to be able to invert the transformation to go back to the original
store path for debuginfod servers. The chosen solution is to make the
hash uppercase:
- it does not trigger runtime references (except for all digit hashes,
which are unlikely enough)
- it visually looks like a bogus store path
- it is easy to find the original store path if required
Ideally we would like to use `-fmacro-prefix-map=` feature of `gcc` as:
-fmacro-prefix-map=/nix/store/$hash1-nlohmann-json-ver=/nix/store/eeee.eee-nlohmann-json-ver
-fmacro-prefix-map=/nix/store/$hash1-nlohmann-json-ver=/nix/store/$HASH1-nlohmann-json-ver
-fmacro-prefix-map=/nix/...
In practice it quickly exhausts argument length limit due to `gcc`
@ -25,9 +36,9 @@ is present in the environment.
Tested as:
$ printf "# 0 \"/nix/store/01234567890123456789012345678901-pppppp-vvvvvvv\" \nconst char * f(void) { return __FILE__; }" | NIX_STORE=/nix/store ./gcc/xgcc -Bgcc -x c - -S -o -
$ printf "# 0 \"/nix/store/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-pppppp-vvvvvvv\" \nconst char * f(void) { return __FILE__; }" | NIX_STORE=/nix/store ./gcc/xgcc -Bgcc -x c - -S -o -
...
.string "/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-pppppp-vvvvvvv"
.string "/nix/store/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-pppppp-vvvvvvv"
...
Mangled successfully.
@ -43,14 +54,13 @@ Mangled successfully.
/* Perform user-specified mapping of filename prefixes. Return the
GC-allocated new name corresponding to FILENAME or FILENAME if no
remapping was performed. */
@@ -102,6 +105,29 @@ remap_filename (file_prefix_map *maps, const char *filename)
@@ -102,6 +105,30 @@ remap_filename (file_prefix_map *maps, const char *filename)
break;
if (!map)
{
+ if (maps == macro_prefix_maps)
+ {
+ /* Remap all fo $NIX_STORE/.{32} paths to
+ * equivalent $NIX_STORE/e{32}.
+ /* Remap all fo $NIX_STORE/.{32} paths to uppercase
+ *
+ * That way we avoid argument parameters explosion
+ * and still avoid embedding headers into runtime closure:
@ -64,7 +74,9 @@ Mangled successfully.
+ {
+ s = (char *) ggc_alloc_atomic (name_len + 1);
+ memcpy(s, name, name_len + 1);
+ memset(s + nix_store_len + 1, 'e', 32);
+ for (int i = nix_store_len + 1; i < nix_store_len + 1 + 32; i++) {
+ s[i] = TOUPPER(s[i]);
+ }
+ if (realname != filename)
+ free (const_cast <char *> (realname));
+ return s;
@ -73,7 +85,7 @@ Mangled successfully.
if (realname != filename)
free (const_cast <char *> (realname));
return filename;
@@ -124,7 +150,6 @@ remap_filename (file_prefix_map *maps, const char *filename)
@@ -124,7 +151,6 @@ remap_filename (file_prefix_map *maps, const char *filename)
ignore it in DW_AT_producer (gen_command_line_string in opts.cc). */
/* Linked lists of file_prefix_map structures. */
@ -81,4 +93,3 @@ Mangled successfully.
static file_prefix_map *debug_prefix_maps; /* -fdebug-prefix-map */
static file_prefix_map *profile_prefix_maps; /* -fprofile-prefix-map */

View File

@ -74,6 +74,7 @@ in
++ optional langFortran (if atLeast12 then ./gcc-12-gfortran-driving.patch else ./gfortran-driving.patch)
++ optional atLeast7 ./ppc-musl.patch
++ optional is12 ./12/lambda-ICE-PR109241.patch # backport ICE fix on ccache code
++ optional is13 ./13/ICE-PR110280.patch # backport ICE fix on const_unop
++ optional (atLeast9 && langD) ./libphobos.patch

View File

@ -1,13 +0,0 @@
diff --git a/docs/users_guide/ghc_config.py.in b/docs/users_guide/ghc_config.py.in
index 2670ad3cf1..d2f9d85c31 100644
--- a/docs/users_guide/ghc_config.py.in
+++ b/docs/users_guide/ghc_config.py.in
@@ -1,6 +1,6 @@
extlinks = {
- 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', 'Issue #'),
- 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', 'GHC Wiki'),
+ 'ghc-ticket': ('https://gitlab.haskell.org/ghc/ghc/issues/%s', 'Issue %s'),
+ 'ghc-wiki': ('https://gitlab.haskell.org/ghc/ghc/wikis/%s', 'GHC Wiki %s'),
}
libs_base_uri = '../libraries'

View File

@ -1,32 +0,0 @@
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c
--- a/rts/win32/OSMem.c
+++ b/rts/win32/OSMem.c
@@ -41,7 +41,7 @@ static block_rec* free_blocks = NULL;
typedef LPVOID(WINAPI *VirtualAllocExNumaProc)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD);
/* Cache NUMA API call. */
-VirtualAllocExNumaProc VirtualAllocExNuma;
+VirtualAllocExNumaProc _VirtualAllocExNuma;
void
osMemInit(void)
@@ -52,8 +52,8 @@ osMemInit(void)
/* Resolve and cache VirtualAllocExNuma. */
if (osNumaAvailable() && RtsFlags.GcFlags.numa)
{
- VirtualAllocExNuma = (VirtualAllocExNumaProc)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma");
- if (!VirtualAllocExNuma)
+ _VirtualAllocExNuma = (VirtualAllocExNumaProc)(void*)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma");
+ if (!_VirtualAllocExNuma)
{
sysErrorBelch(
"osBindMBlocksToNode: VirtualAllocExNuma does not exist. How did you get this far?");
@@ -569,7 +569,7 @@ void osBindMBlocksToNode(
On windows also -xb is broken, it does nothing so that can't
be used to tweak it (see #12577). So for now, just let the OS decide.
*/
- temp = VirtualAllocExNuma(
+ temp = _VirtualAllocExNuma(
GetCurrentProcess(),
NULL, // addr? See base memory
size,

View File

@ -1,11 +0,0 @@
--- ghc-8.10.4/docs/users_guide/conf.py.orig 2021-06-21 13:46:34.196383559 +0200
+++ ghc-8.10.4/docs/users_guide/conf.py 2021-06-21 13:46:54.839349941 +0200
@@ -100,7 +100,7 @@
latex_elements = {
'inputenc': '',
'utf8extra': '',
- 'preamble': '''
+ 'preamble': r'''
\usepackage{fontspec}
\usepackage{makeidx}
\setsansfont{DejaVu Sans}

View File

@ -9,13 +9,13 @@
}:
stdenv.mkDerivation rec {
pname = "glslang";
version = "13.1.1";
version = "14.0.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = version;
hash = "sha256-fuzNsVYdnThMzd4tLN/sTbCBXg6qXKLDJRziOKyOBGg=";
hash = "sha256-7kIIU45pe+IF7lGltpIKSvQBmcXR+TWFvmx7ztMNrpc=";
};
# These get set at all-packages, keep onto them for child drvs

View File

@ -46,11 +46,11 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "go";
version = "1.21.5";
version = "1.21.6";
src = fetchurl {
url = "https://go.dev/dl/go${finalAttrs.version}.src.tar.gz";
hash = "sha256-KFy730tubmLtWPNw8/bYwwgl1uVsWFPGbTwjvNsJ2xk=";
hash = "sha256-Ekkmpi5F942qu67bnAEdl2MxhqM8I4/8HiUyDAIEYkg=";
};
strictDeps = true;

View File

@ -158,6 +158,7 @@ let
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
echo "-lunwind" >> $out/nix-support/cc-ldflags
'' + lib.optionalString stdenv.targetPlatform.isWasm ''

View File

@ -248,7 +248,7 @@ in stdenv.mkDerivation (rec {
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -173,6 +173,7 @@ let
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
echo "-lunwind" >> $out/nix-support/cc-ldflags
'' + lib.optionalString stdenv.targetPlatform.isWasm ''

View File

@ -256,7 +256,7 @@ in stdenv.mkDerivation (rec {
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -173,6 +173,7 @@ let
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
echo "-lunwind" >> $out/nix-support/cc-ldflags
'' + lib.optionalString stdenv.targetPlatform.isWasm ''

View File

@ -244,7 +244,7 @@ in stdenv.mkDerivation (rec {
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -213,6 +213,7 @@ in let
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
echo "-lunwind" >> $out/nix-support/cc-ldflags
'' + lib.optionalString stdenv.targetPlatform.isWasm ''

View File

@ -206,7 +206,7 @@ in stdenv.mkDerivation (rec {
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -216,6 +216,7 @@ in let
(!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
"-lunwind"
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
nixSupport.cc-ldflags = lib.optionals (!stdenv.targetPlatform.isWasm) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
};
clangNoLibcxx = wrapCCWith rec {

View File

@ -205,7 +205,7 @@ in stdenv.mkDerivation (rec {
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -221,6 +221,7 @@ in let
(!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
"-lunwind"
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
nixSupport.cc-ldflags = lib.optionals (!stdenv.targetPlatform.isWasm) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
};
clangNoLibcxx = wrapCCWith rec {

View File

@ -56,6 +56,14 @@ stdenv.mkDerivation rec {
hash = "sha256-AaM9A6tQ4YAw7uDqCIV4VaiUyLZv+unwcOqbakwW9/k=";
relative = "libcxx";
})
# fix for https://github.com/NixOS/nixpkgs/issues/269548
# https://github.com/llvm/llvm-project/pull/77218
(fetchpatch {
name = "darwin-system-libcxxabi-link-flags.patch";
url = "https://github.com/llvm/llvm-project/commit/c5b89b29ee6e3c444a355fd1cf733ce7ab2e316a.patch";
hash = "sha256-LNoPg1KCoP8RWxU/AzHR52f4Dww24I9BGQJedMhFxyQ=";
relative = "libcxx";
})
] ++ lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
];

View File

@ -343,7 +343,7 @@ in stdenv.mkDerivation (rec {
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -226,6 +226,7 @@ in let
(!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
"-lunwind"
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
nixSupport.cc-ldflags = lib.optionals (!stdenv.targetPlatform.isWasm) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
};
clangNoLibcxx = wrapCCWith rec {

View File

@ -1,5 +1,5 @@
{ lib, stdenv, llvm_meta
, monorepoSrc, runCommand
, monorepoSrc, runCommand, fetchpatch
, cmake, ninja, python3, fixDarwinDylibNames, version
, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
, libcxxabi, libcxxrt, libunwind
@ -47,6 +47,14 @@ stdenv.mkDerivation rec {
patches = [
./gnu-install-dirs.patch
# fix for https://github.com/NixOS/nixpkgs/issues/269548
# https://github.com/llvm/llvm-project/pull/77218
(fetchpatch {
name = "darwin-system-libcxxabi-link-flags.patch";
url = "https://github.com/llvm/llvm-project/commit/c5b89b29ee6e3c444a355fd1cf733ce7ab2e316a.patch";
hash = "sha256-LNoPg1KCoP8RWxU/AzHR52f4Dww24I9BGQJedMhFxyQ=";
relative = "libcxx";
})
];
postPatch = ''

View File

@ -331,7 +331,7 @@ in
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -1,5 +1,5 @@
{ lib, stdenv, llvm_meta
, monorepoSrc, runCommand
, monorepoSrc, runCommand, fetchpatch
, cmake, ninja, python3, fixDarwinDylibNames, version
, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
, libcxxabi, libcxxrt, libunwind
@ -45,6 +45,17 @@ stdenv.mkDerivation rec {
chmod -R u+w .
'';
patches = [
# fix for https://github.com/NixOS/nixpkgs/issues/269548
# https://github.com/llvm/llvm-project/pull/77218
(fetchpatch {
name = "darwin-system-libcxxabi-link-flags.patch";
url = "https://github.com/llvm/llvm-project/commit/c5b89b29ee6e3c444a355fd1cf733ce7ab2e316a.patch";
hash = "sha256-LNoPg1KCoP8RWxU/AzHR52f4Dww24I9BGQJedMhFxyQ=";
relative = "libcxx";
})
];
postPatch = ''
cd ../runtimes
'';

View File

@ -330,7 +330,7 @@ stdenv.mkDerivation (rec {
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -161,6 +161,7 @@ let
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
echo "-lunwind" >> $out/nix-support/cc-ldflags
'' + lib.optionalString stdenv.targetPlatform.isWasm ''

View File

@ -222,7 +222,7 @@ in stdenv.mkDerivation (rec {
] ++ optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -161,6 +161,7 @@ let
echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm) ''
echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
echo "-L${targetLlvmLibraries.libunwind}/lib" >> $out/nix-support/cc-ldflags
'' + lib.optionalString (!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false) ''
echo "-lunwind" >> $out/nix-support/cc-ldflags
'' + lib.optionalString stdenv.targetPlatform.isWasm ''

View File

@ -237,7 +237,7 @@ in stdenv.mkDerivation (rec {
] ++ optionals (isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -216,6 +216,7 @@ in let
(!stdenv.targetPlatform.isWasm && stdenv.targetPlatform.useLLVM or false)
"-lunwind"
++ lib.optional stdenv.targetPlatform.isWasm "-fno-exceptions";
nixSupport.cc-ldflags = lib.optionals (!stdenv.targetPlatform.isWasm) [ "-L${targetLlvmLibraries.libunwind}/lib" ];
};
clangNoLibcxx = wrapCCWith rec {

View File

@ -1,5 +1,5 @@
{ lib, stdenv, llvm_meta
, monorepoSrc, runCommand
, monorepoSrc, runCommand, fetchpatch
, cmake, ninja, python3, fixDarwinDylibNames, version
, cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
, libcxxabi, libcxxrt, libunwind
@ -45,6 +45,17 @@ stdenv.mkDerivation rec {
chmod -R u+w .
'';
patches = [
# fix for https://github.com/NixOS/nixpkgs/issues/269548
# https://github.com/llvm/llvm-project/pull/77218
(fetchpatch {
name = "darwin-system-libcxxabi-link-flags.patch";
url = "https://github.com/llvm/llvm-project/commit/c5b89b29ee6e3c444a355fd1cf733ce7ab2e316a.patch";
hash = "sha256-LNoPg1KCoP8RWxU/AzHR52f4Dww24I9BGQJedMhFxyQ=";
relative = "libcxx";
})
];
postPatch = ''
cd ../runtimes
'';

View File

@ -329,7 +329,7 @@ stdenv.mkDerivation (rec {
] ++ optionals isDarwin [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
] ++ optionals ((stdenv.hostPlatform != stdenv.buildPlatform) && !(stdenv.buildPlatform.canExecute stdenv.hostPlatform)) [
"-DCMAKE_CROSSCOMPILING=True"
"-DLLVM_TABLEGEN=${buildLlvmTools.llvm}/bin/llvm-tblgen"
(

View File

@ -1,92 +0,0 @@
From 8c747d3157df2830eed9205e7caf1203b345de17 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 4 Feb 2023 13:54:41 -0800
Subject: [PATCH] cmake: Enable 64bit off_t on 32bit glibc systems
Pass -D_FILE_OFFSET_BITS=64 to compiler flags on 32bit glibc based
systems. This will make sure that 64bit versions of LFS functions are
used e.g. seek will behave same as lseek64. Also revert [1] partially
because this added a cmake test to detect lseek64 but then forgot to
pass the needed macro to actual compile, this test was incomplete too
since libc implementations like musl has 64bit off_t by default on 32bit
systems and does not bundle[2] -D_LARGEFILE64_SOURCE under -D_GNU_SOURCE
like glibc, which means the compile now fails on musl because the cmake
check passes but we do not have _LARGEFILE64_SOURCE defined. Using the
*64 function was transitional anyways so use -D_FILE_OFFSET_BITS=64
instead
[1] https://github.com/llvm/llvm-project/commit/8db7e5e4eed4c4e697dc3164f2c9351d8c3e942b
[2] https://git.musl-libc.org/cgit/musl/commit/?id=25e6fee27f4a293728dd15b659170e7b9c7db9bc
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D139752
(cherry picked from commit 5cd554303ead0f8891eee3cd6d25cb07f5a7bf67)
---
cmake/config-ix.cmake | 13 ++++++++++---
include/llvm/Config/config.h.cmake | 3 ---
lib/Support/raw_ostream.cpp | 2 --
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 18977d9950ff..b558aa83fa62 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -197,9 +197,6 @@ check_symbol_exists(posix_fallocate fcntl.h HAVE_POSIX_FALLOCATE)
if( HAVE_SIGNAL_H AND NOT LLVM_USE_SANITIZER MATCHES ".*Address.*" AND NOT APPLE )
check_symbol_exists(sigaltstack signal.h HAVE_SIGALTSTACK)
endif()
-set(CMAKE_REQUIRED_DEFINITIONS "-D_LARGEFILE64_SOURCE")
-check_symbol_exists(lseek64 "sys/types.h;unistd.h" HAVE_LSEEK64)
-set(CMAKE_REQUIRED_DEFINITIONS "")
check_symbol_exists(mallctl malloc_np.h HAVE_MALLCTL)
check_symbol_exists(mallinfo malloc.h HAVE_MALLINFO)
check_symbol_exists(malloc_zone_statistics malloc/malloc.h
@@ -237,6 +234,16 @@ if( PURE_WINDOWS )
check_function_exists(__main HAVE___MAIN)
check_function_exists(__cmpdi2 HAVE___CMPDI2)
endif()
+
+check_symbol_exists(__GLIBC__ stdio.h LLVM_USING_GLIBC)
+if( LLVM_USING_GLIBC )
+# enable 64bit off_t on 32bit systems using glibc
+ if (CMAKE_SIZEOF_VOID_P EQUAL 4)
+ add_compile_definitions(_FILE_OFFSET_BITS=64)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS "-D_FILE_OFFSET_BITS=64")
+ endif()
+endif()
+
if( HAVE_DLFCN_H )
if( HAVE_LIBDL )
list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake
index e934617d7ec7..3c39c373b3c1 100644
--- a/include/llvm/Config/config.h.cmake
+++ b/include/llvm/Config/config.h.cmake
@@ -112,9 +112,6 @@
/* Define to 1 if you have the <link.h> header file. */
#cmakedefine HAVE_LINK_H ${HAVE_LINK_H}
-/* Define to 1 if you have the `lseek64' function. */
-#cmakedefine HAVE_LSEEK64 ${HAVE_LSEEK64}
-
/* Define to 1 if you have the <mach/mach.h> header file. */
#cmakedefine HAVE_MACH_MACH_H ${HAVE_MACH_MACH_H}
diff --git a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
index 038ad00bd608..921ab8409008 100644
--- a/lib/Support/raw_ostream.cpp
+++ b/lib/Support/raw_ostream.cpp
@@ -677,8 +677,6 @@ uint64_t raw_fd_ostream::seek(uint64_t off) {
flush();
#ifdef _WIN32
pos = ::_lseeki64(FD, off, SEEK_SET);
-#elif defined(HAVE_LSEEK64)
- pos = ::lseek64(FD, off, SEEK_SET);
#else
pos = ::lseek(FD, off, SEEK_SET);
#endif
--
2.37.1

View File

@ -48,7 +48,14 @@ disable-warnings-if-gcc13 (stdenv.mkDerivation {
inherit (branch) rev hash;
};
patches = lib.optionals (llvmMajor == "16") [
patches = [
# Fixes build after spirv-headers breaking change
(fetchpatch {
url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0.patch";
excludes = ["spirv-headers-tag.conf"];
hash = "sha256-17JJG8eCFVphElY5fVT/79hj0bByWxo8mVp1ZNjQk/M=";
})
] ++ lib.optionals (llvmMajor == "16") [
# Fixes builds that link against external LLVM dynamic library
(fetchpatch {
url = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/f3b9b604d7eda18d0d1029d94a6eebd33aa3a3fe.patch";

View File

@ -57,7 +57,7 @@ let
isJdk8 = lib.versions.major dist.jdkVersion == "8";
jdk = stdenv.mkDerivation rec {
pname = "zulu${dist.zuluVersion}-${javaPackage}";
pname = "zulu-${javaPackage}";
version = dist.jdkVersion;
src = fetchurl {

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