2020-04-24 23:36:52 +00:00
|
|
|
#Adapted from
|
|
|
|
#https://github.com/rycee/home-manager/blob/2c07829be2bcae55e04997b19719ff902a44016d/home-manager/default.nix
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
{ bash, coreutils, findutils, gnused, less, lib, stdenv, makeWrapper, fetchFromGitHub }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
|
|
|
pname = "home-manager";
|
2021-03-23 19:22:30 +00:00
|
|
|
version = "2021-03-21";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-09-25 04:45:31 +00:00
|
|
|
owner = "nix-community";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "home-manager";
|
2021-03-23 19:22:30 +00:00
|
|
|
rev = "ddcd476603dfd3388b1dc8234fa9d550156a51f5";
|
|
|
|
sha256 = "sha256-E6ABXtzw6bHmrIirB1sJL6S2MEa3sfcvRLzRa92frCo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
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}'
|
|
|
|
|
|
|
|
install -D -m755 home-manager/completion.bash \
|
|
|
|
"$out/share/bash-completion/completions/home-manager"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A user environment configurator";
|
2020-05-15 21:57:56 +00:00
|
|
|
homepage = "https://rycee.gitlab.io/home-manager/";
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|