flake.nix 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.1.2";
  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. email-validator
  31. ];
  32. meta = with pkgs.lib; {
  33. description = "A CLI for managing boilerplates and templates";
  34. homepage = "https://github.com/christianlempa/boilerplates";
  35. license = licenses.mit;
  36. maintainers = ["Théo Posty <theo+github@posty.fr>"];
  37. mainProgram = "boilerplates";
  38. };
  39. };
  40. in {
  41. packages = {
  42. default = boilerplates;
  43. boilerplates = boilerplates;
  44. };
  45. apps = {
  46. default = {
  47. type = "app";
  48. program = "${boilerplates}/bin/boilerplates";
  49. };
  50. };
  51. }
  52. );
  53. }