forked from Pylons/pyramid_openapi3
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
145 lines (139 loc) · 4.72 KB
/
shell.nix
File metadata and controls
145 lines (139 loc) · 4.72 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
let
nixpkgs = builtins.fetchTarball {
# https://github.com/NixOS/nixpkgs/tree/nixos-22.11 on 2022-11-29
url = "https://github.com/nixos/nixpkgs/archive/ce5fe99df1f15a09a91a86be9738d68fadfbad82.tar.gz";
sha256 = "1zqyq7v1gxrg2b7zizf4npask4vqbs4s7khwffxafgm20gxngb6a";
};
poetry2nixsrc = builtins.fetchTarball {
# https://github.com/nix-community/poetry2nix/commits/master on 2022-11-29
url = "https://github.com/nix-community/poetry2nix/archive/ce8425ccc2884c1065927a38d1700024f431cf0f.tar.gz";
sha256 = "07x48abw18qfxdmsz8hdd762vj8n5l2syh9xm40v851bhidbjswc";
};
# Fix for installing PasteDeploy from https://github.com/nix-community/poetry2nix/issues/750
preDefaults = self: super: {
# Unset pastedeploy/PasteDeploy and rename to pastedeploy_ to avoid infinite recursion
# then in postDefaults we set `pastedeploy_` back to `pastedeploy`
pastedeploy = null;
PasteDeploy = null;
pastedeploy_ = super.pastedeploy;
};
postDefaults = self: super: {
# Avoid infinite recursion
pastedeploy = super.pastedeploy_;
};
pkgs = import nixpkgs { };
poetry2nix = import poetry2nixsrc {
inherit pkgs;
inherit (pkgs) poetry;
};
devEnv = poetry2nix.mkPoetryEnv ({
python = pkgs.python310;
projectDir = ./.;
editablePackageSources = {
pyramid_openapi3 = ./.;
};
overrides = ((poetry2nix.defaultPoetryOverrides.overrideOverlay preDefaults).extend postDefaults).extend (self: super: {
openapi-core = super.openapi-core.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.poetry ];
}
);
pastedeploy = super.pastedeploy.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
pyrepl = super.pyrepl.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
fancycompleter = super.fancycompleter.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
typecov = super.typecov.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
wmctrl = super.wmctrl.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
pdbpp = super.pdbpp.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
types-pytest-lazy-fixture = super.types-pytest-lazy-fixture.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-assertive = super.flake8-assertive.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-builtins = super.flake8-builtins.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-deprecated = super.flake8-deprecated.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-ensure-ascii = super.flake8-ensure-ascii.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-comprehensions = super.flake8-comprehensions.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-mutable = super.flake8-mutable.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-plone-hasattr = super.flake8-plone-hasattr.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-tuple = super.flake8-tuple.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
flake8-super-call = super.flake8-super-call.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.setuptools ];
}
);
autoflake = super.autoflake.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ self.hatchling ];
postInstall = ''
rm -f $out/lib/python3*/site-packages/LICENSE
'';
}
);
});
});
in
pkgs.mkShell {
name = "dev-shell";
buildInputs = with pkgs; [
devEnv
poetry
gitAndTools.pre-commit
];
}