home-manager/home-manager/default.nix

38 lines
974 B
Nix
Raw Normal View History

{ 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
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}" \
--subst-var-by coreutils "${pkgs.coreutils}" \
--subst-var-by less "${pkgs.less}" \
--subst-var-by MODULES_PATH '${modulesPathStr}' \
--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 ];
platforms = platforms.unix;
2017-10-16 18:40:34 +02:00
license = licenses.mit;
2017-01-07 19:16:26 +01:00
};
}