feat(flake): use sentence case on descriptions
This commit is contained in:
parent
c993013203
commit
a306e192a4
3 changed files with 17 additions and 6 deletions
15
flake.nix
15
flake.nix
|
@ -1,9 +1,20 @@
|
||||||
{
|
{
|
||||||
description = "Flake Template Hell";
|
description = "Flake Template Hell";
|
||||||
outputs = _: {
|
outputs = _: let
|
||||||
|
stringToCharacters = str: builtins.genList (p: builtins.substring p 1 str) (builtins.stringLength str);
|
||||||
|
upperCase = stringToCharacters "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
lowerCase = stringToCharacters "abcdefghijklmnopqrstuvwxyz";
|
||||||
|
toUpper = builtins.replaceStrings lowerCase upperCase;
|
||||||
|
toLower = builtins.replaceStrings upperCase lowerCase;
|
||||||
|
addContextFrom = src: target: builtins.substring 0 0 src + target;
|
||||||
|
toSentenceCase = str: let
|
||||||
|
firstChar = builtins.substring 0 1 str;
|
||||||
|
restChars = builtins.substring 1 (builtins.stringLength str) str;
|
||||||
|
in addContextFrom str (toUpper firstChar + toLower restChars);
|
||||||
|
in {
|
||||||
templates = builtins.mapAttrs (name: _: {
|
templates = builtins.mapAttrs (name: _: {
|
||||||
path = ./templates/${name};
|
path = ./templates/${name};
|
||||||
description = "Template for ${name} projects.";
|
description = "Template for ${toSentenceCase name} projects.";
|
||||||
}) (builtins.readDir ./templates);
|
}) (builtins.readDir ./templates);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
}: let
|
}: let
|
||||||
ps = python3Packages;
|
ps = python3Packages;
|
||||||
in ps.buildPythonApplication {
|
in ps.buildPythonApplication {
|
||||||
pname = "sm64pcport-for-dummies";
|
pname = "REPLACE_ME";
|
||||||
version = "2025.03";
|
version = "REPLACE_VER";
|
||||||
|
|
||||||
src = builtins.filterSource (path: _: baseNameOf path != ".git") ../.;
|
src = builtins.filterSource (path: _: baseNameOf path != ".git") ../.;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[project]
|
[project]
|
||||||
name = "REPLACE_ME"
|
name = "REPLACE_ME"
|
||||||
description = "Dumbed-down frontend for the SM64 PC Port compiler."
|
description = "REPLACE DESC"
|
||||||
version = "2025.03"
|
version = "REPLACE_VER"
|
||||||
|
|
||||||
[project.scripts]
|
[project.scripts]
|
||||||
REPLACE_ME = "REPLACE_ME.__main__:main"
|
REPLACE_ME = "REPLACE_ME.__main__:main"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue