···1-From 3b047ab4271919856ae0a3dee3a03a24045c0016 Mon Sep 17 00:00:00 2001
2-From: Paul Meyer <49727155+katexochen@users.noreply.github.com>
3-Date: Mon, 13 Nov 2023 20:24:54 +0000
4-Subject: [PATCH] don't sanatize the environment
5-6----
7- checksec | 3 ---
8- 1 file changed, 3 deletions(-)
9-10-diff --git a/checksec b/checksec
11-index 4fc3c31..135223a 100755
12---- a/checksec
13-+++ b/checksec
14-@@ -2,9 +2,6 @@
15- # Do not edit this file directly, this file is generated from the files
16- # in the src directory. Any updates to this file will be overwritten when generated
17-18--# sanitize the environment before run
19--[[ "$(env | /bin/sed -r -e '/^(PWD|SHLVL|_)=/d')" ]] && exec -c "$0" "$@"
20--
21- # --- Modified Version ---
22- # Name : checksec.sh
23- # Version : 1.7.0
24---
25-2.42.0
···1+{
2+ lib,
3+ stdenvNoCC,
4+ fetchFromGitHub,
5+ zig_0_13,
6+ nix-update-script,
7+}:
8+9+stdenvNoCC.mkDerivation (finalAttrs: {
10+ pname = "tuatara";
11+ version = "1631040452-unstable-2025-04-29";
12+13+ src = fetchFromGitHub {
14+ owner = "q60";
15+ repo = "tuatara";
16+ rev = "bc093e5fe1cb8dec667806f1b41c8e4e913368e8";
17+ hash = "sha256-GLOb2vqDlcCQ3bPXC50t1j+DJFhl8JK117t7uRLrBbk=";
18+ };
19+20+ strictDeps = true;
21+22+ nativeBuildInputs = [ zig_0_13.hook ];
23+24+ preBuild = ''
25+ export ZIG_LOCAL_CACHE_DIR=$TMPDIR/zig-cache
26+ export ZIG_GLOBAL_CACHE_DIR=$TMPDIR/zig-global-cache
27+ '';
28+29+ passthru.updateScript = nix-update-script { };
30+31+ meta = {
32+ description = "Ziggidy *nix system info fetcher";
33+ longDescription = ''
34+ tuatara is a ziggidy *nix system info fetcher. WIP. It is
35+ descendant of disfetch. Although sharing some common concepts
36+ and principles, they are different.
37+38+ The main difference of tuatara from disfetch is that tuatara
39+ will be highly customizable, while disfetch won't, because it
40+ covers minimalism and simplicity. Though, they will share some
41+ other principles regarding showing only needed information,
42+ being fast and reliable and sharing the same handmade logos with
43+ the principle of not-more-or-less-than 8 rows.
44+ '';
45+ homepage = "https://github.com/q60/tuatara";
46+ license = lib.licenses.unlicense;
47+ maintainers = with lib.maintainers; [ yiyu ];
48+ mainProgram = "tuatara";
49+ platforms = lib.platforms.all;
50+ };
51+})
···1-From e1ee1a2df1ad32de24e8fdaeac0a533681710578 Mon Sep 17 00:00:00 2001
2-From: John Ericson <git@JohnEricson.me>
3-Date: Wed, 18 Aug 2021 01:55:52 -0400
4-Subject: [PATCH 3/3] find_a_program: Only search for prefixed paths in
5- undisambiguated dirs
6-7-This means, we might search for:
8-9-- path/$machine/$version/prog
10-- path/$machine/prog
11-- path/$machine-prog
12-13-But not
14-15-- path/$machine/$version/$machine-prog
16-17-because disambiguating $machine twice is unnecessary.
18-19-This does mean we less liberal in what we accept than LLVM, but that's
20-OK. The down side of always Postel's law is everyone converges on
21-accepting all sorts of garbage, which makes debugging end-to-end hard
22-when mistakes are not caught early.
23----
24- gcc/gcc.cc | 25 ++++++++++++++++---------
25- 1 file changed, 16 insertions(+), 9 deletions(-)
26-27-diff --git a/gcc/gcc.cc b/gcc/gcc.cc
28-index f9f83d1a804..d837b6ea779 100644
29---- a/gcc/gcc.cc
30-+++ b/gcc/gcc.cc
31-@@ -3097,15 +3097,9 @@ program_at_path (char *path, bool machine_specific, void *data)
32- struct file_at_path_info *info = (struct file_at_path_info *) data;
33- size_t path_len = strlen (path);
34-35-- for (auto prefix : { just_machine_prefix, "" })
36-+ auto search = [=](size_t len) -> void *
37- {
38-- auto len = path_len;
39--
40-- auto prefix_len = strlen(prefix);
41-- memcpy (path + len, prefix, prefix_len);
42-- len += prefix_len;
43--
44-- memcpy (path + len, info->name, info->name_len);
45-+ memcpy (path + len, info->name, info->name_len + 1);
46- len += info->name_len;
47-48- /* Some systems have a suffix for executable files.
49-@@ -3120,9 +3114,22 @@ program_at_path (char *path, bool machine_specific, void *data)
50- path[len] = '\0';
51- if (access_check (path, info->mode) == 0)
52- return path;
53-+
54-+ return NULL;
55-+ };
56-+
57-+ /* Additionally search for $target-prog in machine-agnostic dirs, as an
58-+ additional way to disambiguate targets. Do not do this in machine-specific
59-+ dirs because so further disambiguation is needed. */
60-+ if (!machine_specific)
61-+ {
62-+ auto prefix_len = strlen(just_machine_prefix);
63-+ memcpy (path + path_len, just_machine_prefix, prefix_len);
64-+ auto res = search(path_len + prefix_len);
65-+ if (res) return res;
66- }
67-68-- return NULL;
69-+ return search(path_len);
70- }
71-72- /* Specialization of find_a_file for programs that also takes into account
73---
74-2.47.2
75-