1: { cabalField, nixpkgs1803, runCommand, unpack' }: 2: 3: runCommand "cabalField-test" { 4: found = cabalField { 5: dir = unpack' "text" nixpkgs1803.haskellPackages.text.src; 6: field = "name"; 7: }; 8: } '' 9: [[ "x$found" = "xtext" ]] || { 10: echo "Got '$found' instead of 'text'" 1>&2 11: exit 1 12: } 13: mkdir "$out" 14: ''