Commit 5b9e6bdd authored by Valentin Reis's avatar Valentin Reis
Browse files

Trying the callPackagePin with libnrm

parent ab3e1a72
...@@ -15,11 +15,15 @@ let ...@@ -15,11 +15,15 @@ let
gitpin = f: pkgs.fetchgit {inherit (pkgs.lib.importJSON f) url sha256 rev fetchSubmodules;}; gitpin = f: pkgs.fetchgit {inherit (pkgs.lib.importJSON f) url sha256 rev fetchSubmodules;};
compiler_path = "/opt/intel/compilers_and_libraries_2017.1.132/linux"; compiler_path = "/opt/intel/compilers_and_libraries_2017.1.132/linux";
callPackage = pkgs.lib.callPackageWith pkgs; callPackage = pkgs.lib.callPackageWith pkgs;
callPackagePin = path : depset: pkgs.lib.callPackageWith pkgs (toPath "/${path}.nix") (depset//{src = gitpin (toPath "/${path}.json");}); callPackagePin =
{ path
, jsonpath ? toPath "/${path}.json"
, depset ? {} } :
pkgs.lib.callPackageWith pkgs (toPath "/${path}.nix") (depset // {src = gitpin jsonpath;});
pythonPackages = pkgs.python27Packages; pythonPackages = pkgs.python27Packages;
in rec { in rec {
#NRM components #NRM components
libnrm = callPackage ./libnrm {}; libnrm = callPackagePin {path="libnrm/default";};
nrm-containers = callPackage ./containers { nrm-containers = callPackage ./containers {
inherit pythonPackages; inherit pythonPackages;
src = packagepins.containers.nix; src = packagepins.containers.nix;
...@@ -36,8 +40,8 @@ in rec { ...@@ -36,8 +40,8 @@ in rec {
qmcpack = callPackage applications/qmcpack {}; qmcpack = callPackage applications/qmcpack {};
openmc = callPackage applications/openmc {}; openmc = callPackage applications/openmc {};
stream = callPackage applications/stream {}; stream = callPackage applications/stream {};
graph500 = callPackagePin "applications/simple/graph500" {}; graph500 = callPackagePin {path="applications/simple/graph500";};
simple = callPackagePin "applications/simple/dgemm_randomwalk" {inherit intel libnrm;}; simple = callPackagePin {path="applications/simple/dgemm_randomwalk"; depset={inherit intel libnrm;};};
}; };
#Intel compilers #Intel compilers
......
{
"url": "https://xgitlab.cels.anl.gov/argo/libnrm.git",
"rev": "d8f06ac626e7b64636c2756471c661de90aff2f9",
"date": "2018-08-23T16:24:36-05:00",
"sha256": "0n4bc29x9ngp7dv5np69bjg4nqbmqn93szpd6czzhs1r89wz0pdh",
"fetchSubmodules": true
}
{ stdenv, fetchgit, zeromq, mpich2, gfortran }: { stdenv, src, fetchgit, zeromq, mpich2, gfortran }:
stdenv.mkDerivation { stdenv.mkDerivation {
inherit src;
name = "libnrm"; name = "libnrm";
src = fetchgit {
url="https://xgitlab.cels.anl.gov/argo/libnrm.git";
sha256="0n4bc29x9ngp7dv5np69bjg4nqbmqn93szpd6czzhs1r89wz0pdh";
};
buildInputs = [ zeromq mpich2 gfortran ]; buildInputs = [ zeromq mpich2 gfortran ];
......
#!/usr/bin/env bash
nix-prefetch-git https://xgitlab.cels.anl.gov/argo/libnrm.git refs/heads/master > default.json
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