Skip to content

Commit

Permalink
Merge pull request #1297 from rohaquinlop/issue-1296
Browse files Browse the repository at this point in the history
feat(docs): #1296 add note about homeless-shelter
  • Loading branch information
rohaquinlop authored Feb 19, 2024
2 parents 97e7d9c + b72cf0a commit 98bf6e3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/src/api/extensions/fundamentals.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,14 +527,14 @@ Types:
to `projectStateDir` otherwise.
Defaults to `false`, if `projectStateDir` is specified or derived.
Note:
- It is implicitly `true`, if `projectStateDir == globalStateDir`.
- `projectStateDir == globalStateDir` is the default if
`projectIdentifier` is not configured.
- Hence, generally enable project local state by
- either setting `projectIdentifier`
- or `projectStateDir` different from `globalStateDir`.
???+ note
- It is implicitly `true`, if `projectStateDir == globalStateDir`.
- `projectStateDir == globalStateDir` is the default if
`projectIdentifier` is not configured.
- Hence, generally enable project local state by
- either setting `projectIdentifier`
- or `projectStateDir` different from `globalStateDir`.
Example:
Expand Down
12 changes: 12 additions & 0 deletions docs/src/api/extensions/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ Types:
For more information see [here](https://github.com/nix-community/poetry2nix/blob/master/docs/edgecases.md).
Defaults to `(self: super: {})`.

???+ note

By default we override every python package deleting the
`homeless-shelter` directory and changing the `HOME` variable,
we make this to assure purity of builds without sandboxing.

Example:

=== "main.nix"
Expand All @@ -43,6 +49,12 @@ Example:
overrides = self: super: {
pygments = super.pygments.overridePythonAttrs (
old: {
preUnpack =
''
export HOME=$(mktemp -d)
rm -rf /homeless-shelter
''
+ (old.preUnpack or "");
buildInputs = [super.setuptools];
}
);
Expand Down

0 comments on commit 98bf6e3

Please sign in to comment.