2017-07-11 19:50:29 +02:00
|
|
|
{ pkgs
|
|
|
|
|
|
|
|
# Extra path to the Home Manager modules. If set then this path will
|
|
|
|
# be tried before `$HOME/.config/nixpkgs/home-manager/modules` and
|
|
|
|
# `$HOME/.nixpkgs/home-manager/modules`.
|
|
|
|
, modulesPath ? null
|
|
|
|
}:
|
2017-01-07 19:16:26 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
2017-07-11 19:50:29 +02:00
|
|
|
modulesPathStr = if modulesPath == null then "" else modulesPath;
|
|
|
|
|
2017-01-07 19:16:26 +01:00
|
|
|
in
|
|
|
|
|
|
|
|
pkgs.stdenv.mkDerivation {
|
|
|
|
name = "home-manager";
|
|
|
|
|
|
|
|
phases = [ "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -v -D -m755 ${./home-manager} $out/bin/home-manager
|
|
|
|
|
|
|
|
substituteInPlace $out/bin/home-manager \
|
|
|
|
--subst-var-by bash "${pkgs.bash}" \
|
2017-05-16 16:09:18 +02:00
|
|
|
--subst-var-by coreutils "${pkgs.coreutils}" \
|
2017-08-26 22:24:40 +02:00
|
|
|
--subst-var-by less "${pkgs.less}" \
|
2017-07-11 19:50:29 +02:00
|
|
|
--subst-var-by MODULES_PATH '${modulesPathStr}' \
|
2017-08-28 11:37:34 +02:00
|
|
|
--subst-var-by HOME_MANAGER_EXPR_PATH "${./home-manager.nix}"
|
2017-01-07 19:16:26 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with pkgs.stdenv.lib; {
|
|
|
|
description = "A user environment configurator";
|
|
|
|
maintainers = [ maintainers.rycee ];
|
2017-10-18 00:45:29 +02:00
|
|
|
platforms = platforms.unix;
|
2017-10-16 18:40:34 +02:00
|
|
|
license = licenses.mit;
|
2017-01-07 19:16:26 +01:00
|
|
|
};
|
|
|
|
}
|