barmanager/flake.nix
2024-11-26 13:19:11 +01:00

54 lines
1.4 KiB
Nix

{
description = "A Nix-flake-based Python development environment";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
venvDir = ".venv";
packages = with pkgs; [ python311 poetry ] ++
(with pkgs.python311Packages; [
pip
venvShellHook
black
docopt
]);
};
});
packages = forEachSupportedSystem ({pkgs}: {
default = pkgs.python311Packages.buildPythonPackage rec {
pname = "barManager";
version = "0.1";
pyproject = true;
src = ./.;
build-system = with pkgs; [
python311Packages.poetry-core
];
dependencies = [
] ++ (with pkgs.python311Packages; [
docopt
]);
meta = with pkgs.lib; {
description = "";
mainProgram = "barmanager";
homepage = "";
changelog = "";
license = licenses.mit;
};
};
});
};
}