-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gnupatch: 2.7.6 -> 2.7.6-unstable-2024-08-25 #337961
base: staging
Are you sure you want to change the base?
Changes from all commits
fe29922
f9ec0cf
83d9424
fdfca6b
6be2026
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
preConfigurePhases+=(gnulibBootstrapPhase) | ||
|
||
gnulibBootstrapPhase() { | ||
runHook preGnulibBootstrap | ||
|
||
local -a flagsArray=() | ||
concatTo flagsArray gnulibBootstrapFlags | ||
|
||
# For Gnulib’s build-aux/git-version-gen. | ||
if [[ -z ${gnulibBootstrapDontWriteTarballVersion-} && -n ${version-} ]]; then | ||
printf %s "$version" >.tarball-version | ||
fi | ||
|
||
cp @gnulib@/build-aux/bootstrap . | ||
GNULIB_SRCDIR=@gnulib@ sh bootstrap \ | ||
--bootstrap-sync --no-git --gen \ | ||
"${flagsArray[@]}" | ||
|
||
runHook postGnulibBootstrap | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
testers, | ||
fetchFromSavannah, | ||
unstableGitUpdater, | ||
gnulibBootstrapHook, | ||
bison, | ||
ed, | ||
}: | ||
let | ||
canExecute = stdenv.buildPlatform.canExecute stdenv.hostPlatform; | ||
in | ||
stdenv.mkDerivation (finalAttrs: { | ||
pname = "patch"; | ||
version = "2.7.6-unstable-2024-08-25"; | ||
|
||
# This used to be fetchurl from GNU mirror, but mirrors don’t have Git | ||
# snapshots and GNU patch had no releases in almost a decade. | ||
# fetchurl { url = "mirror://gnu/patch/patch-${version}.tar.xz"; hash = ""; }; | ||
src = fetchFromSavannah { | ||
repo = "patch"; | ||
rev = "abf6fb176bcd95e72ffb3ff85e6132d18cd77e75"; | ||
hash = "sha256-eqYTvBjjFsxe2WOeFgFMKpVWFYDiyigzc4gTdhFQrfg="; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
gnulibBootstrapHook | ||
bison | ||
]; | ||
|
||
nativeCheckInputs = [ ed ]; | ||
|
||
doCheck = canExecute; | ||
|
||
passthru.tests = lib.optionalAttrs canExecute { | ||
version = testers.testVersion { package = finalAttrs.finalPackage; }; | ||
}; | ||
|
||
# nix develop --file maintainers/scripts/update.nix --argstr package gnupatch2 | ||
passthru.updateScript = unstableGitUpdater { | ||
url = "https://git.savannah.gnu.org/git/patch.git"; | ||
tagPrefix = "v"; | ||
}; | ||
|
||
meta = { | ||
description = "GNU Patch, a program to apply differences to files"; | ||
mainProgram = "patch"; | ||
|
||
longDescription = '' | ||
GNU Patch takes a patch file containing a difference listing | ||
produced by the diff program and applies those differences to one or | ||
more original files, producing patched versions. | ||
''; | ||
|
||
homepage = "https://savannah.gnu.org/projects/patch"; | ||
|
||
license = lib.licenses.gpl3Plus; | ||
|
||
maintainers = [ ]; | ||
platforms = lib.platforms.all; | ||
}; | ||
}) |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can merge this separate from this PR, and since it's a version bump, I'd prefer that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we? I thought the change to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’m not really sure if gnulib even uses/needs python3, i.e. by default gnulib-tool does a PATH lookup before using Python implementation (unless https://github.com/coreutils/gnulib/blob/6e95321249ae6986c3df764a6e539f8b5be13948/gnulib-tool#L161 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -146,8 +146,11 @@ let | |
isFromBootstrapFiles = true; | ||
}; | ||
|
||
getLibc = stage: stage.${localSystem.libc}; | ||
fetchurlBoot = import ../../build-support/fetchurl/boot.nix { | ||
inherit system; | ||
}; | ||
|
||
getLibc = stage: stage.${localSystem.libc}; | ||
|
||
# This function builds the various standard environments used during | ||
# the bootstrap. In all stages, we build an stdenv and the package | ||
|
@@ -173,9 +176,7 @@ let | |
shell = "${bootstrapTools}/bin/bash"; | ||
initialPath = [bootstrapTools]; | ||
|
||
fetchurlBoot = import ../../build-support/fetchurl/boot.nix { | ||
inherit system; | ||
}; | ||
inherit fetchurlBoot; | ||
|
||
cc = if prevStage.gcc-unwrapped == null | ||
then null | ||
|
@@ -202,7 +203,7 @@ let | |
''; | ||
}); | ||
|
||
overrides = self: super: (overrides self super) // { fetchurl = thisStdenv.fetchurlBoot; }; | ||
inherit overrides; | ||
}; | ||
|
||
in { | ||
|
@@ -268,6 +269,7 @@ in | |
}; | ||
coreutils = bootstrapTools; | ||
gnugrep = bootstrapTools; | ||
fetchurl = fetchurlBoot; | ||
}; | ||
}) | ||
|
||
|
@@ -309,6 +311,8 @@ in | |
# won't be included in the final stdenv and won't be exported to | ||
# top-level pkgs as an override either. | ||
perl = super.perl.override { enableThreading = false; enableCrypt = false; }; | ||
|
||
fetchurl = fetchurlBoot; | ||
}; | ||
|
||
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64. | ||
|
@@ -397,6 +401,8 @@ in | |
find $lib/lib/ -name \*.so\* -exec patchelf --shrink-rpath {} \; || true | ||
''; | ||
}); | ||
|
||
fetchurl = fetchurlBoot; | ||
}; | ||
|
||
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64. | ||
|
@@ -481,6 +487,7 @@ in | |
NIX_CFLAGS_COMPILE = (previousAttrs.NIX_CFLAGS_COMPILE or "") + " -static-libstdc++"; | ||
}); | ||
|
||
fetchurl = fetchurlBoot; | ||
}; | ||
|
||
# `gettext` comes with obsolete config.sub/config.guess that don't recognize LoongArch64. | ||
|
@@ -522,6 +529,7 @@ in | |
# so we can add them to allowedRequisites below | ||
passthru = a.passthru // { inherit (self) gmp mpfr libmpc isl; }; | ||
}); | ||
fetchurl = fetchurlBoot; | ||
}; | ||
extraNativeBuildInputs = [ | ||
prevStage.patchelf | ||
|
@@ -601,6 +609,7 @@ in | |
assert isBuiltByNixpkgsCompiler prevStage.patchelf; | ||
{ | ||
inherit config overlays; | ||
|
||
stdenv = import ../generic rec { | ||
name = "stdenv-linux"; | ||
|
||
|
@@ -624,7 +633,7 @@ in | |
|
||
shell = cc.shell; | ||
|
||
inherit (prevStage.stdenv) fetchurlBoot; | ||
inherit fetchurlBoot; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did this need to change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No reason in particular, it was easier to remove all fetchurl/fetchurlBoot instances in stdenv/linux and rewrite it from scratch to when working on this PR, and I haven’t minimized the diff yet because some commits should be split into separate PRs (e.g. openssl stuff). |
||
|
||
extraAttrs = { | ||
inherit bootstrapTools; | ||
|
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can merge this separate from this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was planning to do this 👍