refactor: move package definition to nix/package.nix
Keeps flake.nix cleaner by extracting the package definition. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
26
nix/package.nix
Normal file
26
nix/package.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ lib, buildGoModule, makeWrapper, nix, src }:
|
||||
|
||||
buildGoModule {
|
||||
pname = "nixos-options-mcp";
|
||||
version = "0.1.0";
|
||||
inherit src;
|
||||
|
||||
vendorHash = "sha256-D0KIxQC9ctIAaHBFTvkhBE06uOZwDUcIw8471Ug2doY=";
|
||||
|
||||
subPackages = [ "cmd/nixos-options" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/nixos-options \
|
||||
--prefix PATH : ${lib.makeBinPath [ nix ]}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "MCP server for NixOS options search and query";
|
||||
homepage = "https://git.t-juice.club/torjus/labmcp";
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
mainProgram = "nixos-options";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user