···108109 name_ = name;
11000000000000000000000000000000000000000000000000000000111 # Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
112 self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
113 "disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
···149 pythonOutputDistHook
150 ] ++ nativeBuildInputs;
151152- buildInputs = buildInputs ++ pythonPath;
153154- propagatedBuildInputs = propagatedBuildInputs ++ [
155 # we propagate python even for packages transformed with 'toPythonApplication'
156 # this pollutes the PATH but avoids rebuilds
157 # see https://github.com/NixOS/nixpkgs/issues/170887 for more context
158 python
159- ];
160161 inherit strictDeps;
162
···108109 name_ = name;
110111+ validatePythonMatches = attrName: let
112+ isPythonModule = drv:
113+ # all pythonModules have the pythonModule attribute
114+ (drv ? "pythonModule")
115+ # Some pythonModules are turned in to a pythonApplication by setting the field to false
116+ && (!builtins.isBool drv.pythonModule);
117+ isMismatchedPython = drv: drv.pythonModule != python;
118+119+ optionalLocation = let
120+ pos = builtins.unsafeGetAttrPos (if attrs ? "pname" then "pname" else "name") attrs;
121+ in if pos == null then "" else " at ${pos.file}:${toString pos.line}:${toString pos.column}";
122+123+ leftPadName = name: against: let
124+ len = lib.max (lib.stringLength name) (lib.stringLength against);
125+ in lib.strings.fixedWidthString len " " name;
126+127+ throwMismatch = drv: let
128+ myName = "'${namePrefix}${name}'";
129+ theirName = "'${drv.name}'";
130+ in throw ''
131+ Python version mismatch in ${myName}:
132+133+ The Python derivation ${myName} depends on a Python derivation
134+ named ${theirName}, but the two derivations use different versions
135+ of Python:
136+137+ ${leftPadName myName theirName} uses ${python}
138+ ${leftPadName theirName myName} uses ${toString drv.pythonModule}
139+140+ Possible solutions:
141+142+ * If ${theirName} is a Python library, change the reference to ${theirName}
143+ in the ${attrName} of ${myName} to use a ${theirName} built from the same
144+ version of Python
145+146+ * If ${theirName} is used as a tool during the build, move the reference to
147+ ${theirName} in ${myName} from ${attrName} to nativeBuildInputs
148+149+ * If ${theirName} provides executables that are called at run time, pass its
150+ bin path to makeWrapperArgs:
151+152+ makeWrapperArgs = [ "--prefix PATH : ''${lib.makeBinPath [ ${lib.getName drv } ] }" ];
153+154+ ${optionalLocation}
155+ '';
156+157+ checkDrv = drv:
158+ if (isPythonModule drv) && (isMismatchedPython drv)
159+ then throwMismatch drv
160+ else drv;
161+162+ in inputs: builtins.map (checkDrv) inputs;
163+164 # Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
165 self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
166 "disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
···202 pythonOutputDistHook
203 ] ++ nativeBuildInputs;
204205+ buildInputs = validatePythonMatches "buildInputs" (buildInputs ++ pythonPath);
206207+ propagatedBuildInputs = validatePythonMatches "propagatedBuildInputs" (propagatedBuildInputs ++ [
208 # we propagate python even for packages transformed with 'toPythonApplication'
209 # this pollutes the PATH but avoids rebuilds
210 # see https://github.com/NixOS/nixpkgs/issues/170887 for more context
211 python
212+ ]);
213214 inherit strictDeps;
215
···1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, setuptools
5+}:
6+7+#This package is auto-generated. It could totally be possible to generate it from upstream, but seems unecessary
8+buildPythonPackage rec {
9+ pname = "pmdsky-debug-py";
10+ version = "4.0.0";
11+ # SkyTemple specifically require this version. This is used when patching the binary,
12+ # and risk to be a bit problematic if using the latest version, given it doesn’t follow semver.
13+14+ src = fetchFromGitHub {
15+ owner = "SkyTemple";
16+ repo = pname;
17+ rev = version;
18+ sha256 = "sha256-iRiUZoyWAkFGPvRyQRWvI0210Vk2jPS0PSCCCns5yJI=";
19+ };
20+21+ prePatch = "cd src";
22+23+ format = "pyproject";
24+25+ nativeBuildInputs = [ setuptools ];
26+27+ meta = with lib; {
28+ description = "Autogenerated and statically check-able pmdsky-debug symbol definitions for Python";
29+ homepage = "https://github.com/SkyTemple/pmdsky-debug-py";
30+ license = licenses.mit;
31+ maintainers = with maintainers; [ marius851000 ];
32+ };
33+}
···1+{ lib
2+, python3
3+, fetchFromGitHub
4+}:
5+6+python3.pkgs.buildPythonApplication rec {
7+ pname = "apachetomcatscanner";
8+ version = "3.5";
9+ format = "setuptools";
10+11+ src = fetchFromGitHub {
12+ owner = "p0dalirius";
13+ repo = "ApacheTomcatScanner";
14+ rev = "refs/tags/${version}";
15+ hash = "sha256-ChVVXUjm6y71iRs64Kv63oiOG1GSqmx6J0YiGtEI0ao=";
16+ };
17+18+ propagatedBuildInputs = with python3.pkgs; [
19+ requests
20+ sectools
21+ xlsxwriter
22+ ];
23+24+ # Project has no test
25+ doCheck = false;
26+27+ pythonImportsCheck = [
28+ "apachetomcatscanner"
29+ ];
30+31+ meta = with lib; {
32+ description = "Tool to scan for Apache Tomcat server vulnerabilities";
33+ homepage = "https://github.com/p0dalirius/ApacheTomcatScanner";
34+ changelog = "https://github.com/p0dalirius/ApacheTomcatScanner/releases/tag/${version}";
35+ license = with licenses; [ gpl2Only ];
36+ maintainers = with maintainers; [ fab ];
37+ };
38+}
+1
pkgs/top-level/aliases.nix
···1721 weechat-matrix-bridge = throw "'weechat-matrix-bridge' has been renamed to/replaced by 'weechatScripts.weechat-matrix-bridge'"; # Converted to throw 2022-02-22
1722 weighttp = throw "weighttp has been removed: abandoned by upstream"; # Added 2022-04-20
1723 whirlpool-gui = throw "whirlpool-gui has been removed as it depended on an insecure version of Electron"; # added 2022-02-08
01724 wicd = throw "wicd has been removed as it is abandoned"; # Added 2021-09-11
1725 wineFull = throw "'wineFull' has been renamed to/replaced by 'winePackages.full'"; # Converted to throw 2022-02-22
1726 wineMinimal = throw "'wineMinimal' has been renamed to/replaced by 'winePackages.minimal'"; # Converted to throw 2022-02-22
···1721 weechat-matrix-bridge = throw "'weechat-matrix-bridge' has been renamed to/replaced by 'weechatScripts.weechat-matrix-bridge'"; # Converted to throw 2022-02-22
1722 weighttp = throw "weighttp has been removed: abandoned by upstream"; # Added 2022-04-20
1723 whirlpool-gui = throw "whirlpool-gui has been removed as it depended on an insecure version of Electron"; # added 2022-02-08
1724+ wio = throw "wio has been removed from nixpkgs, it was unmaintained and required wlroots_0_14 at the time of removal"; # Added 2023-04-28
1725 wicd = throw "wicd has been removed as it is abandoned"; # Added 2021-09-11
1726 wineFull = throw "'wineFull' has been renamed to/replaced by 'winePackages.full'"; # Converted to throw 2022-02-22
1727 wineMinimal = throw "'wineMinimal' has been renamed to/replaced by 'winePackages.minimal'"; # Converted to throw 2022-02-22