nixfmt-rfc-style
There is nothing in this commit except for the changes made by nix-shell -p nixfmt-rfc-style --run "nixfmt ." If this has mucked up your open branches then sorry about that. You can probably nixfmt them to match before merging
This commit is contained in:
@@ -1,27 +1,31 @@
|
||||
# A "hello world" program that's smaller than the GNU
|
||||
# one. Used for testing the toolchain/linker behaviour.
|
||||
{
|
||||
runCommandCC
|
||||
runCommandCC,
|
||||
}:
|
||||
let code = ''
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
let
|
||||
code = ''
|
||||
#include <stdio.h>
|
||||
int main()
|
||||
{
|
||||
printf("hello world\n");
|
||||
return 0;
|
||||
}
|
||||
'';
|
||||
in
|
||||
runCommandCC "hello"
|
||||
{
|
||||
printf("hello world\n");
|
||||
return 0;
|
||||
name = "hi";
|
||||
inherit code;
|
||||
executable = true;
|
||||
# hardeningDisable = ["all"];
|
||||
passAsFile = [ "code" ];
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
}
|
||||
'';
|
||||
in runCommandCC "hello" {
|
||||
name = "hi";
|
||||
inherit code;
|
||||
executable = true;
|
||||
# hardeningDisable = ["all"];
|
||||
passAsFile = ["code"];
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
} ''
|
||||
n=$out/bin/$name
|
||||
mkdir -p "$(dirname "$n")"
|
||||
mv "$codePath" code.c
|
||||
$CC -x c code.c -o "$n"
|
||||
''
|
||||
''
|
||||
n=$out/bin/$name
|
||||
mkdir -p "$(dirname "$n")"
|
||||
mv "$codePath" code.c
|
||||
$CC -x c code.c -o "$n"
|
||||
''
|
||||
|
Reference in New Issue
Block a user