Skip to content

refactor: extract packages into packages/<name>.nix#2686

Open
Lymah123 wants to merge 1 commit into
molybdenumsoftware:masterfrom
Lymah123:refactor/extract-packages-to-separate-files
Open

refactor: extract packages into packages/<name>.nix#2686
Lymah123 wants to merge 1 commit into
molybdenumsoftware:masterfrom
Lymah123:refactor/extract-packages-to-separate-files

Conversation

@Lymah123

@Lymah123 Lymah123 commented Jul 4, 2026

Copy link
Copy Markdown

Extracts the statix and statix-vim package definitions from overlay.nix into packages/statix.nix and packages/statix-vim.nix respectively, and calls each via callPackage in the overlay.

@Lymah123 Lymah123 marked this pull request as ready for review July 4, 2026 13:08
@Lymah123

Lymah123 commented Jul 4, 2026

Copy link
Copy Markdown
Author

@mightyiam , the PR is ready for review

Comment thread packages/statix-vim.nix
lib,
}:
let
pluginRoot = ./../vim-plugin;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
pluginRoot = ./../vim-plugin;
pluginRoot = ../vim-plugin;

Comment thread packages/statix.nix
pname = "statix";
version = "0.6.0-git";
src = lib.fileset.toSource {
root = ./..;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
root = ./..;
root = ../.;

Comment thread packages/statix.nix
Comment on lines +19 to +20
./../Cargo.lock
./../insta.yaml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
./../Cargo.lock
./../insta.yaml
../Cargo.lock
../insta.yaml

Comment thread packages/statix.nix
(file.hasExt "rs")
(file.hasExt "snap")
]
) ./..)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
) ./..)
) ../.)

Comment thread packages/statix.nix
./../insta.yaml
];
};
cargoLock.lockFile = ./../Cargo.lock;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
cargoLock.lockFile = ./../Cargo.lock;
cargoLock.lockFile = ../Cargo.lock;

Comment thread packages/statix.nix
meta = {
mainProgram = "statix";
description = "Lints and suggestions for the Nix programming language";
homepage = "https://git.peppe.rs/languages/statix/about";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
homepage = "https://git.peppe.rs/languages/statix/about";
homepage = "https://github.com/molybdenumsoftware/statix";

Comment thread overlay.nix
Comment on lines +2 to +3
statix = final.callPackage ./packages/statix.nix { };
statix-vim = final.callPackage ./packages/statix-vim.nix { };

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
statix = final.callPackage ./packages/statix.nix { };
statix-vim = final.callPackage ./packages/statix-vim.nix { };
statix = prev.callPackage ./packages/statix.nix { };
statix-vim = prev.callPackage ./packages/statix-vim.nix { };

I think prev is more correct. And this seems to be an existing issue. May as well correct it, but in a separate commit. Of type chore, I think.

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