Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into flake-schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
edolstra committed Feb 23, 2025
2 parents 9a4502b + d904921 commit f5a0caf
Show file tree
Hide file tree
Showing 143 changed files with 3,163 additions and 1,140 deletions.
10 changes: 10 additions & 0 deletions doc/manual/rl-next/curl-cloexec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
synopsis: Set FD_CLOEXEC on sockets created by curl
issues: []
prs: [12439]
---


Curl creates sockets without setting FD_CLOEXEC/SOCK_CLOEXEC, this can cause connections to remain open forever when using commands like `nix shell`

This change sets the FD_CLOEXEC flag using a CURLOPT_SOCKOPTFUNCTION callback.
18 changes: 18 additions & 0 deletions doc/manual/rl-next/git-lfs-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
synopsis: "Git LFS support"
prs: [10153, 12468]
---

The Git fetcher now supports Large File Storage (LFS). This can be enabled by passing the attribute `lfs = true` to the fetcher, e.g.
```console
nix flake prefetch 'git+ssh://git@github.com/Apress/repo-with-large-file-storage.git?lfs=1'
```

A flake can also declare that it requires lfs to be enabled:
```
{
inputs.self.lfs = true;
}
```

Author: [**@b-camacho**](https://github.com/b-camacho), [**@kip93**](https://github.com/kip93)
12 changes: 12 additions & 0 deletions doc/manual/rl-next/self-submodules-attr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
synopsis: "`inputs.self.submodules` flake attribute"
prs: [12421]
---

Flakes in Git repositories can now declare that they need Git submodules to be enabled:
```
{
inputs.self.submodules = true;
}
```
Thus, it's no longer needed for the caller of the flake to pass `submodules = true`.
2 changes: 1 addition & 1 deletion doc/manual/source/development/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $ nix-shell --attr devShells.x86_64-linux.native-clangStdenvPackages

> **Note**
>
> You can use `native-ccacheStdenvPackages` to drastically improve rebuild time.
> You can use `native-ccacheStdenv` to drastically improve rebuild time.
> By default, [ccache](https://ccache.dev) keeps artifacts in `~/.cache/ccache/`.
To build Nix itself in this shell:
Expand Down
52 changes: 0 additions & 52 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 27 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
# work around 7730 and https://github.com/NixOS/nix/issues/7807
inputs.git-hooks-nix.inputs.flake-compat.follows = "";
inputs.git-hooks-nix.inputs.gitignore.follows = "";
inputs.nixfmt.url = "github:NixOS/nixfmt";

outputs =
inputs@{
Expand Down Expand Up @@ -155,6 +154,8 @@
f = import ./packaging/components.nix {
inherit (final) lib;
inherit officialRelease;
inherit stdenv;
pkgs = final;
src = self;
};
};
Expand Down Expand Up @@ -224,6 +225,30 @@
LANG=C.UTF-8 ${pkgs.changelog-d}/bin/changelog-d ${./doc/manual/rl-next} >$out
'';
repl-completion = nixpkgsFor.${system}.native.callPackage ./tests/repl-completion.nix { };

/**
Checks for our packaging expressions.
This shouldn't build anything significant; just check that things
(including derivations) are _set up_ correctly.
*/
packaging-overriding =
let
pkgs = nixpkgsFor.${system}.native;
nix = self.packages.${system}.nix;
in
assert (nix.appendPatches [ pkgs.emptyFile ]).libs.nix-util.src.patches == [ pkgs.emptyFile ];
if pkgs.stdenv.buildPlatform.isDarwin then
lib.warn "packaging-overriding check currently disabled because of a permissions issue on macOS" pkgs.emptyFile
else
# If this fails, something might be wrong with how we've wired the scope,
# or something could be broken in Nixpkgs.
pkgs.testers.testEqualContents {
assertion = "trivial patch does not change source contents";
expected = "${./.}";
actual =
# Same for all components; nix-util is an arbitrary pick
(nix.appendPatches [ pkgs.emptyFile ]).libs.nix-util.src;
};
}
// (lib.optionalAttrs (builtins.elem system linux64BitSystems)) {
dockerImage = self.hydraJobs.dockerImage.${system};
Expand Down Expand Up @@ -378,7 +403,7 @@

devShells =
let
makeShell = import ./packaging/dev-shell.nix { inherit inputs lib devFlake; };
makeShell = import ./packaging/dev-shell.nix { inherit lib devFlake; };
prefixAttrs = prefix: lib.concatMapAttrs (k: v: { "${prefix}-${k}" = v; });
in
forAllSystems (
Expand Down
1 change: 0 additions & 1 deletion maintainers/flake-module.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
};
nixfmt-rfc-style = {
enable = true;
package = inputs.nixfmt.packages.${pkgs.hostPlatform.system}.default;
excludes = [
# Invalid
''^tests/functional/lang/parse-.*\.nix$''
Expand Down
Loading

0 comments on commit f5a0caf

Please sign in to comment.