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 Jan 21, 2025
2 parents 6a7722a + b8c296f commit 4a3a71f
Show file tree
Hide file tree
Showing 32 changed files with 208 additions and 146 deletions.
8 changes: 8 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pull_request_rules:
branches:
- 2.18-maintenance
labels:
- automatic backport
- merge-queue

- name: backport patches to 2.19
Expand All @@ -37,6 +38,7 @@ pull_request_rules:
branches:
- 2.19-maintenance
labels:
- automatic backport
- merge-queue

- name: backport patches to 2.20
Expand All @@ -47,6 +49,7 @@ pull_request_rules:
branches:
- 2.20-maintenance
labels:
- automatic backport
- merge-queue

- name: backport patches to 2.21
Expand All @@ -57,6 +60,7 @@ pull_request_rules:
branches:
- 2.21-maintenance
labels:
- automatic backport
- merge-queue

- name: backport patches to 2.22
Expand All @@ -67,6 +71,7 @@ pull_request_rules:
branches:
- 2.22-maintenance
labels:
- automatic backport
- merge-queue

- name: backport patches to 2.23
Expand All @@ -77,6 +82,7 @@ pull_request_rules:
branches:
- 2.23-maintenance
labels:
- automatic backport
- merge-queue

- name: backport patches to 2.24
Expand All @@ -87,6 +93,7 @@ pull_request_rules:
branches:
- "2.24-maintenance"
labels:
- automatic backport
- merge-queue

- name: backport patches to 2.25
Expand All @@ -97,4 +104,5 @@ pull_request_rules:
branches:
- "2.25-maintenance"
labels:
- automatic backport
- merge-queue
2 changes: 1 addition & 1 deletion doc/manual/source/installation/uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ which you may remove.
To remove a [single-user installation](./installing-binary.md#single-user-installation) of Nix, run:

```console
$ rm -rf /nix ~/.nix-channels ~/.nix-defexpr ~/.nix-profile
rm -rf /nix ~/.nix-channels ~/.nix-defexpr ~/.nix-profile
```
You might also want to manually remove references to Nix from your `~/.profile`.
6 changes: 5 additions & 1 deletion packaging/dependencies.nix
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ let
# Users who are debugging Nix builds are expected to set the environment variable `mesonBuildType`, per the
# guidance in https://github.com/NixOS/nix/blob/8a3fc27f1b63a08ac983ee46435a56cf49ebaf4a/doc/manual/source/development/debugging.md?plain=1#L10.
# For this reason, we don't want to refer to `finalAttrs.mesonBuildType` here, but rather use the environment variable.
preConfigure = prevAttrs.preConfigure or "" + ''
preConfigure = prevAttrs.preConfigure or "" + lib.optionalString (
!stdenv.hostPlatform.isWindows
# build failure
&& !stdenv.hostPlatform.isStatic
) ''
case "$mesonBuildType" in
release|minsize) appendToVar mesonFlags "-Db_lto=true" ;;
*) appendToVar mesonFlags "-Db_lto=false" ;;
Expand Down
70 changes: 30 additions & 40 deletions packaging/everything.nix
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,35 @@
}:

let
dev = stdenv.mkDerivation (finalAttrs: {
name = "nix-${nix-cli.version}-dev";
pname = "nix";
version = nix-cli.version;
dontUnpack = true;
dontBuild = true;
libs = map lib.getDev [
nix-cmd
libs = {
inherit
nix-util
nix-util-c
nix-store
nix-store-c
nix-fetchers
nix-expr
nix-expr-c
nix-fetchers
nix-flake
nix-flake-c
nix-main
nix-main-c
nix-store
nix-store-c
nix-util
nix-util-c
nix-cmd
;
} // lib.optionalAttrs (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) {
# Currently fails in static build
inherit
nix-perl-bindings
];
;
};

dev = stdenv.mkDerivation (finalAttrs: {
name = "nix-${nix-cli.version}-dev";
pname = "nix";
version = nix-cli.version;
dontUnpack = true;
dontBuild = true;
libs = map lib.getDev (lib.attrValues libs);
installPhase = ''
mkdir -p $out/nix-support
echo $libs >> $out/nix-support/propagated-build-inputs
Expand Down Expand Up @@ -127,20 +135,16 @@ in
nix-fetchers-tests.tests.run
nix-flake-tests.tests.run

# Make sure the functional tests have passed
nix-functional-tests

# dev bundle is ok
# (checkInputs must be empty paths??)
(runCommand "check-pkg-config" { checked = dev.tests.pkg-config; } "mkdir $out")
] ++
(if stdenv.buildPlatform.canExecute stdenv.hostPlatform
then [
# TODO: add perl.tests
nix-perl-bindings
]
else [
nix-perl-bindings
]);
installCheckInputs = [
nix-functional-tests
] ++ lib.optionals (!stdenv.hostPlatform.isStatic && stdenv.buildPlatform.canExecute stdenv.hostPlatform) [
# Perl currently fails in static build
# TODO: Split out tests into a separate derivation?
nix-perl-bindings
];
passthru = prevAttrs.passthru // {
inherit (nix-cli) version;
Expand All @@ -162,21 +166,7 @@ in
disallowedReferences = nix.all;
```
*/
libs = {
inherit
nix-util
nix-util-c
nix-store
nix-store-c
nix-fetchers
nix-expr
nix-expr-c
nix-flake
nix-flake-c
nix-main
nix-main-c
;
};
inherit libs;

tests = prevAttrs.passthru.tests or {} // {
# TODO: create a proper fixpoint and:
Expand Down
4 changes: 2 additions & 2 deletions src/libfetchers/fetchers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void Input::clone(const Path & destDir) const
scheme->clone(*this, destDir);
}

std::optional<Path> Input::getSourcePath() const
std::optional<std::filesystem::path> Input::getSourcePath() const
{
assert(scheme);
return scheme->getSourcePath(*this);
Expand Down Expand Up @@ -461,7 +461,7 @@ Input InputScheme::applyOverrides(
return input;
}

std::optional<Path> InputScheme::getSourcePath(const Input & input) const
std::optional<std::filesystem::path> InputScheme::getSourcePath(const Input & input) const
{
return {};
}
Expand Down
4 changes: 2 additions & 2 deletions src/libfetchers/fetchers.hh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public:

void clone(const Path & destDir) const;

std::optional<Path> getSourcePath() const;
std::optional<std::filesystem::path> getSourcePath() const;

/**
* Write a file to this input, for input types that support
Expand Down Expand Up @@ -247,7 +247,7 @@ struct InputScheme

virtual void clone(const Input & input, const Path & destDir) const;

virtual std::optional<Path> getSourcePath(const Input & input) const;
virtual std::optional<std::filesystem::path> getSourcePath(const Input & input) const;

virtual void putFile(
const Input & input,
Expand Down
Loading

0 comments on commit 4a3a71f

Please sign in to comment.