29 lines
653 B
Nix
29 lines
653 B
Nix
|
{ pkgs ? import <nixpkgs> {}}:
|
||
|
let
|
||
|
fhs = pkgs.buildFHSUserEnv {
|
||
|
name = "my-fhs-environment";
|
||
|
|
||
|
targetPkgs = _: [
|
||
|
pkgs.micromamba
|
||
|
pkgs.zlib
|
||
|
pkgs.libGL
|
||
|
pkgs.glib
|
||
|
pkgs.python310
|
||
|
pkgs.pkg-config
|
||
|
];
|
||
|
|
||
|
profile = ''
|
||
|
set -e
|
||
|
eval "$(micromamba shell hook --shell=posix)"
|
||
|
export MAMBA_ROOT_PREFIX=${builtins.getEnv "PWD"}/.mamba
|
||
|
if ! test -d $MAMBA_ROOT_PREFIX/envs/m2; then
|
||
|
micromamba create --yes -q -n m2 python=3.10 -c conda-forge
|
||
|
fi
|
||
|
micromamba activate m2
|
||
|
micromamba install --yes -f conda-requirements.txt -c conda-forge
|
||
|
set +e
|
||
|
'';
|
||
|
};
|
||
|
in fhs.env
|
||
|
|