chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / ho / home-manager / package.nix
blob34892c8a386df77f369a4188e56e5e0a84282b8d
1 { lib
2 , bash
3 , coreutils
4 , fetchFromGitHub
5 , findutils
6 , gettext
7 , gnused
8 , inetutils
9 , installShellFiles
10 , jq
11 , less
12 , ncurses
13 , nixos-option
14 , stdenvNoCC
15 , unixtools
16 , unstableGitUpdater
19 stdenvNoCC.mkDerivation (finalAttrs: {
20   pname = "home-manager";
21   version = "0-unstable-2024-09-26";
23   src = fetchFromGitHub {
24     name = "home-manager-source";
25     owner = "nix-community";
26     repo = "home-manager";
27     rev = "ffe2d07e771580a005e675108212597e5b367d2d";
28     hash = "sha256-4/vacp3CwdGoPf8U4e/N8OsGYtO09WTcQK5FqYfJbKs=";
29   };
31   nativeBuildInputs = [
32     gettext
33     installShellFiles
34   ];
36   dontConfigure = true;
37   dontBuild = true;
39   installPhase = ''
40     runHook preInstall
42     install -D -m755 home-manager/home-manager $out/bin/home-manager
43     install -D -m755 lib/bash/home-manager.sh $out/share/bash/home-manager.sh
45     installShellCompletion --cmd home-manager \
46       --bash home-manager/completion.bash \
47       --fish home-manager/completion.fish \
48       --zsh home-manager/completion.zsh
50     for pofile in home-manager/po/*.po; do
51       lang="''${pofile##*/}"
52       lang="''${lang%%.*}"
53       mkdir -p "$out/share/locale/$lang/LC_MESSAGES"
54       msgfmt -o "$out/share/locale/$lang/LC_MESSAGES/home-manager.mo" "$pofile"
55     done
57     runHook postInstall
58   '';
60   postFixup = ''
61     substituteInPlace $out/bin/home-manager \
62       --subst-var-by bash "${bash}" \
63       --subst-var-by DEP_PATH "${
64         lib.makeBinPath [
65           coreutils
66           findutils
67           gettext
68           gnused
69           jq
70           less
71           ncurses
72           nixos-option
73           inetutils # for `hostname`
74         ]
75       }" \
76       --subst-var-by HOME_MANAGER_LIB "$out/share/bash/home-manager.sh" \
77       --subst-var-by HOME_MANAGER_PATH "${finalAttrs.src}" \
78       --subst-var-by OUT "$out"
79   '';
81   passthru.updateScript = unstableGitUpdater {
82     url = "https://github.com/nix-community/home-manager/";
83   };
85   meta = {
86     homepage = "https://nix-community.github.io/home-manager/";
87     description = "Nix-based user environment configurator";
88     longDescription = ''
89       The Home-Manager project provides a basic system for managing a user
90       environment using the Nix package manager together with the Nix libraries
91       found in Nixpkgs. It allows declarative configuration of user specific
92       (non global) packages and dotfiles.
93     '';
94     license = lib.licenses.mit;
95     mainProgram = "home-manager";
96     maintainers = with lib.maintainers; [ AndersonTorres bryango ];
97     platforms = lib.platforms.unix;
98   };