nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 13 lines 511 B view raw
1{ testers, fetchurl, jq, moreutils, ... }: { 2 # Tests that we can send custom headers with spaces in them 3 header = 4 let headerValue = "Test '\" <- These are some quotes"; 5 in testers.invalidateFetcherByDrvHash fetchurl { 6 url = "https://httpbin.org/headers"; 7 sha256 = builtins.hashString "sha256" (headerValue + "\n"); 8 curlOptsList = [ "-H" "Hello: ${headerValue}" ]; 9 postFetch = '' 10 ${jq}/bin/jq -r '.headers.Hello' $out | ${moreutils}/bin/sponge $out 11 ''; 12 }; 13}