remove flake-utils from poetry template

This commit is contained in:
Noah Masur 2024-06-05 13:53:27 -04:00
parent 0f1cbe2e06
commit 0cdae3569e
No known key found for this signature in database

View File

@ -1,29 +1,44 @@
{ {
description = "Python project flake"; description = "Python project flake";
inputs = {
inputs.flake-utils.url = "github:numtide/flake-utils"; nixpkgs.url = "github:NixOS/nixpkgs";
inputs.nixpkgs.url = "github:NixOS/nixpkgs"; poetry2nix.url = "github:nix-community/poetry2nix";
inputs.poetry2nix.url = "github:nix-community/poetry2nix"; };
outputs = outputs =
{ nixpkgs, poetry2nix, ... }:
let
projectDir = ./.;
supportedSystems = [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{ {
self, packages = forAllSystems (
nixpkgs,
flake-utils,
poetry2nix,
}:
flake-utils.lib.eachDefaultSystem (
system: system:
let let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [ poetry2nix.overlay ]; overlays = [ poetry2nix.overlays.default ];
}; };
projectDir = ./.;
in in
{ {
defaultPackage = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; }; default = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
devShells.default = pkgs.mkShell { }
);
devShells = forAllSystems (
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ poetry2nix.overlays.default ];
};
in
{
default = pkgs.mkShell {
buildInputs = [ buildInputs = [
(pkgs.poetry2nix.mkPoetryEnv { inherit projectDir; }) (pkgs.poetry2nix.mkPoetryEnv { inherit projectDir; })
pkgs.poetry pkgs.poetry
@ -31,4 +46,5 @@
}; };
} }
); );
};
} }