1 { linkFarm, hello, writeTextFile, runCommand }:
8 linkFarmFromList = linkFarm "linkFarmFromList" [
9 { name = "foo"; path = foo; }
10 { name = "hello"; path = hello; }
13 linkFarmWithRepeats = linkFarm "linkFarmWithRepeats" [
14 { name = "foo"; path = foo; }
15 { name = "hello"; path = hello; }
16 { name = "foo"; path = hello; }
19 linkFarmFromAttrs = linkFarm "linkFarmFromAttrs" {
23 runCommand "test-linkFarm" { } ''
24 function assertPathEquals() {
28 if [ "$a" != "$b" ]; then
36 assertPathEquals "${linkFarmFromList}/foo" "${foo}"
37 assertPathEquals "${linkFarmFromList}/hello" "${hello}"
39 assertPathEquals "${linkFarmWithRepeats}/foo" "${hello}"
40 assertPathEquals "${linkFarmWithRepeats}/hello" "${hello}"
42 assertPathEquals "${linkFarmFromAttrs}/foo" "${foo}"
43 assertPathEquals "${linkFarmFromAttrs}/hello" "${hello}"