freebsd/{pkgs,patches}: Move patches to version-dependent patches dir
This commit is contained in:
parent
b64a9bb1a9
commit
da9c1825bc
18 changed files with 21 additions and 19 deletions
|
@ -1,6 +1,6 @@
|
|||
{ stdenv, lib, stdenvNoCC
|
||||
, fetchzip
|
||||
, sourceData, versionData, buildFreebsd
|
||||
, sourceData, versionData, buildFreebsd, patchesRoot
|
||||
}:
|
||||
|
||||
self:
|
||||
|
@ -9,7 +9,7 @@ lib.packagesFromDirectoryRecursive {
|
|||
callPackage = self.callPackage;
|
||||
directory = ./pkgs;
|
||||
} // {
|
||||
inherit sourceData versionData;
|
||||
inherit sourceData patchesRoot versionData;
|
||||
|
||||
# Keep the crawled portion of Nixpkgs finite.
|
||||
buildFreebsd = lib.dontRecurseIntoAttrs buildFreebsd;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, mkDerivation
|
||||
{ lib, stdenv, mkDerivation, patchesRoot
|
||||
, bsdSetupHook, freebsdSetupHook
|
||||
, makeMinimal, boot-install
|
||||
, which
|
||||
|
@ -85,8 +85,8 @@ mkDerivation rec {
|
|||
];
|
||||
|
||||
patches = [
|
||||
./compat-install-dirs.patch
|
||||
./compat-fix-typedefs-locations.patch
|
||||
/${patchesRoot}/compat-install-dirs.patch
|
||||
/${patchesRoot}/compat-fix-typedefs-locations.patch
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, mkDerivation
|
||||
{ lib, mkDerivation, patchesRoot
|
||||
, buildPackages
|
||||
, bsdSetupHook, freebsdSetupHook
|
||||
, makeMinimal
|
||||
|
@ -26,7 +26,7 @@ mkDerivation {
|
|||
];
|
||||
|
||||
patches = [
|
||||
./no-perms-BSD.include.dist.patch
|
||||
/${patchesRoot}/no-perms-BSD.include.dist.patch
|
||||
];
|
||||
|
||||
# The makefiles define INCSDIR per subdirectory, so we have to set
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
{ lib, stdenv, mkDerivation
|
||||
, patchesRoot
|
||||
|
||||
, bsdSetupHook, freebsdSetupHook
|
||||
, makeMinimal
|
||||
|
@ -48,13 +49,13 @@ mkDerivation rec {
|
|||
|
||||
patches = [
|
||||
# Hack around broken propogating MAKEFLAGS to submake, just inline logic
|
||||
./libc-msun-arch-subdir.patch
|
||||
/${patchesRoot}/libc-msun-arch-subdir.patch
|
||||
|
||||
# Don't force -lcompiler-rt, we don't actually call it that
|
||||
./libc-no-force--lcompiler-rt.patch
|
||||
/${patchesRoot}/libc-no-force--lcompiler-rt.patch
|
||||
|
||||
# Fix extra include dir to get rpcsvc headers.
|
||||
./librpcsvc-include-subdir.patch
|
||||
/${patchesRoot}/librpcsvc-include-subdir.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ lib, stdenv
|
||||
, mkDerivation
|
||||
, mkDerivation, patchesRoot
|
||||
, bsdSetupHook, freebsdSetupHook, makeMinimal, mandoc, groff
|
||||
, boot-install, install
|
||||
, compatIfNeeded
|
||||
|
@ -15,8 +15,8 @@ mkDerivation {
|
|||
else install)
|
||||
];
|
||||
patches = lib.optionals (!stdenv.hostPlatform.isFreeBSD) [
|
||||
./libnetbsd-do-install.patch
|
||||
#./libnetbsd-define-__va_list.patch
|
||||
/${patchesRoot}/libnetbsd-do-install.patch
|
||||
#/${patchesRoot}/libnetbsd-define-__va_list.patch
|
||||
];
|
||||
makeFlags = [
|
||||
"STRIP=-s" # flag to install, not command
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, mkDerivation, stdenv }:
|
||||
{ lib, mkDerivation, stdenv, patchesRoot }:
|
||||
|
||||
mkDerivation rec {
|
||||
path = "usr.bin/rpcgen";
|
||||
|
@ -12,11 +12,11 @@ mkDerivation rec {
|
|||
# those headers ends up included other headers...which ends up
|
||||
# including the other one, this means by the first time we reach
|
||||
# `#include `<bits/waitflags.h>`, both `_SYS_WAIT_H` and
|
||||
# `_STDLIB_H` are already defined! Thus, we never ned up including
|
||||
# `_STDLIB_H` are already defined! Thus, we never end up including
|
||||
# `<bits/waitflags.h>` and defining `WUNTRACED`.
|
||||
#
|
||||
# This hacks around this by manually including `WUNTRACED` until
|
||||
# the problem is fixed properly in glibc.
|
||||
./rpcgen-glibc-hack.patch
|
||||
/${patchesRoot}/rpcgen-glibc-hack.patch
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ lib, stdenv, mkDerivation, freebsd-lib
|
||||
{ stdenv, mkDerivation, freebsd-lib, patchesRoot
|
||||
, buildPackages
|
||||
, bsdSetupHook, freebsdSetupHook
|
||||
, makeMinimal, install, mandoc, groff
|
||||
|
@ -19,8 +19,8 @@ in rec {
|
|||
];
|
||||
|
||||
patches = [
|
||||
./sys-gnu-date.patch
|
||||
./sys-no-explicit-intrinsics-dep.patch
|
||||
/${patchesRoot}/sys-gnu-date.patch
|
||||
/${patchesRoot}/sys-no-explicit-intrinsics-dep.patch
|
||||
];
|
||||
|
||||
# --dynamic-linker /red/herring is used when building the kernel.
|
||||
|
|
|
@ -33,6 +33,7 @@ let
|
|||
buildFreebsd = otherSplices.selfBuildHost;
|
||||
inherit sourceData;
|
||||
versionData = sourceData.version;
|
||||
patchesRoot = ./patches/${sourceData.version.revision};
|
||||
}
|
||||
// extraArgs
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue