Skip to content

Commit

Permalink
nix(build): install fipy in default shell
Browse files Browse the repository at this point in the history
fipy works best when actually installed
  • Loading branch information
wd15 committed Jul 22, 2024
1 parent ef8191e commit 948bd39
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
src = pkgs.lib.cleanSource ./.;

disabled = pypkgs.pythonOlder "3.7";
nativeBuildInputs = with pypkgs; [

nativeBuildInputs_ = with pypkgs; [
pip
pkgs.openssh
nbval
Expand All @@ -27,26 +27,30 @@
traitlets
notebook
scipy
] ++ propagatedBuildInputs;
];

nativeBuildInputs = propagatedBuildInputs;

propagatedBuildInputs = old.propagatedBuildInputs;
propagatedBuildInputs = old.propagatedBuildInputs ++ nativeBuildInputs_;

postShellHook = ''
SOURCE_DATE_EPOCH=$(date +%s)
export PYTHONUSERBASE=$PWD/.local
export USER_SITE=`python -c "import site; print(site.USER_SITE)"`
export PYTHONPATH=$PYTHONPATH:$USER_SITE:$(pwd)
export PYTHONPATH=$PYTHONPATH:$USER_SITE:$(pwd):$PWD
export PATH=$PATH:$PYTHONUSERBASE/bin
export OMPI_MCA_plm_rsh_agent=${pkgs.openssh}/bin/ssh
'';
}));
in
rec {
packages.fipy = env;
packages.default = self.packages.${system}.fipy;
devShells.default = env;
devShells.default = pkgs.mkShell {
packages = [ env ];
};
devShells.develop = env;
}
));
}

0 comments on commit 948bd39

Please sign in to comment.