Add nix-ld and nix-index, update python venv template accordingly

This commit is contained in:
Evie Litherland-Smith 2023-05-12 15:27:21 +01:00
parent 5d78d93081
commit 7719862a6f
7 changed files with 23 additions and 11 deletions

View file

@ -36,6 +36,19 @@
home-manager home-manager
]; ];
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
stdenv.cc.cc
zlib
fuse3
icu
openssl
curl
expat
];
};
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
programs.ssh.startAgent = true; programs.ssh.startAgent = true;
programs.fish.enable = true; programs.fish.enable = true;

View file

@ -8,6 +8,7 @@
../../env/bat.nix ../../env/bat.nix
../../env/direnv.nix ../../env/direnv.nix
../../env/keychain.nix ../../env/keychain.nix
../../env/nix-index.nix
../../env/pypoetry.nix ../../env/pypoetry.nix
../../env/starship.nix ../../env/starship.nix
../../terminal/wezterm.nix ../../terminal/wezterm.nix

1
home/env/bash.nix vendored
View file

@ -11,4 +11,5 @@
}; };
programs.keychain.enableBashIntegration = true; programs.keychain.enableBashIntegration = true;
programs.starship.enableBashIntegration = true; programs.starship.enableBashIntegration = true;
programs.nix-index.enableBashIntegration = true;
} }

1
home/env/fish.nix vendored
View file

@ -11,4 +11,5 @@
}; };
programs.keychain.enableFishIntegration = true; programs.keychain.enableFishIntegration = true;
programs.starship.enableFishIntegration = true; programs.starship.enableFishIntegration = true;
programs.nix-index.enableFishIntegration = true;
} }

4
home/env/nix-index.nix vendored Normal file
View file

@ -0,0 +1,4 @@
{ ... }:
{
programs.nix-index.enable = true;
}

1
home/env/zsh.nix vendored
View file

@ -16,4 +16,5 @@
}; };
programs.keychain.enableZshIntegration = true; programs.keychain.enableZshIntegration = true;
programs.starship.enableZshIntegration = true; programs.starship.enableZshIntegration = true;
programs.nix-index.enableZshIntegration = true;
} }

View file

@ -1,15 +1,7 @@
{ pkgs ? import <nixpkgs> { }, python ? pkgs.python39, ... }: { pkgs ? import <nixpkgs> { }, python ? pkgs.python39, ... }:
let
python-packages = ps: with ps; [
pip
setuptools
wheel
];
in
pkgs.mkShell { pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
(python.withPackages python-packages) (python.withPackages (ps: with ps; [ pip wheel ]))
poetry poetry
black black
isort isort
@ -18,8 +10,7 @@ pkgs.mkShell {
]; ];
shellHook = '' shellHook = ''
export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib}/lib/"
[ -d .venv ] || python -m venv .venv [ -d .venv ] || python -m venv .venv
[ -d .venv ] && source .venv/bin/activate source .venv/bin/activate
''; '';
} }