Nix Packages collection & NixOS
  • Nix 95%
  • Shell 2%
  • Python 1.8%
  • Rust 0.3%
  • JavaScript 0.2%
  • Other 0.4%
Find a file
Acture 1ba36147a8 flang: package standalone flang with LLVM 20+ driver fixes
Wire flang into llvmPackages as a first-class Fortran compiler. flang
is built standalone on top of the LLVM/clang package set rather than
bundled into the llvm derivation, with passthru metadata
(`langFortran`, `isFlang`, `isClang`, `hardeningUnsupportedFlags`) so
cc-wrapper and downstream tooling can detect and adapt to it.

Driver compatibility patches backported from upstream are applied
selectively per LLVM version:

  * `use-xflang-in-diagnostics` is applied to LLVM 20 and newer; it
    teaches the driver to suggest `-Xflang` instead of `-Xclang` in
    error messages for options only available to `flang -fc1`.
  * `warn-on-fbuiltin-and-fno-builtin` and
    `accept-and-ignore-some-gfortran-optimization-flags` are applied
    to LLVM 20 and 21 only. LLVM 22 has equivalent behaviour merged
    upstream (`warn_drv_invalid_argument_for_flang` and
    `clang_ignored_gcc_optimization_f_Group` handling in
    clang/lib/Driver/ToolChains/Flang.cpp), so the patches are skipped
    there.

Patches live under pkgs/development/compilers/llvm/21/flang/ and are
shared across versions via patches.nix. They are applied to a private
libclang variant rather than the flang source tree because standalone
flang resolves driver/option definitions through the installed libclang
package.

Two focused passthru tests are added:

  * `compile-smoke` exercises basic compilation and `@response-file`
    handling.
  * `driver-flags` covers wrapper flag isolation
    (`NIX_CFLAGS_COMPILE` must not leak into flang;
    `NIX_FFLAGS_COMPILE` must reach it), the backported driver
    diagnostics, and regression coverage for previously hard-erroring
    flags.

Build on the earlier standalone flang work by @picostove.

Co-authored-by: stove <stove@rivosinc.com>
Co-authored-by: acture <acture@gmail.com>
Co-authored-by: Alyssa Ross <hi@alyssa.is>
2026-05-04 18:06:36 +08:00
.devcontainer .devcontainer: change nixfmt-rfc-style to nixfmt 2026-01-23 16:38:52 -05:00
.github actions/checkout: update github-script action (#504822) 2026-03-29 23:52:31 +00:00
ci Revert "Reapply "ci/pinned: update"" 2026-03-29 17:14:34 -04:00
doc Merge staging-next into staging 2026-03-30 00:28:16 +00:00
lib lib/systems: remove redundant conditional 2026-03-29 09:07:03 +10:00
maintainers Merge staging-next into staging 2026-03-30 06:39:33 +00:00
modules Reapply "ci: module maintainer review requests; nixos/modules: init meta.teams" 2026-03-13 16:53:28 +01:00
nixos Merge staging-next into staging 2026-03-30 00:28:16 +00:00
pkgs flang: package standalone flang with LLVM 20+ driver fixes 2026-05-04 18:06:36 +08:00
.editorconfig .editorconfig: don't force final newline for JSON 2026-01-16 01:45:43 +01:00
.git-blame-ignore-revs .git-blame-ignore-revs: add nixfmt 1.2.0 commit 2026-01-22 19:00:19 -03:00
.gitattributes
.gitignore
.mailmap mailmap: update jopejoe1 (#489929) 2026-02-12 21:35:08 +00:00
.version
CONTRIBUTING.md CONTRIBUTING: Ofborg is not required to use merge bot 2026-02-14 16:03:52 -05:00
COPYING COPYING: 2025 -> 2026 2026-01-07 14:31:39 +02:00
default.nix
flake.nix flake.nix: exclude armv7l-linux and powerpc64le-linux from checks, devShells and formatter 2026-01-26 22:06:19 -05:00
README.md treewide: fix typos 2026-01-13 14:45:11 -05:00
shell.nix shell: use nixpkgs-reviewFull 2025-11-25 15:44:10 -05:00

NixOS logo

Contributors badge Open Collective supporters

Nixpkgs is a collection of over 120,000 software packages that can be installed with the Nix package manager. It also implements NixOS, a purely-functional Linux distribution.

Manuals

  • NixOS Manual - how to install, configure, and maintain a purely-functional Linux distribution
  • Nixpkgs Manual - contributing to Nixpkgs and using programming-language-specific Nix expressions
  • Nix Package Manager Manual - how to write Nix expressions (programs), and how to use Nix command line tools

Community

Other Project Repositories

The sources of all official Nix-related projects are in the NixOS organization on GitHub. Here are some of the main ones:

Continuous Integration and Distribution

Nixpkgs and NixOS are built and tested by our continuous integration system, Hydra.

Artifacts successfully built with Hydra are published to cache at https://cache.nixos.org/. When successful build and test criteria are met, the Nixpkgs expressions are distributed via Nix channels.

Contributing

Nixpkgs is among the most active projects on GitHub. While thousands of open issues and pull requests might seem like a lot at first, it helps to consider it in the context of the scope of the project. Nixpkgs describes how to build tens of thousands of pieces of software and implements a Linux distribution. The GitHub Insights page gives a sense of the project activity.

Community contributions are always welcome through GitHub Issues and Pull Requests.

For more information about contributing to the project, please visit the contributing page.

Donations

The infrastructure for NixOS and related projects is maintained by a nonprofit organization, the NixOS Foundation. To ensure the continuity and expansion of the NixOS infrastructure, we are looking for donations to our organization.

You can donate to the NixOS Foundation through SEPA bank transfers or by using Open Collective:

License

Nixpkgs is licensed under the MIT License.

Note

MIT license does not apply to the packages built by Nixpkgs, merely to the files in this repository (the Nix expressions, build scripts, NixOS modules, etc.). It also might not apply to patches included in Nixpkgs, which may be derivative works of the packages to which they apply. The aforementioned artifacts are all covered by the licenses of the respective packages.