used formatter

This commit is contained in:
Kristian Krsnik 2023-07-27 13:34:55 +02:00
parent 28901f25f1
commit b49f8a6a03

View File

@ -5,40 +5,40 @@
nixpkgs.url = github:nixos/nixpkgs/nixos-23.05; nixpkgs.url = github:nixos/nixpkgs/nixos-23.05;
}; };
outputs = { outputs = { self, nixpkgs }:
self, let
nixpkgs, supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
}: let forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; in {
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
in {
# Formatter
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
# Packages # Formatter
packages = forAllSystems (system: { formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
default = pkgs.${system}.poetry2nix.mkPoetryApplication {projectDir = self;};
});
# Dev Shell # Packages
devShells = forAllSystems (system: { packages = forAllSystems (system: {
default = pkgs.${system}.mkShellNoCC { default = pkgs.${system}.poetry2nix.mkPoetryApplication { projectDir = self; };
shellHook = "Welcome to your nix-powered dev environment for dyn-gandi!"; });
packages = with pkgs.${system}; [ # Dev Shell
(poetry2nix.mkPoetryEnv {projectDir = self;}) devShells = forAllSystems (system: {
poetry default = pkgs.${system}.mkShellNoCC {
]; shellHook = "Welcome to your nix-powered dev environment for dyn-gandi!";
};
});
# Run as apps packages = with pkgs.${system}; [
apps = forAllSystems (system: { (poetry2nix.mkPoetryEnv { projectDir = self; })
default = { poetry
program = "${self.packages.${system}.default}/bin/dyn_gandi"; ];
type = "app";
}; };
}); });
};
# Run as apps
apps = forAllSystems (system: {
default = {
program = "${self.packages.${system}.default}/bin/dyn_gandi";
type = "app";
};
});
};
} }