Files
sama/flake.nix
T

49 lines
1.4 KiB
Nix

{
description = "DCOS — Distributed Cognitive Operating System";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python311;
pythonPackages = pkgs.python311Packages;
in {
packages.default = pythonPackages.buildPythonPackage {
pname = "dcos";
version = "1.0.0";
src = ./.;
nativeBuildInputs = with pkgs; [
python
pyyaml
];
propagatedBuildInputs = with pythonPackages; [
pyyaml
];
doCheck = false;
format = "pyproject";
pyproject = true;
pyprojectFiles = [ "pyproject.toml" ];
makeWheel = true;
};
devShells.default = pkgs.mkShell {
packages = with pkgs; [
python
pythonPackages.pip
pythonPackages.pytest
pythonPackages.pytest-asyncio
pythonPackages.pyyaml
];
shellHook = ''
export PYTHONPATH="${toString (builtins.toPath ./src)}:$PYTHONPATH"
echo "DCOS dev shell — Python 3.11, pytest, pyyaml"
'';
};
});
}