You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/hooks/versionCheckHook.section.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ The variables that this phase control are:
33
33
-`dontVersionCheck`: Disable adding this hook to the [`preInstallCheckHooks`](#ssec-installCheck-phase). Useful if you do want to load the bash functions of the hook, but run them differently.
34
34
-`versionCheckProgram`: The full path to the program that should print the `${version}` string. Defaults roughly to `${placeholder "out"}/bin/${pname}`. Using `$out` in the value of this variable won't work, as environment variables from this variable are not expanded by the hook. Hence using `placeholder` is unavoidable.
35
35
-`versionCheckProgramArg`: The argument that needs to be passed to `versionCheckProgram`. If undefined the hook tries first `--help` and then `--version`. Examples: `version`, `-V`, `-v`.
36
+
-`versionCheckKeepEnvironment`: A list of environment variables to keep and pass to the command. Only those variables should be added to this list that are actually required for the version command to work. If it is not feasible to explicitly list all these environment variables you can set this parameter to the special value `"*"` to disable the `--ignore-environment` flag and thus keep all environment variables.
36
37
-`preVersionCheck`: A hook to run before the check is done.
37
38
-`postVersionCheck`: A hook to run after the check is done.
@@ -779,12 +779,12 @@ create a single script with Python dependencies, but in the course of normal
779
779
development we're usually working in an entire package repository.
780
780
781
781
As explained [in the `nix-shell` section](https://nixos.org/manual/nix/stable/command-ref/nix-shell) of the Nix manual, `nix-shell` can also load an expression from a `.nix` file.
782
-
Say we want to have Python 3.12, `numpy` and `toolz`, like before,
782
+
Say we want to have Python 3.13, `numpy` and `toolz`, like before,
783
783
in an environment. We can add a `shell.nix` file describing our dependencies:
784
784
785
785
```nix
786
786
with import <nixpkgs> { };
787
-
(python312.withPackages (
787
+
(python313.withPackages (
788
788
ps: with ps; [
789
789
numpy
790
790
toolz
@@ -803,7 +803,7 @@ What's happening here?
803
803
imports the `<nixpkgs>` function, `{}` calls it and the `with` statement
804
804
brings all attributes of `nixpkgs` in the local scope. These attributes form
805
805
the main package set.
806
-
2. Then we create a Python 3.12 environment with the [`withPackages`](#python.withpackages-function) function, as before.
806
+
2. Then we create a Python 3.13 environment with the [`withPackages`](#python.withpackages-function) function, as before.
807
807
3. The [`withPackages`](#python.withpackages-function) function expects us to provide a function as an argument
808
808
that takes the set of all Python packages and returns a list of packages to
809
809
include in the environment. Here, we select the packages `numpy` and `toolz`
@@ -814,7 +814,7 @@ To combine this with `mkShell` you can:
814
814
```nix
815
815
with import <nixpkgs> { };
816
816
let
817
-
pythonEnv = python312.withPackages (ps: [
817
+
pythonEnv = python313.withPackages (ps: [
818
818
ps.numpy
819
819
ps.toolz
820
820
]);
@@ -976,8 +976,8 @@ information. The output of the function is a derivation.
976
976
977
977
An expression for `toolz` can be found in the Nixpkgs repository. As explained
978
978
in the introduction of this Python section, a derivation of `toolz` is available
979
-
for each interpreter version, e.g. `python312.pkgs.toolz` refers to the `toolz`
980
-
derivation corresponding to the CPython 3.12 interpreter.
979
+
for each interpreter version, e.g. `python313.pkgs.toolz` refers to the `toolz`
980
+
derivation corresponding to the CPython 3.13 interpreter.
981
981
982
982
The above example works when you're directly working on
983
983
`pkgs/top-level/python-packages.nix` in the Nixpkgs repository. Often though,
Copy file name to clipboardExpand all lines: doc/release-notes/rl-2511.section.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,8 @@
30
30
31
31
- Added `rewriteURL` attribute to the nixpkgs `config`, to allow for rewriting the URLs downloaded by `fetchurl`.
32
32
33
-
-`vmalert` now supports multiple instances with the option `services.vmalert.instances."".enable`
34
-
et al..
33
+
-New hardening flags, `strictflexarrays1` and `strictflexarrays3` were made available, corresponding to the gcc/clang options `-fstrict-flex-arrays=1` and `-fstrict-flex-arrays=3` respectively.
34
+
35
35
-`gramps` has been updated to 6.0.0
36
36
Upstream recommends [backing up your Family Trees](https://gramps-project.org/wiki/index.php/Gramps_6.0_Wiki_Manual_-_Manage_Family_Trees#Backing_up_a_Family_Tree) before upgrading.
Copy file name to clipboardExpand all lines: doc/stdenv/stdenv.chapter.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1622,6 +1622,22 @@ Adds the `-fPIE` compiler and `-pie` linker options. Position Independent Execut
1622
1622
Static libraries need to be compiled with `-fPIE` so that executables can link them in with the `-pie` linker option.
1623
1623
If the libraries lack `-fPIE`, you will get the error `recompile with -fPIE`.
1624
1624
1625
+
#### `strictflexarrays1` {#strictflexarrays1}
1626
+
1627
+
This flag adds the `-fstrict-flex-arrays=1` compiler option, which reduces the cases the compiler treats as "flexible arrays" to those declared with length `[1]`, `[0]` or (the correct) `[]`. This increases the coverage of fortify checks, because such arrays declared as the trailing element of a structure can normally not have their intended length determined by the compiler.
1628
+
1629
+
Enabling this flag on packages that still use length declarations of flexible arrays >1 may cause the package to fail to compile citing accesses beyond the bounds of an array or even crash at runtime by detecting an array access as an "overrun". Few projects still use length declarations of flexible arrays >1.
1630
+
1631
+
Disabling `strictflexarrays1` implies disablement of `strictflexarrays3`.
1632
+
1633
+
#### `strictflexarrays3` {#strictflexarrays3}
1634
+
1635
+
This flag adds the `-fstrict-flex-arrays=3` compiler option, which reduces the cases the compiler treats as "flexible arrays" to only those declared with length as (the correct) `[]`. This increases the coverage of fortify checks, because such arrays declared as the trailing element of a structure can normally not have their intended length determined by the compiler.
1636
+
1637
+
Enabling this flag on packages that still use non-empty length declarations for flexible arrays may cause the package to fail to compile citing accesses beyond the bounds of an array or even crash at runtime by detecting an array access as an "overrun". Many projects still use such non-empty length declarations for flexible arrays.
1638
+
1639
+
Enabling this flag implies enablement of `strictflexarrays1`. Disabling this flag does not imply disablement of `strictflexarrays1`.
1640
+
1625
1641
#### `shadowstack` {#shadowstack}
1626
1642
1627
1643
Adds the `-fcf-protection=return` compiler option. This enables the Shadow Stack feature supported by some newer processors, which maintains a user-inaccessible copy of the program's stack containing only return-addresses. When returning from a function, the processor compares the return-address value on the two stacks and throws an error if they do not match, considering it a sign of corruption and possible tampering. This should significantly increase the difficulty of ROP attacks.
0 commit comments