-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
72 lines (69 loc) · 2.96 KB
/
Copy pathflake.nix
File metadata and controls
72 lines (69 loc) · 2.96 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
description = "Dummy to mimicate the Google Ads API";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
essentials.url = "path:/mnt/hdmenezess42/GitProjects/flakeEssentials";
};
outputs = {self, nixpkgs, flake-utils, essentials}:
flake-utils.lib.eachDefaultSystem(system:
let
pkgs = import nixpkgs {inherit system; };
baseShell = essentials.devShells.${system}.python;
faker_commerce = pkgs.python313Packages.buildPythonPackage rec {
pname = "faker-commerce";
version = "1.0.4";
pyproject = true;
src = pkgs.fetchPypi {
inherit pname version;
sha256 = "sha256-9T2gQUOrcHVEk/qXwMZPUgjI+PPFAnNRbuPK/Oo3KVM=";
};
build-system = with pkgs.python313Packages; [ setuptools ];
propagatedBuildInputs = with pkgs.python313Packages; [ faker ];
doCheck = false;
};
googleAdsDummy = pkgs.python313Packages.buildPythonPackage {
pname = "googleAdsDummy";
version = "0.1.0";
pyproject = true;
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
let baseName = baseNameOf path;
in !(builtins.elem baseName [ ".direnv" ".git" "htmlcov" "htmlTestsReports" ".pytest_cache" ]);
};
build-system = with pkgs.python313Packages; [ setuptools ];
propagatedBuildInputs = with pkgs.python313Packages; [
faker
faker_commerce
pydantic
pandas
];
doCheck = false;
};
in
{
devShell = pkgs.mkShell {
name = "GoogleAdsDummyAPI";
buildInputs = with pkgs; [
(python313.withPackages (p:
[
p.faker
faker_commerce
p.pydantic
p.pytest
p.pytest-cov
p.pytest-html
p.pandas
p.matplotlib
googleAdsDummy
]))
] ++ baseShell.buildInputs;
dontUsePytestCheck = true;
doCheck = false;
shellHook = ''
echo "GoogleAdsDummy dev environment loaded"
'';
};
});
}