erpnext-nix/flake.nix

44 lines
1.2 KiB
Nix

{
description = "Dev Setup";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.pip2nix = {
url = "github:nix-community/pip2nix";
flake = false;
};
outputs = {nixpkgs, flake-utils, pip2nix, ...}:
let
pkgs = system: import nixpkgs {
inherit system;
overlays = [
(import ./python-overlay.nix)
(import ./overlay.nix)
];
};
packages = flake-utils.lib.eachDefaultSystem (system: rec {
devEnv = pkgs.buildEnv {
name = "erpnext-nix-dev-env";
paths = [
pkgs.dasel
];
};
inherit pkgs;
run-erpnext = pkgs.run-erpnext;
pip2nix = import "${pip2nix}/default.nix" { inherit pkgs; pythonPackages = "python310Packages"; };
erpnext = pkgs.python3.pkgs.erpnext;
bench = pkgs.python3.pkgs.bench;
pythonPkgs = pkgs.python3.pkgs;
});
nixosConfigurations = {
test-vm = nixpkgs.lib.nixosSystem {
pkgs = pkgs "x86_64-linux";
system = "x86_64-linux";
modules = [./test-vm/configuration.nix];
};
};
in {inherit packages nixosConfigurations;};
}