Use flake-parts
This commit is contained in:
parent
eab6448f28
commit
a8f99675da
2 changed files with 61 additions and 21 deletions
51
flake.nix
51
flake.nix
|
@ -1,32 +1,41 @@
|
|||
{
|
||||
inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs-2305.url = "github:NixOS/nixpkgs/nixos-23.05";
|
||||
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixpkgs, self, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
lib = import ./lib { inherit inputs self; };
|
||||
|
||||
inherit (lib) mkNeovim mkVimPlugin;
|
||||
|
||||
default = mkVimPlugin { inherit system; };
|
||||
neovim = mkNeovim { inherit system; };
|
||||
in
|
||||
{
|
||||
inherit lib;
|
||||
|
||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||
|
||||
packages.${system} = {
|
||||
inherit default neovim;
|
||||
inputs@{ self, flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
flake = {
|
||||
lib = import ./lib { inherit inputs self; };
|
||||
};
|
||||
|
||||
systems = [ "x86_64-linux" ];
|
||||
|
||||
perSystem =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
{
|
||||
apps = {
|
||||
nvim = {
|
||||
program = "${config.packages.neovim}/bin/nvim";
|
||||
type = "app";
|
||||
};
|
||||
};
|
||||
|
||||
packages = {
|
||||
default = self.lib.mkVimPlugin { inherit system; };
|
||||
neovim = self.lib.mkNeovim { inherit system; };
|
||||
};
|
||||
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Reference in a new issue