pyenv: add module

Adds a module for pyenv (https://github.com/pyenv/pyenv).
This commit is contained in:
Tobias Markus 2023-07-07 14:40:34 +02:00 committed by Robert Helgesson
parent 050d01a62c
commit 069d450b6d
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
8 changed files with 144 additions and 0 deletions

View file

@ -0,0 +1,17 @@
{ ... }:
{
programs = {
bash.enable = true;
pyenv.enable = true;
};
test.stubs.pyenv = { name = "pyenv"; };
nmt.script = ''
assertFileExists home-files/.bashrc
assertFileContains \
home-files/.bashrc \
'eval "$(@pyenv@/bin/pyenv init - bash)"'
'';
}

View file

@ -0,0 +1,5 @@
{
pyenv-bash = ./bash.nix;
pyenv-zsh = ./zsh.nix;
pyenv-fish = ./fish.nix;
}

View file

@ -0,0 +1,17 @@
{ ... }:
{
programs = {
fish.enable = true;
pyenv.enable = true;
};
test.stubs.pyenv = { name = "pyenv"; };
nmt.script = ''
assertFileExists home-files/.config/fish/config.fish
assertFileContains \
home-files/.config/fish/config.fish \
'@pyenv@/bin/pyenv init - fish | source'
'';
}

View file

@ -0,0 +1,17 @@
{ ... }:
{
programs = {
zsh.enable = true;
pyenv.enable = true;
};
test.stubs.pyenv = { name = "pyenv"; };
nmt.script = ''
assertFileExists home-files/.zshrc
assertFileContains \
home-files/.zshrc \
'eval "$(@pyenv@/bin/pyenv init - zsh)"'
'';
}