Skip to content
Snippets Groups Projects
  1. Jun 15, 2019
  2. May 07, 2019
  3. Aug 17, 2016
    • Eelco Dolstra's avatar
      Add a mechanism for derivation attributes to reference the derivation's outputs · 22d6e31f
      Eelco Dolstra authored
      For example, you can now say:
      
        configureFlags = "--prefix=${placeholder "out"} --includedir=${placeholder "dev"}";
      
      The strings returned by the ‘placeholder’ builtin are replaced at
      build time by the actual store paths corresponding to the specified
      outputs.
      
      Previously, you had to work around the inability to self-reference by doing stuff like:
      
        preConfigure = ''
          configureFlags+=" --prefix $out --includedir=$dev"
        '';
      
      or rely on ad-hoc variable interpolation semantics in Autoconf or Make
      (e.g. --prefix=\$(out)), which doesn't always work.
      22d6e31f
Loading