42 lines
1.2 KiB
Nix
42 lines
1.2 KiB
Nix
{
|
|
description = "A tool for composable tracking of scientific data provenance";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
# See https://old.reddit.com/r/Python/comments/npu66t/reproducible_python_environment_with_nix_flake/
|
|
outputs = { self, nixpkgs, flake-utils }:
|
|
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
|
|
let
|
|
python = "python37";
|
|
pkgs = (import nixpkgs {
|
|
inherit system;
|
|
config = {
|
|
allowUnfree = true;
|
|
cudaSupport = true;
|
|
};
|
|
overlays = [
|
|
];
|
|
});
|
|
pythonPackages = pkgs.${python}.pkgs;
|
|
nancy = pythonPackages.buildPythonPackage {
|
|
name = "nancy";
|
|
src = ./.;
|
|
propagatedBuildInputs = with pythonPackages; [
|
|
dill
|
|
];
|
|
};
|
|
# core pkgs are those required to run headless scripts
|
|
corePythonPkgs = ps: with ps; [
|
|
numpy
|
|
pandas
|
|
];
|
|
corePythonEnv = pkgs.${python}.withPackages corePythonPkgs;
|
|
in rec {
|
|
defaultPackage = nancy;
|
|
devShell = pkgs.mkShell { buildInputs = with pkgs; [ corePythonEnv ]; };
|
|
});
|
|
}
|