A modern, delicious implementation of the Nix package manager, focused on correctness, usability, and growth — and committed to doing right by its community https://lix.systems
Go to file
eldritch horrors e6cd67591b libexpr: rewrite the parser with pegtl instead of flex/bison
this gives about 20% performance improvements on pure parsing. obviously
it will be less on full eval, but depending on how much parsing is to be
done (e.g. including hackage-packages.nix or not) it's more like 4%-10%.

this has been tested (with thousands of core hours of fuzzing) to ensure
that the ASTs produced by the new parser are exactly the same as the old
one would have produced. error messages will change (sometimes by a lot)
and are not yet perfect, but we would rather leave this as is for later.

test results for running only the parser (excluding the variable binding
code) in a tight loop with inputs and parameters as given are promising:

  - 40% faster on lix's package.nix at 10000 iterations
  - 1.3% faster on nixpkgs all-packages.nix at 1000 iterations
  - equivalent on all of nixpkgs concatenated at 100 iterations
    (excluding invalid files, each file surrounded with parens)

more realistic benchmarks are somewhere in between the extremes, parsing
once again getting the largest uplift. other realistic workloads improve
by a few percentage points as well, notably system builds are 4% faster.

Benchmarks summary (from ./bench/summarize.jq bench/bench-*.json)
old/bin/nix --extra-experimental-features 'nix-command flakes' eval -f bench/nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix
  mean:     0.408s ± 0.025s
            user: 0.355s | system: 0.033s
  median:   0.389s
  range:    0.388s ... 0.442s
  relative: 1

new/bin/nix --extra-experimental-features 'nix-command flakes' eval -f bench/nixpkgs/pkgs/development/haskell-modules/hackage-packages.nix
  mean:     0.332s ± 0.024s
            user: 0.279s | system: 0.033s
  median:   0.314s
  range:    0.313s ... 0.361s
  relative: 0.814

---

old/bin/nix --extra-experimental-features 'nix-command flakes' eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system'
  mean:     6.133s ± 0.022s
            user: 5.395s | system: 0.437s
  median:   6.128s
  range:    6.099s ... 6.183s
  relative: 1

new/bin/nix --extra-experimental-features 'nix-command flakes' eval --raw --impure --expr 'with import <nixpkgs/nixos> {}; system'
  mean:     5.925s ± 0.025s
            user: 5.176s | system: 0.456s
  median:   5.934s
  range:    5.861s ... 5.943s
  relative: 0.966

---

GC_INITIAL_HEAP_SIZE=10g old/bin/nix eval --extra-experimental-features 'nix-command flakes' --raw --impure --expr 'with import <nixpkgs/nixos> {}; system'
  mean:     4.503s ± 0.027s
            user: 3.731s | system: 0.547s
  median:   4.499s
  range:    4.478s ... 4.541s
  relative: 1

GC_INITIAL_HEAP_SIZE=10g new/bin/nix eval --extra-experimental-features 'nix-command flakes' --raw --impure --expr 'with import <nixpkgs/nixos> {}; system'
  mean:     4.285s ± 0.031s
            user: 3.504s | system: 0.571s
  median:   4.281s
  range:    4.221s ... 4.328s
  relative: 0.951

---

old/bin/nix --extra-experimental-features 'nix-command flakes' search --no-eval-cache github:nixos/nixpkgs/e1fa12d4f6c6fe19ccb59cac54b5b3f25e160870 hello
  mean:     16.475s ± 0.07s
            user: 14.088s | system: 1.572s
  median:   16.495s
  range:    16.351s ... 16.536s
  relative: 1

new/bin/nix --extra-experimental-features 'nix-command flakes' search --no-eval-cache github:nixos/nixpkgs/e1fa12d4f6c6fe19ccb59cac54b5b3f25e160870 hello
  mean:     15.973s ± 0.013s
            user: 13.558s | system: 1.615s
  median:   15.973s
  range:    15.946s ... 15.99s
  relative: 0.97

---

Change-Id: Ie66ec2d045dec964632c6541e25f8f0797319ee2
2024-06-25 12:24:58 +00:00
.github .github: clean up stale things and wrong references 2024-06-12 15:34:23 -07:00
bench Add benchmarking scripts 2024-04-08 19:50:24 -07:00
clang-tidy clang-tidy: work with angle brackets and external projects 2024-05-24 02:22:58 +00:00
contrib function-trace: always show the trace 2019-09-18 23:23:21 +02:00
doc Add build-dir setting, clean up default TMPDIR handling 2024-06-24 11:30:32 +03:00
lix-doc lix-doc: don't chomp bold headings off 2024-05-15 15:24:03 -07:00
maintainers releng: automatically add to the summary page 2024-06-15 18:46:18 -07:00
meson libexpr: rewrite the parser with pegtl instead of flex/bison 2024-06-25 12:24:58 +00:00
misc libexpr: rewrite the parser with pegtl instead of flex/bison 2024-06-25 12:24:58 +00:00
nix-support Move version to a JSON file so we can have release names 2024-06-06 15:08:12 -07:00
perl Move version to a JSON file so we can have release names 2024-06-06 15:08:12 -07:00
releng releng: fix broken manifest from 2.90-rc1 2024-06-16 13:34:04 -07:00
scripts remove the autoconf+Make buildsystem 2024-05-07 17:04:30 -06:00
src libexpr: rewrite the parser with pegtl instead of flex/bison 2024-06-25 12:24:58 +00:00
subprojects/aws_sdk build: fix static aws-cpp-sdk 2024-05-30 00:40:25 -06:00
tests libexpr: rewrite the parser with pegtl instead of flex/bison 2024-06-25 12:24:58 +00:00
.clang-format Add pre-commit checks 2024-03-29 22:57:40 -07:00
.clang-tidy Add basic clang-tidy config 2024-03-29 20:26:38 -07:00
.dir-locals.el .dir-locals.el: Set c-block-comment-prefix 2020-07-10 11:21:06 +02:00
.editorconfig add editorconfig for markdown 2024-05-24 02:22:44 +00:00
.envrc Set MAKEFLAGS=-j and GTEST_BRIEF in .envrc 2024-03-28 18:17:28 -07:00
.gitignore Put into place initial release engineering 2024-06-06 20:53:08 -07:00
.this-is-lix devShell: guard against running from another directory 2024-06-24 13:41:38 -07:00
boehmgc-coroutine-sp-fallback.diff [resubmit] flake: update nixpkgs pin 23.11->24.05 (+ boehmgc compat changes) 2024-06-12 15:34:22 -07:00
CONTRIBUTING.md chore: re-work the contribution guide 2024-05-07 01:28:35 +00:00
COPYING Add pre-commit checks 2024-03-29 22:57:40 -07:00
default.nix Format Nix code with nixfmt 2024-04-08 13:00:00 -07:00
docker.nix releng: support multiarch docker images 2024-06-09 20:33:24 -07:00
flake.lock [resubmit] flake: update nixpkgs pin 23.11->24.05 (+ boehmgc compat changes) 2024-06-12 15:34:22 -07:00
flake.nix libexpr: rewrite the parser with pegtl instead of flex/bison 2024-06-25 12:24:58 +00:00
justfile justfile: accept extra options to just setup and pass them to meson 2024-06-24 13:37:01 -07:00
meson.build libexpr: rewrite the parser with pegtl instead of flex/bison 2024-06-25 12:24:58 +00:00
meson.options build: expose option to enable or disable precompiled std headers 2024-06-06 12:46:26 -06:00
package.nix libexpr: rewrite the parser with pegtl instead of flex/bison 2024-06-25 12:24:58 +00:00
README.md chore: rebrand Nix to Lix when it makes sense 2024-06-01 20:31:24 +02:00
shell.nix shell.nix: conform to documentation 2024-05-27 16:47:40 +02:00
treefmt.toml Format Nix code with nixfmt 2024-04-08 13:00:00 -07:00
version.json version: update to 2.91-dev for main 2024-06-15 18:46:18 -07:00

Lix

Lix is an implementation of Nix, a powerful package management system for Linux and other Unix systems that makes package management reliable and reproducible.

Read more about us at https://lix.systems.

Installation

On Linux and macOS the easiest way to install Lix is to run the following shell command (as a user other than root):

$ curl -sSf -L https://install.lix.systems/lix | sh -s -- install

For systems that already have a Nix implementation installed, such as NixOS systems, read our install page

Building And Developing

See our Hacking guide in our manual for instruction on how to to set up a development environment and build Lix from source.

Additional Resources

License

Lix is released under the LGPL v2.1.