Skip to content

Commit

Permalink
link to documentation on IFD in the Nix manual
Browse files Browse the repository at this point in the history
  • Loading branch information
fricklerhandwerk committed Oct 9, 2023
1 parent ba10489 commit 61fa125
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion doc/languages-frameworks/rust.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ $ cargo test
## Using community maintained Rust toolchains {#using-community-maintained-rust-toolchains}

::: {.note}
Note: The following projects cannot be used within nixpkgs since [IFD](#ssec-import-from-derivation) is disallowed.
The following projects cannot be used within Nixpkgs since [Import From Derivation](https://nixos.org/manual/nix/unstable/language/import-from-derivation) (IFD) is disallowed in Nixpkgs.
To package things that require Rust nightly, `RUSTC_BOOTSTRAP = true;` can sometimes be used as a hack.
:::

Expand Down
2 changes: 1 addition & 1 deletion lib/fileset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ File sets do not support Nix store paths in strings such as `"/nix/store/...-sou

Arguments:
- (+) Such paths are usually produced by derivations, which means `toSource` would either:
- Require IFD if `builtins.path` is used as the underlying primitive
- Require [Import From Derivation](https://nixos.org/manual/nix/unstable/language/import-from-derivation) (IFD) if `builtins.path` is used as the underlying primitive
- Require importing the entire `root` into the store such that derivations can be used to do the filtering
- (+) The convenient path coercion like `union ./foo ./bar` wouldn't work for absolute paths, requiring more verbose alternate interfaces:
- `let root = "/nix/store/...-source"; in union "${root}/foo" "${root}/bar"`
Expand Down
12 changes: 2 additions & 10 deletions pkgs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,19 +368,11 @@ See the Nixpkgs manual for more details on [standard meta-attributes](https://ni

### Import From Derivation

Import From Derivation (IFD) is disallowed in Nixpkgs for performance reasons:
[Hydra] evaluates the entire package set, and sequential builds during evaluation would increase evaluation times to become impractical.

[Hydra]: https://github.com/NixOS/hydra
[Import From Derivation](https://nixos.org/manual/nix/unstable/language/import-from-derivation) (IFD) is disallowed in Nixpkgs for performance reasons:
[Hydra](https://github.com/NixOS/hydra) evaluates the entire package set, and sequential builds during evaluation would increase evaluation times to become impractical.

Import From Derivation can be worked around in some cases by committing generated intermediate files to version control and reading those instead.

<!-- TODO: remove the following and link to Nix manual once https://github.com/NixOS/nix/pull/7332 is merged -->

See also [NixOS Wiki: Import From Derivation].

[NixOS Wiki: Import From Derivation]: https://nixos.wiki/wiki/Import_From_Derivation

## Sources

### Fetching Sources
Expand Down

0 comments on commit 61fa125

Please sign in to comment.