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; }).activationPackage;
init-example-el = self.outputs.package.${system} { init-example-el = self.outputs.packages.${system}.nix-doom-emacs;
doomPrivateDir = ./test/doom.d; init-example-el-emacsGit = self.outputs.packages.${system}.nix-doom-emacs.override {
dependencyOverrides = inputs;
};
init-example-el-emacsGit = self.outputs.package.${system} {
doomPrivateDir = ./test/doom.d;
dependencyOverrides = inputs;
emacsPackages = with pkgs; emacsPackagesFor emacsGit; emacsPackages = with pkgs; emacsPackagesFor emacsGit;
}; };
} }

View File

@@ -2,8 +2,8 @@
{ {
inputs = { inputs = {
home-manager.url = "github:rycee/home-manager"; home-manager.url = "github:nix-community/home-manager";
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs/flake"; nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
}; };
outputs = { outputs = {
@@ -92,13 +92,20 @@
in eachDefaultSystem (system: in eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; }; let pkgs = import nixpkgs { inherit system; };
in { in {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = buildInputs =
[ (pkgs.python3.withPackages (ps: with ps; [ PyGithub ])) ]; [ (pkgs.python3.withPackages (ps: with ps; [ PyGithub ])) ];
}; };
package = { dependencyOverrides ? { }, ... }@args: # TODO: remove this after NixOS 23.05 is released
pkgs.callPackage self package = { ... }@args:
(args // { dependencyOverrides = (inputs // dependencyOverrides); }); 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; checks = import ./checks.nix { inherit system; } inputs;
}) // { }) // {
hmModule = import ./modules/home-manager.nix inputs; hmModule = import ./modules/home-manager.nix inputs;