Add .default.nix and .envrc

This commit is contained in:
Roberto Di Remigio 2017-12-08 11:00:33 -05:00
parent 65df3eae5e
commit 7161d75691
No known key found for this signature in database
GPG Key ID: E4FADFE6DFB29C6E
2 changed files with 26 additions and 0 deletions

19
.default.nix Normal file
View File

@ -0,0 +1,19 @@
with import <nixpkgs> {}; {
autocmakeEnv = stdenv.mkDerivation {
name = "Autocmake";
buildInputs = [
atlas
ccache
clang
cmake
doxygen
gfortran
liblapack
openmpi
python35Packages.pep8
python35Packages.pytest
python35Packages.pyyaml
zlib
];
};
}

7
.envrc Normal file
View File

@ -0,0 +1,7 @@
use nix .default.nix
export SOURCE_DATE_EPOCH=$(date +%s)
dir_hash=autocmake-$(echo -n autocmake | shasum | cut -d ' ' -f 1)
direnv_layout_dir=$XDG_CACHE_HOME/direnv/layouts/$dir_hash
layout python `type -P python` --system-site-packages
pip install -r requirements.txt
export NINJA_STATUS="[Built edge %f of %t in %e sec]"