uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
34
pkgs/build-support/trivial-builders/test/write-text-file.nix
Normal file
34
pkgs/build-support/trivial-builders/test/write-text-file.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ writeTextFile }:
|
||||
let
|
||||
veryWeirdName = ''here's a name with some "bad" characters, like spaces and quotes'';
|
||||
in writeTextFile {
|
||||
name = "weird-names";
|
||||
destination = "/etc/${veryWeirdName}";
|
||||
text = ''passed!'';
|
||||
checkPhase = ''
|
||||
# intentionally hardcode everything here, to make sure
|
||||
# Nix does not mess with file paths
|
||||
|
||||
name="here's a name with some \"bad\" characters, like spaces and quotes"
|
||||
fullPath="$out/etc/$name"
|
||||
|
||||
if [ -f "$fullPath" ]; then
|
||||
echo "[PASS] File exists!"
|
||||
else
|
||||
echo "[FAIL] File was not created at expected path!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
content=$(<"$fullPath")
|
||||
expected="passed!"
|
||||
|
||||
if [ "$content" = "$expected" ]; then
|
||||
echo "[PASS] Contents match!"
|
||||
else
|
||||
echo "[FAIL] File contents don't match!"
|
||||
echo " Expected: $expected"
|
||||
echo " Got: $content"
|
||||
exit 2
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue