nixpkgs/pkgs/tools/package-management/home-manager/default.nix

41 lines
1.1 KiB
Nix
Raw Normal View History

#Adapted from
#https://github.com/rycee/home-manager/blob/2c07829be2bcae55e04997b19719ff902a44016d/home-manager/default.nix
{ bash, coreutils, findutils, gnused, less, stdenv, makeWrapper, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "home-manager-${version}";
2019-06-25 22:13:03 +02:00
version = "2019-06-25";
2018-11-15 11:35:05 +01:00
src = fetchFromGitHub {
owner = "rycee";
repo = "home-manager";
2019-06-25 22:13:03 +02:00
rev = "95d55b8da152f1efffb7713c82ead83a3fcf476d";
sha256 = "1zbx051rc0b880wjl832m9sliwrhrm1dbdxw8734gvc0pfz6qwn1";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
install -v -D -m755 ${src}/home-manager/home-manager $out/bin/home-manager
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}'
'';
meta = with stdenv.lib; {
description = "A user environment configurator";
maintainers = with maintainers; [ rycee ];
platforms = platforms.linux;
license = licenses.mit;
};
}