2023-05-18 13:57:22 +00:00
|
|
|
{
|
|
|
|
description = "Dev Setup";
|
|
|
|
|
2023-06-05 17:19:43 +00:00
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
inputs.systems.url = "github:nix-systems/default";
|
2023-05-18 13:57:22 +00:00
|
|
|
inputs.pip2nix = {
|
|
|
|
url = "github:nix-community/pip2nix";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-06-05 17:19:43 +00:00
|
|
|
outputs = {nixpkgs, systems, pip2nix, ...}:
|
2023-06-03 17:31:46 +00:00
|
|
|
let
|
2023-06-05 17:19:43 +00:00
|
|
|
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
2023-06-03 17:31:46 +00:00
|
|
|
overlays = [
|
|
|
|
(import ./python-overlay.nix)
|
|
|
|
(import ./overlay.nix)
|
|
|
|
];
|
|
|
|
};
|
2023-06-05 17:19:43 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
packages = eachSystem (system: {
|
2023-06-03 17:31:46 +00:00
|
|
|
devEnv = pkgs.buildEnv {
|
|
|
|
name = "erpnext-nix-dev-env";
|
|
|
|
paths = [
|
|
|
|
pkgs.dasel
|
2023-06-02 14:00:58 +00:00
|
|
|
];
|
2023-05-21 15:55:26 +00:00
|
|
|
};
|
2023-06-03 17:31:46 +00:00
|
|
|
inherit pkgs;
|
|
|
|
run-erpnext = pkgs.run-erpnext;
|
|
|
|
pip2nix = import "${pip2nix}/default.nix" { inherit pkgs; pythonPackages = "python310Packages"; };
|
2023-06-07 19:58:05 +00:00
|
|
|
erpnext = pkgs.python3-erpnext.pkgs.erpnext;
|
|
|
|
bench = pkgs.python3-erpnext.pkgs.bench;
|
|
|
|
pythonPkgs = pkgs.python3-erpnext.pkgs;
|
2023-06-03 17:31:46 +00:00
|
|
|
});
|
|
|
|
nixosConfigurations = {
|
|
|
|
test-vm = nixpkgs.lib.nixosSystem {
|
2023-06-05 17:19:43 +00:00
|
|
|
inherit pkgs;
|
2023-06-03 17:31:46 +00:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [./test-vm/configuration.nix];
|
2023-05-18 13:57:22 +00:00
|
|
|
};
|
2023-06-03 17:31:46 +00:00
|
|
|
};
|
2023-06-05 17:19:43 +00:00
|
|
|
};
|
2023-05-18 13:57:22 +00:00
|
|
|
}
|