Skip to content

Commit 169e8b3

Browse files
committed
Install nix-manual in default user profile
This makes man pages available in the default profile after using nix installer. Relates to: #12382
1 parent 5a65b1f commit 169e8b3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

packaging/binary-tarball.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
buildPackages,
55
cacert,
66
nix,
7+
nixComponents2,
78
}:
89

910
let
1011

1112
installerClosureInfo = buildPackages.closureInfo {
1213
rootPaths = [
1314
nix
15+
nixComponents2.nix-manual.man
1416
cacert
1517
];
1618
};
@@ -42,6 +44,7 @@ runCommand "nix-binary-tarball-${version}" env ''
4244
--subst-var-by cacert ${cacert}
4345
substitute ${../scripts/install-multi-user.sh} $TMPDIR/install-multi-user \
4446
--subst-var-by nix ${nix} \
47+
--subst-var-by nix-manual ${nixComponents2.nix-manual.man}
4548
--subst-var-by cacert ${cacert}
4649
4750
if type -p shellcheck; then

scripts/install-multi-user.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ readonly PROFILE_FISH_PREFIXES=(
5252
readonly PROFILE_NIX_FILE_FISH="$NIX_ROOT/var/nix/profiles/default/etc/profile.d/nix-daemon.fish"
5353

5454
readonly NIX_INSTALLED_NIX="@nix@"
55+
readonly NIX_INSTALLED_NIX_MAN="@nix-manual@"
5556
readonly NIX_INSTALLED_CACERT="@cacert@"
5657
#readonly NIX_INSTALLED_NIX="/nix/store/byi37zv50wnfrpp4d81z3spswd5zva37-nix-2.3.6"
5758
#readonly NIX_INSTALLED_CACERT="/nix/store/7pi45g541xa8ahwgpbpy7ggsl0xj1jj6-nss-cacert-3.49.2"
@@ -969,6 +970,8 @@ setup_default_profile() {
969970
task "Setting up the default profile"
970971
_sudo "to install a bootstrapping Nix in to the default profile" \
971972
HOME="$ROOT_HOME" "$NIX_INSTALLED_NIX/bin/nix-env" -i "$NIX_INSTALLED_NIX"
973+
_sudo "to install Nix man pages in to the default profile" \
974+
HOME="$ROOT_HOME" "$NIX_INSTALLED_NIX/bin/nix-env" -i "$NIX_INSTALLED_NIX_MAN"
972975

973976
if [ -z "${NIX_SSL_CERT_FILE:-}" ] || ! [ -f "${NIX_SSL_CERT_FILE:-}" ] || cert_in_store; then
974977
_sudo "to install a bootstrapping SSL certificate just for Nix in to the default profile" \

0 commit comments

Comments
 (0)