This repository has been archived by the owner on Jun 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(c): simplify the template config files
- Loading branch information
1 parent
57769ca
commit 54e1b7e
Showing
10 changed files
with
24 additions
and
107 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ stdenv }: | ||
stdenv.mkDerivation { | ||
name = "hello"; | ||
src = ./.; | ||
|
||
env.BINDIR = "${placeholder "out"}/bin"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,8 @@ | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
#include <unistd.h> | ||
|
||
#define lengthof(sstr) (sizeof (sstr) / sizeof *(sstr)) | ||
#define sstr_len(sstr) (lengthof(sstr) - 1) | ||
#define sstr_unpack(sstr) (sstr), (sstr_len(sstr)) | ||
|
||
static const char GREETING[] = "hello, world!\n"; | ||
|
||
int main(void) | ||
{ | ||
return ( | ||
write(STDOUT_FILENO, sstr_unpack(GREETING)) | ||
== sstr_len(GREETING) | ||
) ? EXIT_SUCCESS : EXIT_FAILURE; | ||
printf("hello, world!\n"); | ||
return EXIT_SUCCESS; | ||
} |
This file was deleted.
Oops, something went wrong.