Skip to content

Commit

Permalink
nix: add support for other architectures (#652)
Browse files Browse the repository at this point in the history
  • Loading branch information
emsquid authored Dec 28, 2024
1 parent 479b83e commit cd2879a
Showing 1 changed file with 44 additions and 33 deletions.
77 changes: 44 additions & 33 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,37 @@
nixpkgs,
astal,
}: let
inherit (astal.packages.${system}) astal3 astal4 io gjs;
systems = ["x86_64-linux" "aarch64-linux"];
forAllSystems = nixpkgs.lib.genAttrs systems;
in {
lib.bundle = import ./nix/bundle.nix {
inherit self;
pkgs = nixpkgs.legacyPackages.x86_64-linux;
};

system = "x86_64-linux"; # TODO: other architectures
pkgs = nixpkgs.legacyPackages.x86_64-linux;
packages = forAllSystems (
system: let
inherit (astal.packages.${system}) astal3 astal4 io gjs;

astal-io = io;
astal-gjs = "${gjs}/share/astal/gjs";
pkgs = nixpkgs.legacyPackages.${system};
astal-io = io;
astal-gjs = "${gjs}/share/astal/gjs";

agsPackages = {
default = self.packages.${system}.ags;
ags = pkgs.callPackage ./nix {
inherit astal3 astal4 astal-io astal-gjs;
};
agsFull = pkgs.callPackage ./nix {
inherit astal3 astal4 astal-io astal-gjs;
extraPackages = builtins.attrValues (
builtins.removeAttrs astal.packages.${system} ["docs"]
);
};
};
in {
lib.bundle = import ./nix/bundle.nix {inherit self pkgs;};

packages.${system} = astal.packages.${system} // agsPackages;
agsPackages = {
default = self.packages.${system}.ags;
ags = pkgs.callPackage ./nix {
inherit astal3 astal4 astal-io astal-gjs;
};
agsFull = pkgs.callPackage ./nix {
inherit astal3 astal4 astal-io astal-gjs;
extraPackages = builtins.attrValues (
builtins.removeAttrs astal.packages.${system} ["docs"]
);
};
};
in
astal.packages.${system} // agsPackages
);

templates.default = {
path = ./nix/template;
Expand All @@ -54,17 +61,21 @@
ags = import ./nix/hm-module.nix self;
};

devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
markdownlint-cli2
marksman
vtsls
vscode-langservers-extracted
go
gopls
gotools
go-tools
];
};
devShells = forAllSystems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
default = pkgs.mkShell {
packages = with pkgs; [
markdownlint-cli2
marksman
vtsls
vscode-langservers-extracted
go
gopls
gotools
go-tools
];
};
});
};
}

0 comments on commit cd2879a

Please sign in to comment.