mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-19 20:09:01 +02:00
Revert "stdenv: add meta.repository field"
This reverts commit 7e1443abbb
.
This commit is contained in:
parent
0e8bcaa661
commit
59bccda153
|
@ -47,10 +47,6 @@ Release branch. Used to specify that a package is not going to receive updates t
|
||||||
|
|
||||||
The package’s homepage. Example: `https://www.gnu.org/software/hello/manual/`
|
The package’s 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}
|
### `downloadPage` {#var-meta-downloadPage}
|
||||||
|
|
||||||
The page where a link to the current version can be found. Example: `https://ftp.gnu.org/gnu/hello/`
|
The page where a link to the current version can be found. Example: `https://ftp.gnu.org/gnu/hello/`
|
||||||
|
|
|
@ -71,8 +71,7 @@ in
|
||||||
if version == "8.11.0+0.11.1" then version
|
if version == "8.11.0+0.11.1" then version
|
||||||
else builtins.replaceStrings [ "+" ] [ "." ] version
|
else builtins.replaceStrings [ "+" ] [ "." ] version
|
||||||
}.tbz";
|
}.tbz";
|
||||||
# abort/syntax error will fail package set eval, but throw is "fine"
|
sha256 = release."${version}".sha256;
|
||||||
sha256 = release."${version}".sha256 or (throw "Unknown version '${version}'");
|
|
||||||
};
|
};
|
||||||
|
|
||||||
patches =
|
patches =
|
||||||
|
|
|
@ -304,10 +304,6 @@ let
|
||||||
str
|
str
|
||||||
];
|
];
|
||||||
downloadPage = str;
|
downloadPage = str;
|
||||||
repository = union [
|
|
||||||
(listOf str)
|
|
||||||
str
|
|
||||||
];
|
|
||||||
changelog = union [
|
changelog = union [
|
||||||
(listOf str)
|
(listOf str)
|
||||||
str
|
str
|
||||||
|
@ -457,29 +453,7 @@ let
|
||||||
outputs = attrs.outputs or [ "out" ];
|
outputs = attrs.outputs or [ "out" ];
|
||||||
hasOutput = out: builtins.elem out outputs;
|
hasOutput = out: builtins.elem out outputs;
|
||||||
in
|
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 = let
|
|
||||||
getSrcs = attrs:
|
|
||||||
if attrs ? src
|
|
||||||
then
|
|
||||||
[ attrs.src ]
|
|
||||||
else
|
|
||||||
lib.filter (src: src ? meta.homepage) attrs.srcs;
|
|
||||||
getHomePages = srcs: map (src: src.meta.homepage) srcs;
|
|
||||||
unlist = list:
|
|
||||||
if lib.length list == 1
|
|
||||||
then
|
|
||||||
lib.elemAt list 0
|
|
||||||
else
|
|
||||||
list;
|
|
||||||
in
|
|
||||||
unlist (getHomePages (getSrcs attrs));
|
|
||||||
} // {
|
|
||||||
# `name` derivation attribute includes cross-compilation cruft,
|
# `name` derivation attribute includes cross-compilation cruft,
|
||||||
# is under assert, and is sanitized.
|
# is under assert, and is sanitized.
|
||||||
# Let's have a clean always accessible version here.
|
# Let's have a clean always accessible version here.
|
||||||
|
|
Loading…
Reference in a new issue