1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00

home-manager: use callPackage where appropriate

This commit is contained in:
arcnmx 2019-04-02 21:21:38 -07:00 committed by Robert Helgesson
parent 652c694244
commit 2c07829be2
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 17 additions and 17 deletions

View file

@ -1,13 +1,12 @@
{ pkgs ? import <nixpkgs> {} }:
rec {
home-manager = import ./home-manager {
inherit pkgs;
home-manager = pkgs.callPackage ./home-manager {
path = toString ./.;
};
install = import ./home-manager/install.nix {
inherit home-manager pkgs;
install = pkgs.callPackage ./home-manager/install.nix {
inherit home-manager;
};
nixos = import ./nixos;

View file

@ -1,4 +1,4 @@
{ pkgs
{ runCommand, lib, bash, coreutils, findutils, gnused, less
# Extra path to Home Manager. If set then this path will be tried
# before `$HOME/.config/nixpkgs/home-manager` and
@ -12,12 +12,12 @@ let
in
pkgs.runCommand
runCommand
"home-manager"
{
preferLocalBuild = true;
allowSubstitutes = false;
meta = with pkgs.stdenv.lib; {
meta = with lib; {
description = "A user environment configurator";
maintainers = [ maintainers.rycee ];
platforms = platforms.unix;
@ -28,10 +28,10 @@ pkgs.runCommand
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 findutils "${pkgs.findutils}" \
--subst-var-by gnused "${pkgs.gnused}" \
--subst-var-by less "${pkgs.less}" \
--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 '${pathStr}'
''

View file

@ -1,6 +1,6 @@
{ home-manager, pkgs }:
{ home-manager, runCommand }:
pkgs.runCommand
runCommand
"home-manager-install"
{
propagatedBuildInputs = [ home-manager ];

View file

@ -34,8 +34,7 @@ in
config = mkIf (cfg.enable && !config.submoduleSupport.enable) {
home.packages = [
(import ../../home-manager {
inherit pkgs;
(pkgs.callPackage ../../home-manager {
inherit (cfg) path;
})
];

View file

@ -1,3 +1,5 @@
self: super: {
home-manager = import ./home-manager { pkgs = super; };
home-manager = super.callPackage ./home-manager {
path = toString ./.;
};
}