added formatter
This commit is contained in:
parent
2511d6ae4d
commit
28901f25f1
61
flake.nix
61
flake.nix
@ -5,37 +5,40 @@
|
|||||||
nixpkgs.url = github:nixos/nixpkgs/nixos-23.05;
|
nixpkgs.url = github:nixos/nixpkgs/nixos-23.05;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs = {
|
||||||
let
|
self,
|
||||||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
nixpkgs,
|
||||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
}: let
|
||||||
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||||
in {
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
in {
|
||||||
|
# Formatter
|
||||||
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||||
|
|
||||||
# Packages
|
# Packages
|
||||||
packages = forAllSystems (system: {
|
packages = forAllSystems (system: {
|
||||||
default = pkgs.${system}.poetry2nix.mkPoetryApplication { projectDir = self; };
|
default = pkgs.${system}.poetry2nix.mkPoetryApplication {projectDir = self;};
|
||||||
});
|
});
|
||||||
|
|
||||||
# Dev Shell
|
# Dev Shell
|
||||||
devShells = forAllSystems (system: {
|
devShells = forAllSystems (system: {
|
||||||
default = pkgs.${system}.mkShellNoCC {
|
default = pkgs.${system}.mkShellNoCC {
|
||||||
shellHook = "Welcome to your nix-powered dev environment for dyn-gandi!";
|
shellHook = "Welcome to your nix-powered dev environment for dyn-gandi!";
|
||||||
|
|
||||||
packages = with pkgs.${system}; [
|
packages = with pkgs.${system}; [
|
||||||
(poetry2nix.mkPoetryEnv { projectDir = self; })
|
(poetry2nix.mkPoetryEnv {projectDir = self;})
|
||||||
poetry
|
poetry
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
};
|
# Run as apps
|
||||||
});
|
apps = forAllSystems (system: {
|
||||||
|
default = {
|
||||||
# Run as apps
|
program = "${self.packages.${system}.default}/bin/dyn_gandi";
|
||||||
apps = forAllSystems (system: {
|
type = "app";
|
||||||
default = {
|
};
|
||||||
program = "${self.packages.${system}.default}/bin/dyn_gandi";
|
});
|
||||||
type = "app";
|
};
|
||||||
};
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user