cross: xdg-utils: build xdg-screensaver, and simplify a bit
This commit is contained in:
parent
9c18aa2765
commit
44c2f8bcc0
|
@ -26,6 +26,11 @@ let
|
|||
// (if title != null then { name = title; } else {})
|
||||
) else null;
|
||||
in [
|
||||
(fetchpatch' {
|
||||
saneCommit = "20c9492d303be7cbad560e3d83bc47ab4b1e93f7";
|
||||
title = "procmail: support cross compilation";
|
||||
hash = "sha256-cC9GBF5tCeJ2GDSjMjlG4hYStIJPEoRBAK9/KhJiiIo=";
|
||||
})
|
||||
(fetchpatch' {
|
||||
# fixes build on moby by avoiding broken `lockfileProgs`
|
||||
prUrl = "https://github.com/NixOS/nixpkgs/pull/286533";
|
||||
|
@ -33,13 +38,6 @@ in [
|
|||
hash = "sha256-IAt07OSGaX8QHaOzlmYFTZJpvmXjYFA6/IFPsMzQVW8=";
|
||||
merged.staging = "202402061152";
|
||||
})
|
||||
(fetchpatch' {
|
||||
# fixes resholve/xdg-utils build on moby
|
||||
# probably not actually necessary (but removing this now will trigger a large rebuild)
|
||||
prUrl = "https://github.com/NixOS/nixpkgs/pull/287755";
|
||||
title = "Remove rebuild-avoiding conditionals in resholve musl fixes";
|
||||
hash = "sha256-hKuwLyw81wiHTuc9EyqEWCt9GvbGYdEfP1OP+KYvYJw=";
|
||||
})
|
||||
(fetchpatch' {
|
||||
prUrl = "https://github.com/NixOS/nixpkgs/pull/280925";
|
||||
title = "j4-dmenu-desktop: pin to gcc12"; # 2024/01/14: fix build
|
||||
|
|
|
@ -2302,16 +2302,11 @@ in with final; {
|
|||
# 2023/07/30: upstreaming is blocked on unar (gnustep), unless i also make that optional
|
||||
xarchiver = mvToNativeInputs [ libxslt ] prev.xarchiver;
|
||||
|
||||
# used by xdg-utils/resholve; can probably be folded or removed entirely, by simply using `buildPackages.resholve`
|
||||
binlore = prev.binlore.override {
|
||||
inherit (buildPackages) yallback yara;
|
||||
};
|
||||
xdg-utils = let
|
||||
buildResholve = buildPackages.resholve.overrideAttrs (resholve': {
|
||||
meta = (resholve'.meta or { }) // { knownVulnerabilities = [ ]; };
|
||||
});
|
||||
in (prev.xdg-utils.override {
|
||||
procmail = emptyDirectory; #< does not cross compile, but only used by xdg-screensaver
|
||||
resholve = buildResholve;
|
||||
}).overrideAttrs (xdg-utils': let
|
||||
patchedResholve = buildResholve.overrideAttrs (resholve': {
|
||||
|
@ -2328,14 +2323,16 @@ in with final; {
|
|||
# '';
|
||||
|
||||
# have to patch all `resholve` invocations AGAIN because even though `buildPackages.resholve` is the right architecture now,
|
||||
preFixup = lib.replaceStrings [
|
||||
"${buildResholve}/bin/resholve --overwrite bin/xdg-screensaver" #< fails to resholve when optional `procmail` dep isn't available
|
||||
"${buildResholve}/bin/resholve"
|
||||
] [
|
||||
"${patchedResholve}/bin/resholve --version"
|
||||
"${patchedResholve}/bin/resholve"
|
||||
]
|
||||
xdg-utils'.preFixup;
|
||||
# the `resholve` passthru args refer to itself, in a way which `overrideAttrs` can't patch.
|
||||
# also, xdg-screensaver resholve fails because `perl -e` is treated differently on native v.s. cross,
|
||||
# so "fake" it as external and then manually patch it (resholve has a better way to do that, but not easily patchable from here).
|
||||
preFixup = (lib.replaceStrings
|
||||
[ "${buildResholve}/bin/resholve" "RESHOLVE_FAKE='external:" ]
|
||||
[ "${patchedResholve}/bin/resholve" "RESHOLVE_FAKE='external:perl;" ]
|
||||
xdg-utils'.preFixup) + ''
|
||||
substituteInPlace $out/bin/xdg-screensaver \
|
||||
--replace-fail ' perl -e' ' ${perl}/bin/perl -e'
|
||||
'';
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue