mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-01 02:23:54 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
101 lines
2.5 KiB
Nix
101 lines
2.5 KiB
Nix
{
|
|
lib,
|
|
bash,
|
|
coreutils,
|
|
fetchFromGitHub,
|
|
findutils,
|
|
gettext,
|
|
gnused,
|
|
inetutils,
|
|
installShellFiles,
|
|
jq,
|
|
less,
|
|
ncurses,
|
|
nixos-option,
|
|
stdenvNoCC,
|
|
unixtools,
|
|
unstableGitUpdater,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "home-manager";
|
|
version = "0-unstable-2024-11-29";
|
|
|
|
src = fetchFromGitHub {
|
|
name = "home-manager-source";
|
|
owner = "nix-community";
|
|
repo = "home-manager";
|
|
rev = "819f682269f4e002884702b87e445c82840c68f2";
|
|
hash = "sha256-r8j6R3nrvwbT1aUp4EPQ1KC7gm0pu9VcV1aNaB+XG6Q=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
gettext
|
|
installShellFiles
|
|
];
|
|
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D -m755 home-manager/home-manager $out/bin/home-manager
|
|
install -D -m755 lib/bash/home-manager.sh $out/share/bash/home-manager.sh
|
|
|
|
installShellCompletion --cmd home-manager \
|
|
--bash home-manager/completion.bash \
|
|
--fish home-manager/completion.fish \
|
|
--zsh home-manager/completion.zsh
|
|
|
|
for pofile in home-manager/po/*.po; do
|
|
lang="''${pofile##*/}"
|
|
lang="''${lang%%.*}"
|
|
mkdir -p "$out/share/locale/$lang/LC_MESSAGES"
|
|
msgfmt -o "$out/share/locale/$lang/LC_MESSAGES/home-manager.mo" "$pofile"
|
|
done
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
postFixup = ''
|
|
substituteInPlace $out/bin/home-manager \
|
|
--subst-var-by bash "${bash}" \
|
|
--subst-var-by DEP_PATH "${
|
|
lib.makeBinPath [
|
|
coreutils
|
|
findutils
|
|
gettext
|
|
gnused
|
|
jq
|
|
less
|
|
ncurses
|
|
nixos-option
|
|
inetutils # for `hostname`
|
|
]
|
|
}" \
|
|
--subst-var-by HOME_MANAGER_LIB "$out/share/bash/home-manager.sh" \
|
|
--subst-var-by HOME_MANAGER_PATH "${finalAttrs.src}" \
|
|
--subst-var-by OUT "$out"
|
|
'';
|
|
|
|
passthru.updateScript = unstableGitUpdater {
|
|
url = "https://github.com/nix-community/home-manager/";
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://nix-community.github.io/home-manager/";
|
|
description = "Nix-based user environment configurator";
|
|
longDescription = ''
|
|
The Home-Manager project provides a basic system for managing a user
|
|
environment using the Nix package manager together with the Nix libraries
|
|
found in Nixpkgs. It allows declarative configuration of user specific
|
|
(non global) packages and dotfiles.
|
|
'';
|
|
license = lib.licenses.mit;
|
|
mainProgram = "home-manager";
|
|
maintainers = with lib.maintainers; [ bryango ];
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
})
|