refactor(nix): match caelestia-dots/shell#1866 (#166)

This commit is contained in:
2 * r + 2 * t
2026-09-07 16:31:54 +10:00
committed by GitHub
parent 9a7c93b72b
commit a22e77b916
+14 -13
View File
@@ -2,7 +2,7 @@
description = "CLI for Caelestia dots";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
caelestia-shell = {
url = "github:caelestia-dots/shell";
@@ -16,25 +16,26 @@
nixpkgs,
...
} @ inputs: let
forAllSystems = fn:
nixpkgs.lib.genAttrs nixpkgs.lib.platforms.linux (
system: fn nixpkgs.legacyPackages.${system}
);
in {
formatter = forAllSystems (pkgs: pkgs.alejandra);
inherit (nixpkgs.lib) genAttrs platforms lists systems;
packages = forAllSystems (pkgs: rec {
caelestia-cli = pkgs.callPackage ./default.nix {
pkgsOf = nixpkgs.legacyPackages;
systems' = lists.intersectLists platforms.linux systems.flakeExposed;
eachSystem = genAttrs systems';
in {
formatter = eachSystem (system: pkgsOf.${system}.alejandra);
packages = eachSystem (system: rec {
caelestia-cli = pkgsOf.${system}.callPackage ./default.nix {
rev = self.rev or self.dirtyRev;
caelestia-shell = inputs.caelestia-shell.packages.${pkgs.system}.default;
caelestia-shell = inputs.caelestia-shell.packages.${system}.default;
};
with-shell = caelestia-cli.override {withShell = true;};
default = caelestia-cli;
});
devShells = forAllSystems (pkgs: {
default = pkgs.mkShellNoCC {
packages = [self.packages.${pkgs.system}.with-shell];
devShells = eachSystem (system: {
default = pkgsOf.${system}.mkShellNoCC {
packages = [self.packages.${system}.with-shell];
};
});
};