aboutsummaryrefslogtreecommitdiff
path: root/modules/apps/cli.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/apps/cli.nix')
-rw-r--r--modules/apps/cli.nix7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/apps/cli.nix b/modules/apps/cli.nix
index 6db92e3..fa16b8a 100644
--- a/modules/apps/cli.nix
+++ b/modules/apps/cli.nix
@@ -2,8 +2,6 @@
let
- inherit (builtins)
- toString ;
inherit (lib)
concatMapStrings filterAttrs mapAttrs mapAttrsToList mkOption unique ;
inherit (lib.types)
@@ -14,13 +12,14 @@ let
exec = name: { user, command, ... }:
let
+ cc = "${pkgs.gcc}/bin/gcc -Wall -Wextra -Werror -s -std=gnu99 -O2";
uid = toString config.users.users.${user}.uid;
gid = uid;
src = pkgs.writeText "${name}.c" ''
#include <unistd.h>
#include <grp.h>
#include <pwd.h>
- #include <stdio.h>
+ #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
@@ -84,7 +83,7 @@ let
return EXIT_FAILURE;
}
'';
- in pkgs.runCommand name {} "gcc -Wall -Wextra -Werror -s -std=gnu99 -O2 ${src} -o $out";
+ in pkgs.runCommand name {} "${cc} -o $out ${src}";
cliapp = submodule({name, ...}:
{