Flake-parts example
{
description = "Nix flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
perSystem = { pkgs, self', ... }: {
packages.default = pkgs.vim;
devShells.default = pkgs.mkShell {
packages = with pkgs; [
self'.packages.default
];
};
};
};
}
Activate the development shell
$ nix develop Build the package
$ nix build Run the package
$ nix run