feat: refactor emacs package declaring
this is a ton better because: this makes the flake look cleaner this means I can declare multiple packages in the flake without repeating myself as much as i would have had to.
This commit is contained in:
parent
e0e44156e7
commit
95ef7816f0
4 changed files with 105 additions and 84 deletions
40
flake.nix
40
flake.nix
|
@ -11,24 +11,38 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
outputs = inputs:
|
||||
outputs =
|
||||
inputs:
|
||||
inputs.parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
perSystem = { pkgs, self', config, system, ... }: {
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(import inputs.emacs)
|
||||
];
|
||||
perSystem =
|
||||
{
|
||||
pkgs,
|
||||
self',
|
||||
config,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (import ./package/mkEmacs.nix pkgs) mkEmacs;
|
||||
in
|
||||
{
|
||||
_module.args.pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(import inputs.emacs)
|
||||
];
|
||||
};
|
||||
|
||||
packages = {
|
||||
pankomacs = mkEmacs pkgs.emacs29-pgtk;
|
||||
pankomacs-x11 = mkEmacs pkgs.emacs-gtk;
|
||||
};
|
||||
|
||||
formatter = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
|
||||
packages.pankomacs = pkgs.callPackage ./package { };
|
||||
packages.default = self'.packages.pankomacs;
|
||||
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue