1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
with import ./config.nix;
let
  transitive-dependency = mkDerivation {
    name = "transitive-dependency";
    __structuredAttrs = true;

    nativeBuildInputs = [
      null
      (throw "transitive dependency growls")
    ];
  };


  direct-dependency = derivation {
    name = "direct-dependency";
    __structuredAttrs = true;

    libtrans = transitive-dependency;
  };

  package-you-care-about = derivation {
    name = "package-you-care-about";
    __structuredAttrs = true;

    buildInputs = [
      direct-dependency
    ];
  };

in package-you-care-about.outPath