Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package vulnix as nix flake #106

Merged
merged 8 commits into from
Dec 20, 2024

Conversation

henrirosten
Copy link
Contributor

@henrirosten henrirosten commented Dec 18, 2024

Package vulnix as nix flake:

  • initialize vulnix nix flake
  • introduces flake.parts for a modular approach to composing the flake outputs
  • adds flake-compat to ensure non-flake users can work with the repo
  • configures nix devshell with vulnix required python dependencies
  • configures treefmt for nix fmt which enables the following:
    • black to format .py files
    • isort to sort imports in .py files
    • nixfmt to format .nix files
    • deadnix to remove dead nix code
    • statix to avoid nix anti-patterns
    • mixes in a flake check
  • applies the initial formatting changes
❯ nix flake show
...
├───checks
│   ├───aarch64-darwin
│   │   ├───package-default omitted (use '--all-systems' to show)
│   │   ├───package-vulnix omitted (use '--all-systems' to show)
│   │   └───treefmt omitted (use '--all-systems' to show)
│   ├───aarch64-linux
│   │   ├───package-default omitted (use '--all-systems' to show)
│   │   ├───package-vulnix omitted (use '--all-systems' to show)
│   │   └───treefmt omitted (use '--all-systems' to show)
│   ├───x86_64-darwin
│   │   ├───package-default omitted (use '--all-systems' to show)
│   │   ├───package-vulnix omitted (use '--all-systems' to show)
│   │   └───treefmt omitted (use '--all-systems' to show)
│   └───x86_64-linux
│       ├───package-default: derivation 'python3.12-vulnix-1.11.0.dev0'
│       ├───package-vulnix: derivation 'python3.12-vulnix-1.11.0.dev0'
│       └───treefmt: derivation 'treefmt-check'
├───devShells
│   ├───aarch64-darwin
│   │   └───default omitted (use '--all-systems' to show)
│   ├───aarch64-linux
│   │   └───default omitted (use '--all-systems' to show)
│   ├───x86_64-darwin
│   │   └───default omitted (use '--all-systems' to show)
│   └───x86_64-linux
│       └───default: development environment 'vulnix-devshell'
├───formatter
│   ├───aarch64-darwin omitted (use '--all-systems' to show)
│   ├───aarch64-linux omitted (use '--all-systems' to show)
│   ├───x86_64-darwin omitted (use '--all-systems' to show)
│   └───x86_64-linux: package 'treefmt-nix'
└───packages
    ├───aarch64-darwin
    │   ├───default omitted (use '--all-systems' to show)
    │   └───vulnix omitted (use '--all-systems' to show)
    ├───aarch64-linux
    │   ├───default omitted (use '--all-systems' to show)
    │   └───vulnix omitted (use '--all-systems' to show)
    ├───x86_64-darwin
    │   ├───default omitted (use '--all-systems' to show)
    │   └───vulnix omitted (use '--all-systems' to show)
    └───x86_64-linux
        ├───default: package 'python3.12-vulnix-1.11.0.dev0'
        └───vulnix: package 'python3.12-vulnix-1.11.0.dev0'

Signed-off-by: Henri Rosten <[email protected]>
Signed-off-by: Henri Rosten <[email protected]>
Signed-off-by: Henri Rosten <[email protected]>
Signed-off-by: Henri Rosten <[email protected]>
Signed-off-by: Henri Rosten <[email protected]>
Signed-off-by: Henri Rosten <[email protected]>
@henrirosten henrirosten marked this pull request as ready for review December 18, 2024 15:22
@henrirosten henrirosten requested a review from zimbatm December 18, 2024 15:22
Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@henrirosten henrirosten merged commit 0e6c60b into nix-community:master Dec 20, 2024
2 checks passed
@henrirosten henrirosten deleted the vulnix-flake branch December 20, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants