mach-nix/flake.nix

38 lines
1.1 KiB
Nix
Raw Normal View History

2020-07-18 06:41:26 +00:00
{
2020-10-03 19:11:50 +00:00
description = "Create highly reproducible python environments";
2020-07-18 06:41:26 +00:00
2020-10-03 19:11:50 +00:00
inputs.flake-utils.url = "github:numtide/flake-utils";
2020-07-18 06:41:26 +00:00
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2020-07-18 06:41:26 +00:00
2020-10-03 19:11:50 +00:00
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
2020-10-09 15:18:34 +00:00
mach-nix-default = import ./default.nix {inherit pkgs;};
in rec
2020-10-03 19:11:50 +00:00
{
devShell = import ./shell.nix {
inherit pkgs;
};
packages = flake-utils.lib.flattenTree {
2020-10-09 15:18:34 +00:00
mach-nix = mach-nix-default.mach-nix;
2020-10-12 03:54:19 +00:00
"with" = mach-nix-default.pythonWith;
pythonWith = mach-nix-default.pythonWith;
2020-10-09 15:18:34 +00:00
shellWith = mach-nix-default.shellWith;
2020-10-11 10:47:40 +00:00
dockerImageWith = mach-nix-default.dockerImageWith;
};
2020-07-18 06:41:26 +00:00
defaultPackage = packages.mach-nix;
2020-07-18 06:41:26 +00:00
apps.mach-nix = flake-utils.lib.mkApp { drv = packages.mach-nix.mach-nix; };
defaultApp = { type = "app"; program = "${defaultPackage}/bin/mach-nix"; };
lib = {
mkPython = mach-nix-default.mkPython;
};
2020-10-03 19:11:50 +00:00
}
);
}