2023-03-03 23:20:59 +01:00
|
|
|
final: prev:
|
2023-03-17 12:49:30 +01:00
|
|
|
let
|
|
|
|
extraPkgs = import ./pkgs/default.nix { inherit (final) callPackage; };
|
|
|
|
inherit (final) fetchpatch;
|
2023-03-25 00:43:13 +01:00
|
|
|
lua_no_readline = prev.lua5_3.overrideAttrs(o: {
|
2023-03-22 20:28:34 +01:00
|
|
|
name = "lua-tty";
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray+=(PLAT="posix" SYSLIBS="-Wl,-E -ldl" CFLAGS="-O2 -fPIC -DLUA_USE_POSIX -DLUA_USE_DLOPEN")
|
|
|
|
'';
|
|
|
|
|
|
|
|
makeFlags =
|
|
|
|
builtins.filter (x: (builtins.match "(PLAT|MYLIBS).*" x) == null)
|
|
|
|
o.makeFlags;
|
|
|
|
});
|
2023-03-03 23:20:59 +01:00
|
|
|
in
|
|
|
|
extraPkgs // {
|
2023-04-01 00:42:13 +02:00
|
|
|
mtdutils = prev.mtdutils.overrideAttrs(o: {
|
|
|
|
patches = (if o ? patches then o.patches else []) ++ [
|
|
|
|
./pkgs/mtdutils/0001-mkfs.jffs2-add-graft-option.patch
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
2023-04-10 21:04:23 +02:00
|
|
|
rsyncSmall = prev.rsync.overrideAttrs(o: {
|
|
|
|
configureFlags = o.configureFlags ++ [
|
|
|
|
"--disable-openssl"
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
2023-04-19 00:57:15 +02:00
|
|
|
ntp = prev.ntp.overrideAttrs(o: {
|
|
|
|
outputs = [
|
|
|
|
"out"
|
|
|
|
"man"
|
|
|
|
"perllib"
|
|
|
|
"doc"
|
|
|
|
];
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $perllib
|
|
|
|
moveToOutput "share/ntp" $perllib
|
|
|
|
'';
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2022-09-22 00:01:21 +02:00
|
|
|
strace = prev.strace.override { libunwind = null; };
|
2022-09-26 16:59:21 +02:00
|
|
|
|
2023-03-24 21:51:46 +01:00
|
|
|
kexec-tools-static = prev.kexec-tools.overrideAttrs(o: {
|
2023-03-24 18:12:19 +01:00
|
|
|
# For kexecboot we copy kexec into a ramdisk on the system being
|
|
|
|
# upgraded from. This is more likely to work if kexec is
|
|
|
|
# statically linked so doesn't have dependencies on store paths that
|
|
|
|
# may not exist on that machine. (We can't nix-copy-closure as
|
|
|
|
# the store may not be on a writable filesystem)
|
|
|
|
LDFLAGS = "-static";
|
|
|
|
|
2023-03-19 10:49:32 +01:00
|
|
|
patches = o.patches ++ [
|
|
|
|
(fetchpatch {
|
|
|
|
# merge user command line options into DTB chosen
|
|
|
|
url = "https://patch-diff.githubusercontent.com/raw/horms/kexec-tools/pull/3.patch";
|
|
|
|
hash = "sha256-MvlJhuex9dlawwNZJ1sJ33YPWn1/q4uKotqkC/4d2tk=";
|
|
|
|
})
|
|
|
|
pkgs/kexec-map-file.patch
|
|
|
|
];
|
|
|
|
});
|
|
|
|
|
2023-03-25 00:43:13 +01:00
|
|
|
luaSmall = let s = lua_no_readline.override { self = s; }; in s;
|
2023-03-22 20:28:34 +01:00
|
|
|
|
2023-03-06 18:49:11 +01:00
|
|
|
s6 = prev.s6.overrideAttrs(o:
|
2023-03-17 12:49:30 +01:00
|
|
|
let patch = fetchpatch {
|
2023-03-05 00:08:25 +01:00
|
|
|
# add "p" directive in s6-log
|
|
|
|
url = "https://github.com/skarnet/s6/commit/ddc76841398dfd5e18b22943727ad74b880236d3.patch";
|
|
|
|
hash = "sha256-fBtUinBdp5GqoxgF6fcR44Tu8hakxs/rOShhuZOgokc=";
|
2023-03-06 18:49:11 +01:00
|
|
|
};
|
|
|
|
patch_needed = builtins.compareVersions o.version "2.11.1.2" <= 0;
|
|
|
|
in {
|
|
|
|
patches =
|
|
|
|
(if o ? patches then o.patches else []) ++
|
|
|
|
(if patch_needed then [ patch ] else []);
|
|
|
|
});
|
2023-03-06 18:49:59 +01:00
|
|
|
|
|
|
|
nftables = prev.nftables.overrideAttrs(o: {
|
|
|
|
configureFlags = [
|
|
|
|
"--disable-debug"
|
|
|
|
"--disable-python"
|
|
|
|
"--with-mini-gmp"
|
|
|
|
"--without-cli"
|
|
|
|
];
|
2023-03-05 00:08:25 +01:00
|
|
|
});
|
|
|
|
|
2022-10-08 21:05:17 +02:00
|
|
|
dnsmasq =
|
|
|
|
let d = prev.dnsmasq.overrideAttrs(o: {
|
|
|
|
preBuild = ''
|
|
|
|
makeFlagsArray=("COPTS=")
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
in d.override {
|
2023-03-03 23:20:59 +01:00
|
|
|
dbusSupport = false;
|
|
|
|
nettle = null;
|
|
|
|
};
|
2023-02-22 19:41:41 +01:00
|
|
|
|
2023-03-06 18:49:59 +01:00
|
|
|
hostapd = prev.hostapd.override { sqlite = null; };
|
|
|
|
|
2023-03-04 01:39:54 +01:00
|
|
|
dropbear = prev.dropbear.overrideAttrs (o: {
|
|
|
|
postPatch = ''
|
|
|
|
(echo '#define DSS_PRIV_FILENAME "/run/dropbear/dropbear_dss_host_key"'
|
|
|
|
echo '#define RSA_PRIV_FILENAME "/run/dropbear/dropbear_rsa_host_key"'
|
|
|
|
echo '#define ECDSA_PRIV_FILENAME "/run/dropbear/dropbear_ecdsa_host_key"'
|
|
|
|
echo '#define ED25519_PRIV_FILENAME "/run/dropbear/dropbear_ed25519_host_key"') > localoptions.h
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
|
2023-02-17 01:09:02 +01:00
|
|
|
pppBuild = prev.ppp;
|
2022-09-25 12:54:31 +02:00
|
|
|
ppp =
|
|
|
|
(prev.ppp.override {
|
|
|
|
libpcap = null;
|
|
|
|
}).overrideAttrs (o : {
|
|
|
|
stripAllList = [ "bin" ];
|
|
|
|
buildInputs = [];
|
|
|
|
|
|
|
|
# patches =
|
|
|
|
# o.patches ++
|
|
|
|
# [(final.fetchpatch {
|
|
|
|
# name = "ipv6-script-options.patch";
|
|
|
|
# url = "https://github.com/ppp-project/ppp/commit/874c2a4a9684bf6938643c7fa5ff1dd1cf80aea4.patch";
|
|
|
|
# sha256 = "sha256-K46CKpDpm1ouj6jFtDs9IUMHzlRMRP+rMPbMovLy3o4=";
|
|
|
|
# })];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i -e 's@_PATH_VARRUN@"/run/"@' pppd/main.c
|
|
|
|
sed -i -e 's@^FILTER=y@# FILTER unset@' pppd/Makefile.linux
|
|
|
|
sed -i -e 's/-DIPX_CHANGE/-UIPX_CHANGE/g' pppd/Makefile.linux
|
|
|
|
'';
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
make -C pppd CC=$CC USE_TDB= HAVE_MULTILINK= USE_EAPTLS= USE_CRYPT=y
|
|
|
|
make -C pppd/plugins/pppoe CC=$CC
|
|
|
|
make -C pppd/plugins/pppol2tp CC=$CC
|
|
|
|
runHook postBuild;
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/bin $out/lib/pppd/2.4.9
|
|
|
|
cp pppd/pppd pppd/plugins/pppoe/pppoe-discovery $out/bin
|
|
|
|
cp pppd/plugins/pppoe/pppoe.so $out/lib/pppd/2.4.9
|
|
|
|
cp pppd/plugins/pppol2tp/{open,pppo}l2tp.so $out/lib/pppd/2.4.9
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
postFixup = "";
|
|
|
|
});
|
2022-09-20 00:51:38 +02:00
|
|
|
}
|