tantri/flake.nix
Deepak Mallubhotla 5cd9004103
All checks were successful
gitea-physics/tantri/pipeline/head This commit looks good
chore: version updates, matplotlib as dev dependency
2024-05-27 23:45:04 -05:00

47 lines
1.2 KiB
Nix
Executable File

{
description = "Application packaged using poetry2nix";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.poetry2nixSrc = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, flake-utils, poetry2nixSrc }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
poetry2nix = poetry2nixSrc.lib.mkPoetry2Nix { inherit pkgs; };
in {
packages = {
tantriApp = poetry2nix.mkPoetryApplication {
projectDir = self;
python = pkgs.python39;
preferWheels = true;
};
tantriEnv = poetry2nix.mkPoetryEnv {
projectDir = self;
python = pkgs.python39;
preferWheels = true;
overrides = poetry2nix.overrides.withDefaults (self: super: {
});
};
default = self.packages.${system}.tantriEnv;
};
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.tantriEnv ];
buildInputs = [
pkgs.poetry
self.packages.${system}.tantriEnv
self.packages.${system}.tantriApp
pkgs.just
];
shellHook = ''
export DO_NIX_CUSTOM=1
'';
};
}
);
}