This commit is contained in:
Elisiei Yehorov 2025-07-30 15:40:27 +02:00
parent f30a0e06d5
commit fc49e86428
Signed by: elisiei
GPG key ID: BA1D158DCE3DF089
4 changed files with 105 additions and 0 deletions

1
c/.envrc Normal file
View file

@ -0,0 +1 @@
use flake

57
c/.gitignore vendored Normal file
View file

@ -0,0 +1,57 @@
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
# debug information files
*.dwo
.direnv

43
c/flake.nix Normal file
View file

@ -0,0 +1,43 @@
{
description = "minimal flake for c dev";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
outputs =
inputs:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forEachSupportedSystem =
f:
inputs.nixpkgs.lib.genAttrs supportedSystems (
system:
f {
pkgs = import inputs.nixpkgs { inherit system; };
}
);
in
{
devShells = forEachSupportedSystem (
{ pkgs }:
{
default =
pkgs.mkShell.override
{
# Override stdenv in order to change compiler:
# stdenv = pkgs.clangStdenv;
}
{
packages = with pkgs; [
gnumake
tinycc
];
};
}
);
};
}

View file

@ -5,6 +5,10 @@
{ self }: { self }:
{ {
templates = { templates = {
c = {
path = ./c;
description = "c template";
};
go = { go = {
path = ./go; path = ./go;
description = "go template"; description = "go template";