1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00
Nix, the purely functional package manager
Find a file
Sergei Zimmerman dce1a893d0
treewide: Remove toView() because it leads to segfaults when compiled with newer nixpkgs
Firstly, this is now available on darwin where the default in llvm 19.
Secondly, this leads to very weird segfaults when building with newer nixpkgs for some reason.
(It's UB after all).

This appears when building with the following:

mesonComponentOverrides = finalAttrs: prevAttrs: {
mesonBuildType = "debugoptimized";
dontStrip = true;
doCheck = false;
separateDebugInfo = false;
preConfigure = (prevAttrs.preConfigure or "") + ''
  case "$mesonBuildType" in
  release|minsize|debugoptimized) appendToVar mesonFlags "-Db_lto=true"  ;;
  *)                              appendToVar mesonFlags "-Db_lto=false" ;;
  esac
'';
};

And with the following nixpkgs input:

nix build ".#nix-cli" -L --override-input nixpkgs "https://releases.nixos.org/nixos/unstable/nixos-25.11pre870157.7df7ff7d8e00/nixexprs.tar.xz"

Stacktrace:

 #0  0x00000000006afdc0 in ?? ()
 #1  0x00007ffff71cebb6 in _Unwind_ForcedUnwind_Phase2 () from /nix/store/41ym1jm1b7j3rhglk82gwg9jml26z1km-gcc-14.3.0-lib/lib/libgcc_s.so.1
 #2  0x00007ffff71cf5b5 in _Unwind_Resume () from /nix/store/41ym1jm1b7j3rhglk82gwg9jml26z1km-gcc-14.3.0-lib/lib/libgcc_s.so.1
 #3  0x00007ffff7eac7d8 in std::basic_ios<char, std::char_traits<char> >::~basic_ios (this=<optimized out>, this=<optimized out>)
     at /nix/store/82kmz7r96navanrc2fgckh2bamiqrgsw-gcc-14.3.0/include/c++/14.3.0/bits/basic_ios.h:286
 #4  std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream (this=<optimized out>, this=<optimized out>)
     at /nix/store/82kmz7r96navanrc2fgckh2bamiqrgsw-gcc-14.3.0/include/c++/14.3.0/sstream:806
 #5  nix::SimpleLogger::logEI (this=<optimized out>, ei=...) at ../logging.cc:121
 #6  0x00007ffff7515794 in nix::Logger::logEI (this=0x675450, lvl=nix::lvlError, ei=...) at /nix/store/bkshji3nnxmrmgwa4n2kaxadajkwvn65-nix-util-2.32.0pre-dev/include/nix/util/logging.hh:144
 #7  nix::handleExceptions (programName=..., fun=...) at ../shared.cc:336
 #8  0x000000000047b76b in main (argc=<optimized out>, argv=<optimized out>) at /nix/store/82kmz7r96navanrc2fgckh2bamiqrgsw-gcc-14.3.0/include/c++/14.3.0/bits/new_allocator.h:88
2025-10-05 02:30:21 +03:00
.github link to jitsi meeting in the PR docs 2025-10-01 22:23:31 +02:00
ci/gha ci: Split formatting check into a separate job, gate other jobs 2025-09-24 00:34:35 +03:00
contrib function-trace: always show the trace 2019-09-18 23:23:21 +02:00
doc/manual add changelog for http binary cache compression 2025-09-30 11:05:20 +02:00
maintainers shellcheck fix: tests/functional/why-depends.sh 2025-09-30 20:27:51 -07:00
misc shellcheck fix: completion files 2025-09-26 08:41:30 -07:00
nix-meson-build-support fix cross-build for cygwin 2025-09-22 12:27:04 -03:00
packaging packaging: Build without symbolic interposition on GCC 2025-09-29 01:46:40 +03:00
scripts Merge branch 'master' into fzakaria/shellcheck-systemd-multi-user 2025-09-25 07:40:27 +02:00
src treewide: Remove toView() because it leads to segfaults when compiled with newer nixpkgs 2025-10-05 02:30:21 +03:00
tests Merge pull request #14138 from lovesegfault/nix-fix-4313 2025-10-03 15:13:06 +02:00
.clang-format Update clang-format with fixing namespace coments, and separate definition blocks 2025-07-18 12:46:51 -04:00
.clang-tidy Add .clang-tidy 2024-02-01 01:01:39 +01:00
.dir-locals.el .dir-locals.el: Set c-block-comment-prefix 2020-07-10 11:21:06 +02:00
.editorconfig No global eval settings in libnixexpr 2024-06-24 12:15:16 -04:00
.git-blame-ignore-revs git-blame-ignore-revs: Add nixfmt 1.0.0 reformat 2025-08-18 20:30:54 +03:00
.gitignore Overriding gtest with gmock 2025-05-31 07:41:27 -07:00
.mergify.yml Update mergify.yml 2025-08-25 10:28:47 +02:00
.shellcheckrc housekeeping: shellcheck for tests/functional/ca/build-cache.sh 2024-06-12 17:41:16 -04:00
.version Bump version 2025-08-25 10:27:46 +02:00
CITATION.cff chore: PhD thesis as reference in CITATION.cff 2024-05-18 20:05:22 +02:00
CONTRIBUTING.md Update developer facing links to nix.dev 2025-07-25 10:59:44 +02:00
COPYING COPYING: update to latest lgpl-2.1.txt (fixes #13758) 2025-09-18 00:45:01 +08:00
default.nix Format .nix files 2025-01-24 17:04:02 +01:00
docker.nix Merge pull request #13524 from gmarti/fix_cacertificate 2025-08-28 23:28:53 +03:00
flake.lock flake: Update nixpkgs 2025-08-27 02:23:05 +03:00
flake.nix flake: nixpkgs: nixos-unstable -> nixos-25.05-small 2025-08-18 20:04:57 +03:00
HACKING.md Rename doc/manual{src -> source} 2024-10-14 11:21:24 -04:00
meson.build treewide: Support builds with ASAN, enable in CI 2025-09-19 01:33:57 +03:00
meson.format flake: Add meson formatter 2025-06-11 22:08:03 +00:00
meson.options add derivation parser benchmark 2025-07-29 16:51:55 +02:00
README.md fix(docs): update Matrix channel links 2025-05-04 12:17:48 +02:00
shell.nix Remove url literals 2022-01-24 13:28:21 +01:00

Nix

Open Collective supporters CI

Nix is a powerful package manager for Linux and other Unix systems that makes package management reliable and reproducible. Please refer to the Nix manual for more details.

Installation and first steps

Visit nix.dev for installation instructions and beginner tutorials.

Full reference documentation can be found in the Nix manual.

Building and developing

Follow instructions in the Nix reference manual to set up a development environment and build Nix from source.

Contributing

Check the contributing guide if you want to get involved with developing Nix.

Additional resources

Nix was created by Eelco Dolstra and developed as the subject of his PhD thesis The Purely Functional Software Deployment Model, published 2006. Today, a world-wide developer community contributes to Nix and the ecosystem that has grown around it.

License

Nix is released under the LGPL v2.1.