dotfiles/templates/py-poetry/flake.nix

30 lines
881 B
Nix
Raw Permalink Normal View History

2023-01-19 22:02:39 +00:00
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
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
{
packages = forAllSystems (system: {
default = pkgs.${system}.poetry2nix.mkPoetryApplication { projectDir = self; };
});
devShells = forAllSystems (system: {
bootstrap = pkgs.${system}.mkShellNoCC {
packages = [
pkgs.${system}.poetry
];
};
2023-01-19 22:02:39 +00:00
default = pkgs.${system}.mkShellNoCC {
packages = [
(pkgs.${system}.poetry2nix.mkPoetryEnv { projectDir = self; })
pkgs.${system}.poetry
2023-01-19 22:02:39 +00:00
];
};
});
};
}