Commit 54b27173 authored by Valentin Reis's avatar Valentin Reis
Browse files

update grafting logic.

parent b9f5d910
Pipeline #5661 passed with stages
in 34 minutes and 21 seconds
{ # host package set (unused except for fetching nixpkgs)
hostPkgs ? import <nixpkgs> {}
hostPkgs ? import <nixpkgs> {}
, # versioned nixpkgs
pkgs ? import (hostPkgs.nix-update-source.fetch ./pkgs.json).src {}
pkgs ? import (hostPkgs.nix-update-source.fetch ./pkgs.json).src {}
, # versioned nixpkgs-older version for zmcat
pkgs-old ? import (hostPkgs.nix-update-source.fetch ./pkgs-old.json).src {}
pkgs-old ? import (hostPkgs.nix-update-source.fetch ./pkgs-old.json).src {}
, # fetcher alias for the remaining arguments
fetched ? s: (pkgs.nix-update-source.fetch s).src
fetched ? s: (pkgs.nix-update-source.fetch s).src
, #source overrides: core nrm components
aml-src ? fetched aml/pin.json
, libnrm-src ? fetched libnrm/pin.json
, nrm-src ? fetched nrm/pin.json
, containers-src ? fetched containers/pin.json
aml-src ? fetched aml/pin.json
, libnrm-src ? fetched libnrm/pin.json
, nrm-src ? fetched nrm/pin.json
, containers-src ? fetched containers/pin.json
, #source overrides: applications
amg-src ? fetched amg/pin.json
, qmcpack-src ? fetched qmcpack/pin.json
, openmc-src ? fetched openmc/pin.json
, stream-src ? fetched stream/pin.json
, lammps-src ? fetched lammps/pin.json
amg-src ? fetched amg/pin.json
, qmcpack-src ? fetched qmcpack/pin.json
, openmc-src ? fetched openmc/pin.json
, stream-src ? fetched stream/pin.json
, lammps-src ? fetched lammps/pin.json
, #source overrides: tooling
argotk-src ? builtins.fetchGit {inherit (fetched argotk/pin.json) url rev;}
......@@ -30,10 +30,10 @@
, experiments-src ? fetched experiments/pin.json
, #used for hardware experiments.
sudoPath ? null
sudoPath ? null
, #whether to rebuild apps when libnrm changes.
rebuildApps ? true
, #whether to graft apps on libnrm.
graftLibnrm ? false
}:
let
callPackage = pkgs.lib.callPackageWith (pkgs // argopkgs);
......@@ -60,11 +60,13 @@ let
src = src;
libnrm = libnrm-pinned;
};
in if !rebuildApps then drv else pkgs.replaceDependency {
drv = drv;
oldDependency = libnrm-pinned;
newDependency = libnrm;
};
rebuilt = drv.override {libnrm =libnrm;};
grafted = pkgs.replaceDependency {
drv = drv;
oldDependency = libnrm-pinned;
newDependency = libnrm;
};
in if graftLibnrm then grafted else rebuilt;
amg = repLibnrm ./amg amg-src {};
qmcpack = repLibnrm ./qmcpack qmcpack-src {};
openmc = repLibnrm ./openmc openmc-src {};
......@@ -273,33 +275,3 @@ let
};
# re-exporting a full nixpkgs-like package set
in pkgs // argopkgs
#jupyter =
#let
#jupyter = import (fetched jupyter/pin.json) {};
#in
#(jupyter.jupyterlabWith {
#kernels = [
#(jupyter.kernels.juniperWith {
#name = "analysis";
#packages = p: with p; [ ggplot2
#pkgs.which
#docopt
#purrr
#knitr
#cowplot
#plotly
#lubridate
#dplyr
#ggplot2
#xtable
#ggthemes
#data_table
#];
#})
#];
#}).env;
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