@@ -22,21 +22,29 @@ tl;dr
2222<details ><summary >instantiate a monorepo variant of the template</summary >
2323
2424``` sh
25- nix --accept-flake-config run github:juspay/omnix -- init github:sciexp/python-nix-template -o pnt-mono --non-interactive --params ' {
26- "package-name-kebab-case": "pnt-mono",
27- "package-name-snake-case": "pnt_mono",
25+ PROJECT_DIRECTORY=pnt-mono && \
26+ PROJECT_SNAKE_CASE=$( echo " $PROJECT_DIRECTORY " | tr ' -' ' _' ) && \
27+ PARAMS=$( cat << EOF
28+ {
29+ "package-name-kebab-case": "$PROJECT_DIRECTORY ",
30+ "package-name-snake-case": "$PROJECT_SNAKE_CASE ",
2831 "monorepo-package": true,
2932 "git-org": "pnt-mono",
3033 "author": "Pnt Mono",
3134 "author-email": "mono@pnt.org",
3235 "vscode": true,
3336 "github-ci": true,
3437 "nix-template": false
35- }' && \
36- cd pnt-mono && \
38+ }
39+ EOF
40+ ) && \
41+ nix --accept-flake-config run github:juspay/omnix/1.0.3 -- init github:sciexp/python-nix-template/main -o " $PROJECT_DIRECTORY " --non-interactive --params " $PARAMS " && \
42+ (command -v direnv > /dev/null 2>&1 && direnv revoke " ./$PROJECT_DIRECTORY /" || true) && \
43+ cd " $PROJECT_DIRECTORY " && \
3744git init && \
3845git commit --allow-empty -m " initial commit (empty)" && \
3946git add . && \
47+ nix run github:NixOS/nixpkgs/nixos-unstable#uv -- lock && \
4048nix develop --accept-flake-config -c pytest
4149```
4250
@@ -49,22 +57,29 @@ development dependencies or `nix develop --accept-flake-config` to enter (or add
4957<details ><summary >instantiate a single-package variant of the template</summary >
5058
5159``` sh
52- nix --accept-flake-config run github:juspay/omnix -- init github:sciexp/python-nix-template/main -o pnt-new --non-interactive --params ' {
53- "package-name-kebab-case": "pnt-new",
54- "package-name-snake-case": "pnt_new",
60+ PROJECT_DIRECTORY=pnt-new && \
61+ PROJECT_SNAKE_CASE=$( echo " $PROJECT_DIRECTORY " | tr ' -' ' _' ) && \
62+ PARAMS=$( cat << EOF
63+ {
64+ "package-name-kebab-case": "$PROJECT_DIRECTORY ",
65+ "package-name-snake-case": "$PROJECT_SNAKE_CASE ",
5566 "monorepo-package": false,
5667 "git-org": "pnt-new",
5768 "author": "Pnt New",
5869 "author-email": "new@pnt.org",
5970 "vscode": true,
6071 "github-ci": true,
6172 "nix-template": false
62- }' && \
63- cd pnt-new && \
73+ }
74+ EOF
75+ ) && \
76+ nix --accept-flake-config run github:juspay/omnix/1.0.3 -- init github:sciexp/python-nix-template/main -o " $PROJECT_DIRECTORY " --non-interactive --params " $PARAMS " && \
77+ (command -v direnv > /dev/null 2>&1 && direnv revoke " ./$PROJECT_DIRECTORY /" || true) && \
78+ cd " $PROJECT_DIRECTORY " && \
6479git init && \
6580git commit --allow-empty -m " initial commit (empty)" && \
81+ nix run github:NixOS/nixpkgs/nixos-unstable#uv -- lock && \
6682git add . && \
67- nix run nixpkgs#uv -- lock && \
6883nix develop --accept-flake-config -c pytest
6984```
7085
0 commit comments