-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
49 lines (47 loc) · 1.38 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{
description = "Flake providing odoo-container-runner package and dev shell";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
outputs =
{ self, nixpkgs }:
let
supportedSystems = nixpkgs.lib.platforms.unix;
forEachSupportedSystem =
f:
nixpkgs.lib.genAttrs supportedSystems (
system: f { pkgs = import nixpkgs { inherit system; }; } system
);
outputPackages = forEachSupportedSystem (
{ pkgs }:
_: with pkgs.python3Packages; {
python3Packages.odoo-container-runner = buildPythonPackage {
pname = "odr";
version = "0.1.0";
pyproject = true;
src = ./.;
build-system = [ setuptools ];
pythonImportsCheck = [ "odr" ];
nativeBuildInputs = [ setuptools ];
};
}
);
in
{
packages = outputPackages;
devShells = forEachSupportedSystem (
{ pkgs }:
system: {
default = pkgs.mkShell {
packages = with pkgs; [
nixfmt-rfc-style
python3
python3Packages.black
python3Packages.pip-tools
python3Packages.twine
# outputPackages.${system}.python3Packages.odoo-container-runner
];
buildInputs = [ pkgs.bashInteractive ];
};
}
);
};
}