Refactor flake.nix to use the new standard inputs

This commit is contained in:
Thiago Kenji Okada
2022-09-08 20:53:05 +01:00
parent 827fe858bc
commit 6005107c0b
2 changed files with 15 additions and 13 deletions

View File

@@ -32,13 +32,8 @@ in
};
};
}).activationPackage;
init-example-el = self.outputs.package.${system} {
doomPrivateDir = ./test/doom.d;
dependencyOverrides = inputs;
};
init-example-el-emacsGit = self.outputs.package.${system} {
doomPrivateDir = ./test/doom.d;
dependencyOverrides = inputs;
init-example-el = self.outputs.packages.${system}.nix-doom-emacs;
init-example-el-emacsGit = self.outputs.packages.${system}.nix-doom-emacs.override {
emacsPackages = with pkgs; emacsPackagesFor emacsGit;
};
}

View File

@@ -2,8 +2,8 @@
{
inputs = {
home-manager.url = "github:rycee/home-manager";
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs/flake";
home-manager.url = "github:nix-community/home-manager";
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
};
outputs = {
@@ -92,13 +92,20 @@
in eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
devShell = pkgs.mkShell {
devShells.default = pkgs.mkShell {
buildInputs =
[ (pkgs.python3.withPackages (ps: with ps; [ PyGithub ])) ];
};
package = { dependencyOverrides ? { }, ... }@args:
pkgs.callPackage self
(args // { dependencyOverrides = (inputs // dependencyOverrides); });
# TODO: remove this after NixOS 23.05 is released
package = { ... }@args:
pkgs.lib.warn "Deprecated, please use `packages.${system}.default` instead!"
(pkgs.callPackage self args);
packages = {
default = self.outputs.packages.${system}.nix-doom-emacs;
nix-doom-emacs = pkgs.callPackage self {
doomPrivateDir = ./test/doom.d;
};
};
checks = import ./checks.nix { inherit system; } inputs;
}) // {
hmModule = import ./modules/home-manager.nix inputs;