Files
nixpkgs/pkgs
Bas van Dijk 76ef802d3d mkShell: compose shellHooks
Running the following expression with nix-shell:

  let
    pkgs = import <nixpkgs> {};

    shell1 = pkgs.mkShell {
      shellHook = ''
        echo shell1
      '';
    };

    shell2 = pkgs.mkShell {
      shellHook = ''
        echo shell2
      '';
    };

    shell3 = pkgs.mkShell {
      inputsFrom = [ shell1 shell2 ];
      shellHook = ''
        echo shell3
      '';
    };
  in shell3

Will now results in:
shell2
shell1
shell3

Note that packages in the front of inputsFrom have precedence over
packages in the back. The outermost mkShell has precedence over all.
2019-06-23 22:13:57 +02:00
..
2019-06-23 15:02:41 +02:00
2019-06-23 22:13:57 +02:00
2019-06-23 14:14:21 +02:00
2019-06-22 22:40:11 +02:00
2019-06-23 14:57:16 +02:00
2019-06-23 07:38:23 -04:00
2019-06-23 14:55:22 +02:00