mirror of
https://github.com/NotAShelf/nff.git
synced 2024-11-01 11:01:17 +00:00
32 lines
941 B
Nix
32 lines
941 B
Nix
{
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
poetry2nix,
|
|
}: 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: let
|
|
inherit (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}) mkPoetryApplication;
|
|
in {
|
|
default = mkPoetryApplication {projectDir = self;};
|
|
});
|
|
|
|
devShells = forAllSystems (system: let
|
|
inherit (poetry2nix.lib.mkPoetry2Nix {pkgs = pkgs.${system};}) mkPoetryEnv;
|
|
in {
|
|
default = pkgs.${system}.mkShellNoCC {
|
|
packages = with pkgs.${system}; [
|
|
(mkPoetryEnv {projectDir = self;})
|
|
poetry
|
|
];
|
|
};
|
|
});
|
|
};
|
|
}
|