Skip to content

Commit

Permalink
Merge pull request #89 from Kha/master
Browse files Browse the repository at this point in the history
more nix
  • Loading branch information
Johannes Bechberger committed Jul 12, 2019
2 parents 8259a1b + 94804fd commit eba6f13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ matrix:
include:
- language: nix
os: linux
# work around weird `fetchGit` behavior...
script: nix-build --arg src ./.
- language: nix
os: osx
script: nix-build --arg src ./.
- language: python
python: "3.6"
install:
Expand All @@ -18,4 +21,4 @@ matrix:
- pip3 install -e .
script:
- pytest
- TEMCI_TEST_CMD=1 pytest
- TEMCI_TEST_CMD=1 pytest
9 changes: 7 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? import <nixpkgs> {},
# ignore untracked files in local checkout
src ? if builtins.pathExists ./.git then builtins.fetchGit { url = ./.; } else ./. }:
with pkgs.python3Packages;
let
python = import ./requirements.nix { inherit pkgs; };
Expand All @@ -9,7 +11,7 @@ let
in buildPythonApplication rec {
name = "temci-${version}";
version = "local";
src = pkgs.lib.sourceFilesBySuffices ./. [ "py" "setup.cfg" "README.rst" ];
inherit src;
checkInputs = [ pytest pytestrunner ];
propagatedBuildInputs = [
click_git
Expand All @@ -23,6 +25,9 @@ in buildPythonApplication rec {
scipy seaborn
pyyaml
] ++ pkgs.lib.optional pkgs.stdenv.isLinux perf;
postInstall = ''
$out/bin/temci setup
'';
postPatch = ''
substituteInPlace temci/run/cpuset.py --replace python3 ${pkgs.python3.withPackages (ps: [ pypi.cpuset-py3 ])}/bin/python3
substituteInPlace temci/run/run_driver.py \
Expand Down

0 comments on commit eba6f13

Please sign in to comment.