mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-24 05:05:37 +00:00
remove flake-utils from poetry template
This commit is contained in:
parent
0f1cbe2e06
commit
0cdae3569e
@ -1,29 +1,44 @@
|
||||
{
|
||||
description = "Python project flake";
|
||||
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
poetry2nix.url = "github:nix-community/poetry2nix";
|
||||
};
|
||||
outputs =
|
||||
{ nixpkgs, poetry2nix, ... }:
|
||||
let
|
||||
projectDir = ./.;
|
||||
supportedSystems = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
in
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
poetry2nix,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ poetry2nix.overlay ];
|
||||
overlays = [ poetry2nix.overlays.default ];
|
||||
};
|
||||
projectDir = ./.;
|
||||
in
|
||||
{
|
||||
defaultPackage = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
|
||||
devShells.default = pkgs.mkShell {
|
||||
default = pkgs.poetry2nix.mkPoetryApplication { inherit projectDir; };
|
||||
}
|
||||
);
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ poetry2nix.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
(pkgs.poetry2nix.mkPoetryEnv { inherit projectDir; })
|
||||
pkgs.poetry
|
||||
@ -31,4 +46,5 @@
|
||||
};
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user