Skip to content

Instantly share code, notes, and snippets.

@lukego
Created June 27, 2017 11:56
Show Gist options
  • Save lukego/e8d705228074b1ec40834ea17753ca9e to your computer and use it in GitHub Desktop.
Save lukego/e8d705228074b1ec40834ea17753ca9e to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
with stdenv;
let
a = runCommand "a" {} "mkdir -p $out; touch $out/a";
b = runCommand "b" {} "mkdir -p $out; touch $out/b";
c = symlinkJoin { name = "c"; paths = [ a b ]; };
in
runCommand "z" { input = c; } ''
echo "All inputs:"
ls -l $input
''
$ nix-build --show-trace 0test.nix
error: while evaluating the attribute ‘input’ of the derivation ‘z’ at /nix/store/mqk7i2wcx521gacigcadsiq5i4lm1rvr-nixos-16.03.1349.dda40aa8d1/nixos/pkgs/build-support/trivial-builders.nix:10:14:
cannot coerce a function to a string, at /nix/store/mqk7i2wcx521gacigcadsiq5i4lm1rvr-nixos-16.03.1349.dda40aa8d1/nixos/pkgs/build-support/trivial-builders.nix:10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment