2017-12-30 01:52:26 +01:00
|
|
|
#Adapted from
|
2019-04-26 14:09:11 +02:00
|
|
|
#https://github.com/rycee/home-manager/blob/2c07829be2bcae55e04997b19719ff902a44016d/home-manager/default.nix
|
2017-12-30 01:52:26 +01:00
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
{ bash, coreutils, findutils, gnused, less, lib, stdenv, makeWrapper, fetchFromGitHub }:
|
2017-12-30 01:52:26 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "home-manager";
|
2021-03-23 09:58:34 +01:00
|
|
|
version = "2021-03-21";
|
2017-12-30 01:52:26 +01:00
|
|
|
|
2018-11-15 11:35:05 +01:00
|
|
|
src = fetchFromGitHub {
|
2020-09-08 14:51:58 +02:00
|
|
|
owner = "nix-community";
|
2017-12-30 01:52:26 +01:00
|
|
|
repo = "home-manager";
|
2021-03-23 09:58:34 +01:00
|
|
|
rev = "ddcd476603dfd3388b1dc8234fa9d550156a51f5";
|
|
|
|
sha256 = "sha256-E6ABXtzw6bHmrIirB1sJL6S2MEa3sfcvRLzRa92frCo=";
|
2017-12-30 01:52:26 +01: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}" \
|
2019-04-26 14:09:11 +02:00
|
|
|
--subst-var-by findutils "${findutils}" \
|
|
|
|
--subst-var-by gnused "${gnused}" \
|
2017-12-30 01:52:26 +01:00
|
|
|
--subst-var-by less "${less}" \
|
|
|
|
--subst-var-by HOME_MANAGER_PATH '${src}'
|
2020-03-25 15:01:12 +01:00
|
|
|
|
|
|
|
install -D -m755 home-manager/completion.bash \
|
|
|
|
"$out/share/bash-completion/completions/home-manager"
|
2017-12-30 01:52:26 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-12-30 01:52:26 +01:00
|
|
|
description = "A user environment configurator";
|
2020-05-06 22:29:12 +02:00
|
|
|
homepage = "https://rycee.gitlab.io/home-manager/";
|
2020-03-25 15:01:31 +01:00
|
|
|
platforms = platforms.unix;
|
2017-12-30 01:52:26 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|