2023-07-25 22:55:09 +00:00
|
|
|
{
|
|
|
|
description = "A very basic flake";
|
|
|
|
|
2023-07-26 20:27:02 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = github:nixos/nixpkgs/nixos-23.05;
|
|
|
|
};
|
2023-07-25 22:55:09 +00:00
|
|
|
|
2023-07-26 20:27:02 +00:00
|
|
|
outputs = { self, nixpkgs }:
|
|
|
|
let
|
|
|
|
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
|
|
|
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
|
|
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
|
|
|
in {
|
2023-07-25 22:55:09 +00:00
|
|
|
|
2023-07-26 20:27:02 +00:00
|
|
|
# Packages
|
|
|
|
packages = forAllSystems (system: {
|
|
|
|
default = pkgs.${system}.poetry2nix.mkPoetryApplication { projectDir = self; };
|
|
|
|
});
|
2023-07-25 22:55:09 +00:00
|
|
|
|
2023-07-26 20:27:02 +00:00
|
|
|
# Dev Shell
|
|
|
|
devShells = forAllSystems (system: {
|
|
|
|
default = pkgs.${system}.mkShellNoCC {
|
|
|
|
shellHook = "Welcome to your nix-powered dev environment for dyn-gandi!";
|
|
|
|
|
|
|
|
packages = with pkgs.${system}; [
|
|
|
|
(poetry2nix.mkPoetryEnv { projectDir = self; })
|
|
|
|
poetry
|
|
|
|
];
|
|
|
|
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
# Run as apps
|
|
|
|
apps = forAllSystems (system: {
|
|
|
|
default = {
|
|
|
|
program = "${self.packages.${system}.default}/bin/dyn_gandi";
|
|
|
|
type = "app";
|
|
|
|
};
|
|
|
|
});
|
|
|
|
};
|
2023-07-25 22:55:09 +00:00
|
|
|
}
|