flake-template-hell/templates/python/flake.nix

27 lines
658 B
Nix
Raw Normal View History

{
description = "Python flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
};
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs systems;
pkgsForEach = nixpkgs.legacyPackages;
in
{
packages = forAllSystems (system: {
default = pkgsForEach.${system}.callPackage ./nix/package.nix { };
python-app = self.packages.${system}.default;
});
devShells = forAllSystems (system: {
default = pkgsForEach.${system}.callPackage ./nix/shell.nix {
inherit (self.packages.${system}) python-app;
};
});
};
}