Commit 37ab60ff authored by Valentin Reis's avatar Valentin Reis

various updates + adding remote shell tools.

parent 28b1c2ec
Pipeline #5100 passed with stage
in 13 seconds
...@@ -4,7 +4,7 @@ stages: ...@@ -4,7 +4,7 @@ stages:
argotk.test: argotk.test:
stage: test stage: test
script: script:
- nix-shell --run "argotk tests" - nix-shell default.nix -A test --run "argotk tests"
except: except:
- /^wip\/.*/ - /^wip\/.*/
- /^WIP\/.*/ - /^WIP\/.*/
......
...@@ -28,8 +28,6 @@ in ...@@ -28,8 +28,6 @@ in
name = "testEnv"; name = "testEnv";
installPhase = "mkdir $out"; installPhase = "mkdir $out";
unpackPhase = "true"; unpackPhase = "true";
dontStrip = true;
buildPhase = "true";
buildInputs = [ buildInputs = [
argotk argotk
argopkgs.coreutils argopkgs.coreutils
...@@ -52,7 +50,7 @@ in ...@@ -52,7 +50,7 @@ in
); );
expe = test.overrideAttrs (old:{ expe = test.overrideAttrs (old:{
buildInputs = old.buildInputs ++ [amg lammps]; buildInputs = old.buildInputs ++ [amg lammps qmcpack];
} }
); );
...@@ -65,4 +63,14 @@ in ...@@ -65,4 +63,14 @@ in
])) ]))
]; ];
}; };
remoteShellExecutor = argopkgs.mkShell {
name = "shake";
buildInputs = [
(argopkgs.haskellPackages.ghcWithPackages (p: with p; [
argotk
turtle data-default optparse-generic
]))
];
};
} }
#!/bin/sh
echo "Warning. This is going to download all test sources, and build them."
cat $(nix-build -A test-list)
#!/usr/bin/env sh
echo "nix-chameleon-shell.sh: building locally."
storePath=${1:-$(nix-build default.nix -A test)} # Building an environment
derivationPath=$(nix show-derivation $storePath | jq -r "keys| @csv" | sed s/\"//g) # Inelegant path query
echo "nix-chameleon-shell.sh: copying closure."
NIX_SSHOPTS="source .profile;" nix-copy-closure --include-outputs --to ${2:-cc@192.5.87.189} $derivationPath # Copying the dependency tree over to chameleon
echo "nix-chameleon-shell.sh: entering a remote shell."
ssh -t ${2:-cc@192.5.87.189} "source .profile; nix-shell $derivationPath" # Entering its environment over ssh
#!/usr/bin/env sh
export NIX_SSHOPTS="source .profile; source .bash_profile;"
host=$1
drv=$(nix show-derivation $out | jq -r "keys| @csv" | sed s/\"//g)
echo "remote-nix-shell.sh: copying the derivation and its output to the host."
nix-copy-closure --include-outputs --to $host $drv
echo "remote-nix-shell.sh: entering a remote shell."
ssh -t $host "source .profile; source .bash_profile; nix-shell $drv"
#!/usr/bin/env sh
export NIX_SSHOPTS="source .profile; source .bash_profile;"
host=$1;shift
echo "remote-nix-shell.sh: creating a derivation in the local store."
drv=$(nix-instantiate $@ --quiet)
echo "the derivation has store path: $drv"
echo "remote-nix-shell.sh: building this derivation's output locally."
nix-store --realize $drv --quiet > /dev/null
echo "remote-nix-shell.sh: copying the derivation and its output to the host."
nix-copy-closure --include-outputs --to $host $drv
echo "remote-nix-shell.sh: entering a remote shell."
ssh -t $host "source .profile; source .bash_profile; nix-shell $drv"
let
ghcOpts = [
"-Wall"
"-Wincomplete-uni-patterns"
"-Wincomplete-record-updates"
"-Wmissing-home-modules"
"-Widentities"
"-Wredundant-constraints"
"-Wcpp-undef"
#"-fwarn-missing-export-li"
"-fwarn-tabs"
"-fwarn-unused-imports"
"-fwarn-missing-signatures"
"-fwarn-name-shadowing"
"-fwarn-incomplete-patterns"
"-fprint-potential-instances"
];
argo = {
src = ./argo/src;
dependencies = [
"base"
"turtle"
"data-default"
"managed"
"ansi-terminal"
"unix"
"system-filepath"
"async"
"process"
"text"
"optparse-applicative"
"extra"
"foldl"
"conduit"
"conduit-extra"
"bytestring"
"stm"
"pretty-show"
];
inherit ghcOpts;
#extensions = [ "OverloadedStrings"];
};
argotk = {
src = ./argotk;
packages = [ argo ];
dependencies = [
"base"
"shake"
"turtle"
"data-default"
"async"
"unix"
"text"
"optparse-applicative"
"foldl"
"ansi-terminal"
];
inherit ghcOpts;
};
in argotk
{
"url": "https://xgitlab.cels.anl.gov/argo/argopkgs.git",
"rev": "a7e6a1136bf87d4e3ba51749c7f142f310536796",
"date": "2019-01-23T08:57:47-06:00",
"sha256": "1l6i4lq2zh1hj7zwywvckskfp3lrw06bn8x2h9ip8rq4lby88s5x",
"fetchSubmodules": false
}
#! /usr/bin/env sh
nix-prefetch-git https://xgitlab.cels.anl.gov/argo/argopkgs.git refs/heads/master > pin.json
(import ./default.nix {}).test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment