- C++ 78.6%
- Shell 9.5%
- Nix 7.7%
- Meson 1.8%
- C 1.2%
- Other 1.2%
|
Some checks failed
CI / eval (push) Has been cancelled
CI / pre-commit checks (push) Has been cancelled
CI / aggregate basic checks (push) Has been cancelled
CI / tests on macos (push) Has been cancelled
CI / tests on ubuntu (push) Has been cancelled
CI / tests on ubuntu (with sanitizers / coverage) (push) Has been cancelled
CI / windows unit tests (push) Has been cancelled
CI / installer test on macos (push) Has been cancelled
CI / installer test on macos (rust) (push) Has been cancelled
CI / installer test on ubuntu (push) Has been cancelled
CI / installer test on ubuntu (rust) (push) Has been cancelled
CI / clang-tidy (push) Has been cancelled
CI / flake_regressions (push) Has been cancelled
CI / profile_build (push) Has been cancelled
|
||
|---|---|---|
| .github | ||
| ci/gha | ||
| contrib | ||
| doc/manual | ||
| maintainers | ||
| misc | ||
| nix-meson-build-support | ||
| packaging | ||
| scripts | ||
| src | ||
| tests | ||
| .clang-format | ||
| .clang-tidy | ||
| .coderabbit.yaml | ||
| .dir-locals.el | ||
| .editorconfig | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .shellcheckrc | ||
| .version | ||
| CITATION.cff | ||
| CONTRIBUTING.md | ||
| COPYING | ||
| default.nix | ||
| docker.nix | ||
| flake.lock | ||
| flake.nix | ||
| HACKING.md | ||
| meson.build | ||
| meson.format | ||
| meson.options | ||
| README.md | ||
| shell.nix | ||
Nix Super
It's Nix, but super!
This is an upstream-tracking fork of Nix that includes various patches, some controversial in nature and not fit for Nix upstream.
Features
nix-flake-default.patch from nix-dram
This uses an older version of the patch, when the name of the default installable was not yet configurable.
If you have an entry called default in your Nix registry, you can do things like:
$ nix shell jq gron kubectl
# equivalent to nix shell default#jq default#gron default#kubectl
Experimental features enabled by default
The following experimental features are enabled by default:
flakes(Xp::Flakes)nix-command(Xp::NixCommand)fetch-tree(Xp::FetchTree)
Additional settings
The following settings are added to this fork:
reject-flake-config: rejects all flake configuration (including whitelisted settings) and warns about it
Full thunk evaluation in flake.nix
In stock Nix, only the outputs section of flake.nix is able to make full use of the Nix language.
The inputs section as well as the top-level attribute set are required to be trivial.
This is for good reason, as it prevents arbitrarily complex computations during operations where you would not expect this,
such as nix flake metadata.
Nonetheless, people were often annoyed by this limitation. Nix Super includes patches to disable the triviality checks,
to encourage experimentation with fancy new ways of handling flake inputs.
Named packages in nix profile
A preemptive merge of https://github.com/NixOS/nix/pull/8678
Activatables
Nix Super introduces the concept of activatables; applications that are installed solely in their own profile and rely on an activation script to perform actions outside of the Nix store.
Two new subcommands are implemented to make use of activatables:
- nix system for managing NixOS, as a replacement for
nixos-rebuild - nix home for managing home-manager configurations, as a replacement for the
home-managerCLI tool
Easy use of callPackage from the CLI
The flag -C/--call-package allows you to directly build callPackageable expressions from the CLI.
This invokes import <nixpkgs> {} to get access to callPackage.
$ cat hello.nix
{
stdenv,
hello
}:
stdenv.mkDerivation {
name = "hello";
nativeBuildInputs = [ hello ];
buildCommand = "hello > $out";
}
$ nix build -C hello.nix
$ cat result
Hello, world!
CLI overrides
Various CLI flags have been added to allow on-the-fly overriding of installables.
Override expression arguments
Allows overriding any argument usually overridable via .override. Can be used multiple times.
$ nix build ffmpeg --override withMfx true
Override packages
Like --override, but for overriding packages. This can be any installable from any flake. Can be used multiple times.
$ nix build nil --override-pkg nix github:privatevoid-net/nix-super
Override attributes
The previous attributes are available in old, but are also in scope via with.
$ nix build hello --override-attrs '{ name = "my-${name}"; src = ./.; }' --impure
Use withPackages
The packages are available in ps, but are also in scope via with.
$ nix shell python3 --with '[ numpy pandas matplotlib ]'
Do anything
--apply-to-installabe gives you direct access to the installable in a function
$ nix build writeText --apply-to-installable 'writeText: writeText "test" "hello"'
Additional environment variables for nix shell
nix shell will prepend the /bin directory of a given package to PATH, but what about other environment variables?
Nix Super configures many other environment variables, including:
CUPS_DATADIRDICPATHGIO_EXTRA_MODULESGI_TYPELIB_PATHGST_PLUGIN_PATH_1_0GTK_PATHINFOPATHLADSPA_PATHLIBEXEC_PATHLV2_PATHMOZ_PLUGIN_PATHQTWEBKIT_PLUGIN_PATHTERMINFO_DIRSXDG_CONFIG_DIRSXDG_DATA_DIRS
It also sets IN_NIX3_SHELL=1 to allow external processes to detect when you're in a Nix shell,
for scripting or shell prompt customization.
Support for the git+ipld fetcher scheme
Adds git+ipld to the list of supported URL schemes for the git fetcher. Allows you to use Nix with git-remote-ipld.
NOTE: This does not mean that Nix Super itself has any IPFS capabilities (yet).