Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make profile element names stable #9656

Merged
merged 6 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion doc/manual/rl-next/nix-profile-names.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ synopsis: "`nix profile` now allows referring to elements by human-readable name
prs: 8678
---

[`nix profile`](@docroot@/command-ref/new-cli/nix3-profile.md) now uses names to refer to installed packages when running [`list`](@docroot@/command-ref/new-cli/nix3-profile-list.md), [`remove`](@docroot@/command-ref/new-cli/nix3-profile-remove.md) or [`upgrade`](@docroot@/command-ref/new-cli/nix3-profile-upgrade.md) as opposed to indices. Indices are deprecated and will be removed in a future version.
[`nix profile`](@docroot@/command-ref/new-cli/nix3-profile.md) now uses names to refer to installed packages when running [`list`](@docroot@/command-ref/new-cli/nix3-profile-list.md), [`remove`](@docroot@/command-ref/new-cli/nix3-profile-remove.md) or [`upgrade`](@docroot@/command-ref/new-cli/nix3-profile-upgrade.md) as opposed to indices. Profile element names are generated when a package is installed and remain the same until the package is removed.

**Warning**: The `manifest.nix` file used to record the contents of profiles has changed. Nix will automatically upgrade profiles to the new version when you modify the profile. After that, the profile can no longer be used by older versions of Nix.
2 changes: 0 additions & 2 deletions src/nix/profile-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ R""(
```console
# nix profile list
Name: gdb
Index: 0
Flake attribute: legacyPackages.x86_64-linux.gdb
Original flake URL: flake:nixpkgs
Locked flake URL: github:NixOS/nixpkgs/7b38b03d76ab71bdc8dc325e3f6338d984cc35ca
Store paths: /nix/store/indzcw5wvlhx6vwk7k4iq29q15chvr3d-gdb-11.1

Name: blender-bin
Index: 1
Flake attribute: packages.x86_64-linux.default
Original flake URL: flake:blender-bin
Locked flake URL: github:edolstra/nix-warez/91f2ffee657bf834e4475865ae336e2379282d34?dir=blender
Expand Down
7 changes: 0 additions & 7 deletions src/nix/profile-remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ R""(
# nix profile remove hello
```

* Remove a package by index
*(deprecated, will be removed in a future version)*:

```console
# nix profile remove 3
```

* Remove all packages:

```console
Expand Down
7 changes: 0 additions & 7 deletions src/nix/profile-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ R""(
# nix profile upgrade hello
```

* Upgrade a specific package by index
*(deprecated, will be removed in a future version)*:

```console
# nix profile upgrade 0
```

# Description

This command upgrades a previously installed package in a Nix profile,
Expand Down
Loading
Loading