erpnext-nix/flake.nix

75 lines
1.9 KiB
Nix
Raw Normal View History

2023-05-18 13:57:22 +00:00
{
description = "Dev Setup";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2023-06-12 13:28:17 +00:00
inputs.systems.url = "github:nix-systems/default";
2023-05-18 13:57:22 +00:00
2023-06-12 13:28:17 +00:00
inputs.devshell.url = "github:numtide/devshell";
inputs.devshell.inputs.nixpkgs.follows = "nixpkgs";
inputs.devshell.inputs.systems.follows = "systems";
outputs = {self, nixpkgs, systems, devshell }:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
2023-06-12 13:28:17 +00:00
# Nixpkgs instantiated for system types in nix-systems
nixpkgsFor = eachSystem (system:
import nixpkgs {
inherit system;
overlays = [
self.overlays.default
self.overlays.pythonOverlay
devshell.overlays.default
];
}
);
in
{
2023-06-12 13:28:17 +00:00
overlays = {
default = (import ./overlay.nix);
pythonOverlay = (import ./python-overlay.nix);
};
devShells = eachSystem (system:
let
pkgs = nixpkgsFor.${system};
in
{
default = pkgs.devshell.mkShell {
# Add additional packages you'd like to be available in your devshell
# PATH here
devshell.packages = with pkgs; [
];
commands = [
{
help = pkgs.cachix.meta.description;
name = pkgs.cachix.pname;
package = pkgs.cachix;
}
];
2023-06-12 13:28:17 +00:00
bash.extra = ''
'';
2023-05-21 15:55:26 +00:00
};
2023-06-12 13:28:17 +00:00
});
packages = eachSystem (system:
let
pkgs = nixpkgsFor.${system};
in
{
run-erpnext = pkgs.run-erpnext;
2023-06-12 13:28:17 +00:00
erpnext = pkgs.python3.pkgs.erpnext;
bench = pkgs.python3.pkgs.bench;
});
2023-06-12 13:28:17 +00:00
nixosConfigurations =
let
system = "x86_64-linux";
pkgs = nixpkgsFor.${system};
in
{
test-vm = nixpkgs.lib.nixosSystem {
2023-06-12 13:28:17 +00:00
inherit system pkgs;
modules = [./test-vm/configuration.nix];
2023-05-18 13:57:22 +00:00
};
};
};
2023-05-18 13:57:22 +00:00
}