uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
62
pkgs/tools/networking/djbdns/default.nix
Normal file
62
pkgs/tools/networking/djbdns/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv, fetchurl, glibc, dns-root-data, nixosTests } :
|
||||
|
||||
let
|
||||
version = "1.05";
|
||||
|
||||
manSrc = fetchurl {
|
||||
url = "http://smarden.org/pape/djb/manpages/djbdns-${version}-man-20031023.tar.gz";
|
||||
sha256 = "0sg51gjy6j1hnrra406q1qhf5kvk1m00y8qqhs6r0a699gqmh75s";
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "djbdns";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://cr.yp.to/djbdns/djbdns-${version}.tar.gz";
|
||||
sha256 = "0j3baf92vkczr5fxww7rp1b7gmczxmmgrqc8w2dy7kgk09m85k9w";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./hier.patch
|
||||
./fix-nix-usernamespace-build.patch
|
||||
|
||||
# To fix https://github.com/NixOS/nixpkgs/issues/119066.
|
||||
# Note that the NixOS test <nixpkgs/nixos/tests/tinydns.nix> tests for this.
|
||||
./softlimit.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
echo gcc -O2 -include ${glibc.dev}/include/errno.h > conf-cc
|
||||
echo $out > conf-home
|
||||
# djbdns ships with an outdated list of root servers
|
||||
awk '/^.?.ROOT-SERVERS.NET/ { print $4 }' ${dns-root-data}/root.hints > dnsroots.global
|
||||
sed -i "s|/etc/dnsroots.global|$out/etc/dnsroots.global|" dnscache-conf.c
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -pv $out/etc;
|
||||
make setup
|
||||
cd $out;
|
||||
tar xzvf ${manSrc};
|
||||
for n in 1 5 8; do
|
||||
mkdir -p man/man$n;
|
||||
mv -iv djbdns-man/*.$n man/man$n;
|
||||
done;
|
||||
rm -rv djbdns-man;
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
tinydns = nixosTests.tinydns;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A collection of Domain Name System tools";
|
||||
longDescription = "Includes software for all the fundamental DNS operations: DNS cache: finding addresses of Internet hosts; DNS server: publishing addresses of Internet hosts; and DNS client: talking to a DNS cache.";
|
||||
homepage = "https://cr.yp.to/djbdns.html";
|
||||
license = licenses.publicDomain;
|
||||
maintainers = with maintainers; [ jerith666 ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
--- djbdns-1.05.org/chkshsgr.c 2001-02-11 21:11:45.000000000 +0000
|
||||
+++ djbdns-1.05/chkshsgr.c 2017-10-13 10:06:09.392578927 +0100
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
int main()
|
||||
{
|
||||
+ return 0;
|
||||
short x[4];
|
||||
|
||||
x[0] = x[1] = 0;
|
||||
15
pkgs/tools/networking/djbdns/hier.patch
Normal file
15
pkgs/tools/networking/djbdns/hier.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- a/hier.c 2016-04-19 21:22:21.992192405 -0400
|
||||
+++ b/hier.c 2016-04-19 21:22:33.160229778 -0400
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
void hier()
|
||||
{
|
||||
- c("/","etc","dnsroots.global",-1,-1,0644);
|
||||
+ c(auto_home,"etc","dnsroots.global",-1,-1,0644);
|
||||
|
||||
- h(auto_home,-1,-1,02755);
|
||||
- d(auto_home,"bin",-1,-1,02755);
|
||||
+ h(auto_home,-1,-1,0755);
|
||||
+ d(auto_home,"bin",-1,-1,0755);
|
||||
|
||||
c(auto_home,"bin","dnscache-conf",-1,-1,0755);
|
||||
12
pkgs/tools/networking/djbdns/softlimit.patch
Normal file
12
pkgs/tools/networking/djbdns/softlimit.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -Naur a/tinydns-conf.c b/tinydns-conf.c
|
||||
--- a/tinydns-conf.c 2001-02-11 21:11:45.000000000 +0000
|
||||
+++ b/tinydns-conf.c 2021-11-08 17:23:06.181385437 +0000
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
start("run");
|
||||
outs("#!/bin/sh\nexec 2>&1\nexec envuidgid "); outs(user);
|
||||
- outs(" envdir ./env softlimit -d300000 ");
|
||||
+ outs(" envdir ./env softlimit -d4500000 ");
|
||||
outs(auto_home); outs("/bin/tinydns\n");
|
||||
finish();
|
||||
perm(0755);
|
||||
Loading…
Add table
Add a link
Reference in a new issue