···108108109109 name_ = name;
110110111111+ validatePythonMatches = attrName: let
112112+ isPythonModule = drv:
113113+ # all pythonModules have the pythonModule attribute
114114+ (drv ? "pythonModule")
115115+ # Some pythonModules are turned in to a pythonApplication by setting the field to false
116116+ && (!builtins.isBool drv.pythonModule);
117117+ isMismatchedPython = drv: drv.pythonModule != python;
118118+119119+ optionalLocation = let
120120+ pos = builtins.unsafeGetAttrPos (if attrs ? "pname" then "pname" else "name") attrs;
121121+ in if pos == null then "" else " at ${pos.file}:${toString pos.line}:${toString pos.column}";
122122+123123+ leftPadName = name: against: let
124124+ len = lib.max (lib.stringLength name) (lib.stringLength against);
125125+ in lib.strings.fixedWidthString len " " name;
126126+127127+ throwMismatch = drv: let
128128+ myName = "'${namePrefix}${name}'";
129129+ theirName = "'${drv.name}'";
130130+ in throw ''
131131+ Python version mismatch in ${myName}:
132132+133133+ The Python derivation ${myName} depends on a Python derivation
134134+ named ${theirName}, but the two derivations use different versions
135135+ of Python:
136136+137137+ ${leftPadName myName theirName} uses ${python}
138138+ ${leftPadName theirName myName} uses ${toString drv.pythonModule}
139139+140140+ Possible solutions:
141141+142142+ * If ${theirName} is a Python library, change the reference to ${theirName}
143143+ in the ${attrName} of ${myName} to use a ${theirName} built from the same
144144+ version of Python
145145+146146+ * If ${theirName} is used as a tool during the build, move the reference to
147147+ ${theirName} in ${myName} from ${attrName} to nativeBuildInputs
148148+149149+ * If ${theirName} provides executables that are called at run time, pass its
150150+ bin path to makeWrapperArgs:
151151+152152+ makeWrapperArgs = [ "--prefix PATH : ''${lib.makeBinPath [ ${lib.getName drv } ] }" ];
153153+154154+ ${optionalLocation}
155155+ '';
156156+157157+ checkDrv = drv:
158158+ if (isPythonModule drv) && (isMismatchedPython drv)
159159+ then throwMismatch drv
160160+ else drv;
161161+162162+ in inputs: builtins.map (checkDrv) inputs;
163163+111164 # Keep extra attributes from `attrs`, e.g., `patchPhase', etc.
112165 self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
113166 "disabled" "checkPhase" "checkInputs" "nativeCheckInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
···149202 pythonOutputDistHook
150203 ] ++ nativeBuildInputs;
151204152152- buildInputs = buildInputs ++ pythonPath;
205205+ buildInputs = validatePythonMatches "buildInputs" (buildInputs ++ pythonPath);
153206154154- propagatedBuildInputs = propagatedBuildInputs ++ [
207207+ propagatedBuildInputs = validatePythonMatches "propagatedBuildInputs" (propagatedBuildInputs ++ [
155208 # we propagate python even for packages transformed with 'toPythonApplication'
156209 # this pollutes the PATH but avoids rebuilds
157210 # see https://github.com/NixOS/nixpkgs/issues/170887 for more context
158211 python
159159- ];
212212+ ]);
160213161214 inherit strictDeps;
162215
···11+{ lib
22+, buildPythonPackage
33+, fetchFromGitHub
44+, setuptools
55+}:
66+77+#This package is auto-generated. It could totally be possible to generate it from upstream, but seems unecessary
88+buildPythonPackage rec {
99+ pname = "pmdsky-debug-py";
1010+ version = "4.0.0";
1111+ # SkyTemple specifically require this version. This is used when patching the binary,
1212+ # and risk to be a bit problematic if using the latest version, given it doesn’t follow semver.
1313+1414+ src = fetchFromGitHub {
1515+ owner = "SkyTemple";
1616+ repo = pname;
1717+ rev = version;
1818+ sha256 = "sha256-iRiUZoyWAkFGPvRyQRWvI0210Vk2jPS0PSCCCns5yJI=";
1919+ };
2020+2121+ prePatch = "cd src";
2222+2323+ format = "pyproject";
2424+2525+ nativeBuildInputs = [ setuptools ];
2626+2727+ meta = with lib; {
2828+ description = "Autogenerated and statically check-able pmdsky-debug symbol definitions for Python";
2929+ homepage = "https://github.com/SkyTemple/pmdsky-debug-py";
3030+ license = licenses.mit;
3131+ maintainers = with maintainers; [ marius851000 ];
3232+ };
3333+}
···11+{ lib
22+, python3
33+, fetchFromGitHub
44+}:
55+66+python3.pkgs.buildPythonApplication rec {
77+ pname = "apachetomcatscanner";
88+ version = "3.5";
99+ format = "setuptools";
1010+1111+ src = fetchFromGitHub {
1212+ owner = "p0dalirius";
1313+ repo = "ApacheTomcatScanner";
1414+ rev = "refs/tags/${version}";
1515+ hash = "sha256-ChVVXUjm6y71iRs64Kv63oiOG1GSqmx6J0YiGtEI0ao=";
1616+ };
1717+1818+ propagatedBuildInputs = with python3.pkgs; [
1919+ requests
2020+ sectools
2121+ xlsxwriter
2222+ ];
2323+2424+ # Project has no test
2525+ doCheck = false;
2626+2727+ pythonImportsCheck = [
2828+ "apachetomcatscanner"
2929+ ];
3030+3131+ meta = with lib; {
3232+ description = "Tool to scan for Apache Tomcat server vulnerabilities";
3333+ homepage = "https://github.com/p0dalirius/ApacheTomcatScanner";
3434+ changelog = "https://github.com/p0dalirius/ApacheTomcatScanner/releases/tag/${version}";
3535+ license = with licenses; [ gpl2Only ];
3636+ maintainers = with maintainers; [ fab ];
3737+ };
3838+}
+1
pkgs/top-level/aliases.nix
···17211721 weechat-matrix-bridge = throw "'weechat-matrix-bridge' has been renamed to/replaced by 'weechatScripts.weechat-matrix-bridge'"; # Converted to throw 2022-02-22
17221722 weighttp = throw "weighttp has been removed: abandoned by upstream"; # Added 2022-04-20
17231723 whirlpool-gui = throw "whirlpool-gui has been removed as it depended on an insecure version of Electron"; # added 2022-02-08
17241724+ 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
17241725 wicd = throw "wicd has been removed as it is abandoned"; # Added 2021-09-11
17251726 wineFull = throw "'wineFull' has been renamed to/replaced by 'winePackages.full'"; # Converted to throw 2022-02-22
17261727 wineMinimal = throw "'wineMinimal' has been renamed to/replaced by 'winePackages.minimal'"; # Converted to throw 2022-02-22