- Create .envrc for Direnv configuration - Add .pre-commit-config.yaml for pre-commit hooks - Include CONTRIBUTING.md with contribution guidelines - Implement Makefile for build, run, and clean commands - Set up Program.cs with a basic Hello World message - Define SampleApp.csproj for .NET project configuration - Add agents.md for coding agent instructions - Create default.nix for Nix flake setup - Initialize deps.nix for NuGet dependencies - Configure Flatpak app with app.flatpak.json - Implement install-templates.sh for installing .NET templates - Define project.toml for project metadata - Set up shell.nix for development shell environment - Add SampleTest.cs for basic unit testing
28 lines
762 B
Nix
28 lines
762 B
Nix
{pkgs}: let
|
|
inherit (pkgs) lib;
|
|
templateName = builtins.baseNameOf (toString ./.);
|
|
in {
|
|
${templateName} = pkgs.stdenvNoCC.mkDerivation {
|
|
pname = templateName;
|
|
version = "0.1.0";
|
|
src = ./.;
|
|
dontBuild = true;
|
|
installPhase = ''
|
|
mkdir -p $out/share/${templateName}
|
|
if [ -d src ]; then
|
|
cp -r src $out/share/${templateName}/
|
|
fi
|
|
for f in README.md project.toml flake.nix default.nix shell.nix Makefile .editorconfig .gitignore; do
|
|
if [ -f "$f" ]; then
|
|
cp "$f" $out/share/${templateName}/
|
|
fi
|
|
done
|
|
'';
|
|
meta = with lib; {
|
|
description = "Template project: ${templateName}";
|
|
license = licenses.unfreeRedistributable;
|
|
platforms = platforms.all;
|
|
};
|
|
};
|
|
}
|