Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 26 lines 501 B view raw
1{ runCommandLocal, racket }: 2 3let 4 script = racket.writeScript "racket-test-nix-write-script-the-script" { } '' 5 #lang racket/base 6 (display "success") 7 (newline) 8 ''; 9in 10 11runCommandLocal "racket-test-nix-write-script" 12 { 13 nativeBuildInputs = [ racket ]; 14 } 15 '' 16 expectation="success" 17 18 output="$(${script})" 19 20 if test "$output" != "$expectation"; then 21 echo "output mismatch: expected ''${expectation}, but got ''${output}" 22 exit 1 23 fi 24 25 touch $out 26 ''