minor cleanup

This commit is contained in:
Greg Burd 2023-09-13 14:57:49 -04:00
parent 24c15b4fdc
commit 2621170d1b
No known key found for this signature in database
GPG key ID: 1FC1E7793410DE46
5 changed files with 14 additions and 11 deletions

View file

@ -2,10 +2,10 @@
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = tab
indent_size = 4
@ -24,8 +24,9 @@ charset = unset
indent_style = unset
indent_size = unset
[*.py]
indent_size = 4
[*.c]
ident_style = space
ident_size = 4
[*.md]
max_line_length = off

1
.gitignore vendored
View file

@ -28,6 +28,7 @@ resource.rc
# Nix
result
bulid
# Misc
*.eml

4
TODO
View file

@ -1,11 +1,7 @@
* add second build target `world.c`
* add GitHub workflow to build all targets, upload/publish all artifacts
* deb, rpm, tgz of source
* Docker container on DockerHub, GitHub Container Repository (ghcr.io)
* containers could have multiple tags as in `latest` and `1.0.0`
* add Nix Flake
* devShell
* direnv/envrc
* build windows MSYS2
* formatting
* lint

View file

@ -12,13 +12,18 @@
outputs = { self, nixpkgs, flake-utils }:
let
# Generate a user-friendly version number (e.g. "1.2.3-DIRTY").
version = "${builtins.readFile ./VERSION.txt}${self.shortRev or "DIRTY"}";
inherit (nixpkgs) lib;
officialRelease = false;
version = lib.fileContents ./.version + versionSuffix;
versionSuffix =
if officialRelease
then ""
else "pre${builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101")}_${self.shortRev or "dirty"}";
# System types to support.
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
# Generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
# Nixpkgs instantiated for supported system types.