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
32
pkgs/development/compilers/qbe/test-can-run-hello-world.nix
Normal file
32
pkgs/development/compilers/qbe/test-can-run-hello-world.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenv
|
||||
, writeText
|
||||
, qbe
|
||||
}:
|
||||
|
||||
# The hello world program available at https://c9x.me/compile/
|
||||
let helloWorld = writeText "hello-world.ssa" ''
|
||||
function w $add(w %a, w %b) { # Define a function add
|
||||
@start
|
||||
%c =w add %a, %b # Adds the 2 arguments
|
||||
ret %c # Return the result
|
||||
}
|
||||
export function w $main() { # Main function
|
||||
@start
|
||||
%r =w call $add(w 1, w 1) # Call add(1, 1)
|
||||
call $printf(l $fmt, w %r, ...) # Show the result
|
||||
ret 0
|
||||
}
|
||||
data $fmt = { b "One and one make %d!\n", b 0 }
|
||||
'';
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
name = "qbe-test-can-run-hello-world";
|
||||
meta.timeout = 10;
|
||||
buildCommand = ''
|
||||
${qbe}/bin/qbe -o asm.s ${helloWorld}
|
||||
cc -o out asm.s
|
||||
./out | grep 'One and one make 2!'
|
||||
touch $out
|
||||
'';
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue