flake.nix 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {
  2. description = "A curated collection of production-ready templates for your homelab and infrastructure projects";
  3. inputs = {
  4. nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  5. flake-utils.url = "github:numtide/flake-utils";
  6. };
  7. outputs = {
  8. self,
  9. nixpkgs,
  10. flake-utils,
  11. }:
  12. flake-utils.lib.eachDefaultSystem (
  13. system: let
  14. pkgs = nixpkgs.legacyPackages.${system};
  15. boilerplates = pkgs.python3Packages.buildPythonApplication {
  16. pname = "boilerplates";
  17. version = "0.0.6";
  18. src = ./.;
  19. format = "pyproject";
  20. nativeBuildInputs = with pkgs.python3Packages; [
  21. setuptools
  22. wheel
  23. ];
  24. propagatedBuildInputs = with pkgs.python3Packages; [
  25. typer
  26. rich
  27. pyyaml
  28. python-frontmatter
  29. jinja2
  30. ];
  31. meta = with pkgs.lib; {
  32. description = "A CLI for managing boilerplates and templates";
  33. homepage = "https://github.com/christianlempa/boilerplates";
  34. license = licenses.mit;
  35. maintainers = ["Théo Posty <theo+github@posty.fr>"];
  36. mainProgram = "boilerplates";
  37. };
  38. };
  39. in {
  40. packages = {
  41. default = boilerplates;
  42. boilerplates = boilerplates;
  43. };
  44. apps = {
  45. default = {
  46. type = "app";
  47. program = "${boilerplates}/bin/boilerplates";
  48. };
  49. };
  50. }
  51. );
  52. }