Merge pull request #300247 from K900/revert-294347-etc

Revert #294347 (and #300177)
This commit is contained in:
K900 2024-03-30 17:22:51 +03:00 committed by GitHub
commit 42b1ad936d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 2 additions and 32 deletions

View File

@ -47,10 +47,6 @@ Release branch. Used to specify that a package is not going to receive updates t
The packages homepage. Example: `https://www.gnu.org/software/hello/manual/`
### `repository` {#var-meta-repository}
A webpage where the package's source code can be viewed. `https` links are preferred if available. Automatically set to a default value if the package uses a `fetchFrom*` fetcher for its `src`. Example: `https://github.com/forthy42/gforth`
### `downloadPage` {#var-meta-downloadPage}
The page where a link to the current version can be found. Example: `https://ftp.gnu.org/gnu/hello/`

View File

@ -71,8 +71,7 @@ in
if version == "8.11.0+0.11.1" then version
else builtins.replaceStrings [ "+" ] [ "." ] version
}.tbz";
# abort/syntax error will fail package set eval, but throw is "fine"
sha256 = release."${version}".sha256 or (throw "Unknown version '${version}'");
sha256 = release."${version}".sha256;
};
patches =

View File

@ -10,9 +10,7 @@ let
concatMapStrings
concatMapStringsSep
concatStrings
filter
findFirst
head
isDerivation
length
concatMap
@ -306,10 +304,6 @@ let
str
];
downloadPage = str;
repository = union [
(listOf str)
str
];
changelog = union [
(listOf str)
str
@ -446,18 +440,6 @@ let
# -----
else { valid = "yes"; });
getRepository = let
getSrcs = attrs:
if attrs ? src
then
[ attrs.src ]
else
filter (src: src ? meta.homepage) attrs.srcs;
getHomePages = map (src: src.meta.homepage);
unlist = list:
if length list == 1 then head list
else list;
in attrs: unlist (getHomePages (getSrcs attrs));
# The meta attribute is passed in the resulting attribute set,
# but it's not part of the actual derivation, i.e., it's not
@ -471,14 +453,7 @@ let
outputs = attrs.outputs or [ "out" ];
hasOutput = out: builtins.elem out outputs;
in
optionalAttrs (attrs ? src.meta.homepage || attrs ? srcs && isList attrs.srcs && any (src: src ? meta.homepage) attrs.srcs) {
# should point to an http-browsable source tree, if available.
# fetchers like fetchFromGitHub set it automatically.
# this could be handled a lot easier if we nulled it instead
# of having it be undefined, but that wouldn't match the
# other attributes.
repository = getRepository attrs;
} // {
{
# `name` derivation attribute includes cross-compilation cruft,
# is under assert, and is sanitized.
# Let's have a clean always accessible version here.