3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #152243 from JulesdeCube/update/home-manager

home-manager: 2021-03-21 -> 2021-12-25
This commit is contained in:
davidak 2022-01-01 20:02:32 +01:00 committed by GitHub
commit 2c1a1858f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,18 +1,18 @@
#Adapted from
#https://github.com/rycee/home-manager/blob/2c07829be2bcae55e04997b19719ff902a44016d/home-manager/default.nix
{ bash, coreutils, findutils, gnused, less, lib, stdenv, makeWrapper, fetchFromGitHub }:
{ bash, coreutils, findutils, gnused, less, gettext, nixos-option, lib, stdenv, makeWrapper, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "home-manager";
version = "2021-03-21";
version = "2021-12-25";
src = fetchFromGitHub {
owner = "nix-community";
repo = "home-manager";
rev = "ddcd476603dfd3388b1dc8234fa9d550156a51f5";
sha256 = "sha256-E6ABXtzw6bHmrIirB1sJL6S2MEa3sfcvRLzRa92frCo=";
rev = "48f2b381dd397ec88040d3354ac9c036739ba139";
sha256 = "1i9v94brh9vhyhzcqyfj64nzhaibdj0sw74pxgk4bcsp0hqawgcd";
};
nativeBuildInputs = [ makeWrapper ];
@ -23,14 +23,29 @@ stdenv.mkDerivation rec {
substituteInPlace $out/bin/home-manager \
--subst-var-by bash "${bash}" \
--subst-var-by coreutils "${coreutils}" \
--subst-var-by findutils "${findutils}" \
--subst-var-by gnused "${gnused}" \
--subst-var-by less "${less}" \
--subst-var-by HOME_MANAGER_PATH '${src}'
--subst-var-by DEP_PATH "${
lib.makeBinPath [ coreutils findutils gettext gnused less nixos-option ]
}" \
--subst-var-by HOME_MANAGER_LIB '${src}/lib/bash/home-manager.sh' \
--subst-var-by HOME_MANAGER_PATH '${src}' \
--subst-var-by OUT "$out"
install -D -m755 home-manager/completion.bash \
"$out/share/bash-completion/completions/home-manager"
install -D -m755 ${src}/home-manager/completion.bash \
$out/share/bash-completion/completions/home-manager
install -D -m755 ${src}/home-manager/completion.zsh \
$out/share/zsh/site-functions/_home-manager
install -D -m755 ${src}/home-manager/completion.fish \
$out/share/fish/vendor_completions.d/home-manager.fish
install -D -m755 ${src}/lib/bash/home-manager.sh \
"$out/share/bash/home-manager.sh"
for path in ${src}/home-manager/po/*.po; do
lang="''${path##*/}"
lang="''${lang%%.*}"
mkdir -p "$out/share/locale/$lang/LC_MESSAGES"
${gettext}/bin/msgfmt -o "$out/share/locale/$lang/LC_MESSAGES/home-manager.mo" "$path"
done
'';
meta = with lib; {