···11-From 3b047ab4271919856ae0a3dee3a03a24045c0016 Mon Sep 17 00:00:00 2001
22-From: Paul Meyer <49727155+katexochen@users.noreply.github.com>
33-Date: Mon, 13 Nov 2023 20:24:54 +0000
44-Subject: [PATCH] don't sanatize the environment
55-66----
77- checksec | 3 ---
88- 1 file changed, 3 deletions(-)
99-1010-diff --git a/checksec b/checksec
1111-index 4fc3c31..135223a 100755
1212---- a/checksec
1313-+++ b/checksec
1414-@@ -2,9 +2,6 @@
1515- # Do not edit this file directly, this file is generated from the files
1616- # in the src directory. Any updates to this file will be overwritten when generated
1717-1818--# sanitize the environment before run
1919--[[ "$(env | /bin/sed -r -e '/^(PWD|SHLVL|_)=/d')" ]] && exec -c "$0" "$@"
2020--
2121- # --- Modified Version ---
2222- # Name : checksec.sh
2323- # Version : 1.7.0
2424---
2525-2.42.0
···11+{
22+ lib,
33+ stdenvNoCC,
44+ fetchFromGitHub,
55+ zig_0_13,
66+ nix-update-script,
77+}:
88+99+stdenvNoCC.mkDerivation (finalAttrs: {
1010+ pname = "tuatara";
1111+ version = "1631040452-unstable-2025-04-29";
1212+1313+ src = fetchFromGitHub {
1414+ owner = "q60";
1515+ repo = "tuatara";
1616+ rev = "bc093e5fe1cb8dec667806f1b41c8e4e913368e8";
1717+ hash = "sha256-GLOb2vqDlcCQ3bPXC50t1j+DJFhl8JK117t7uRLrBbk=";
1818+ };
1919+2020+ strictDeps = true;
2121+2222+ nativeBuildInputs = [ zig_0_13.hook ];
2323+2424+ preBuild = ''
2525+ export ZIG_LOCAL_CACHE_DIR=$TMPDIR/zig-cache
2626+ export ZIG_GLOBAL_CACHE_DIR=$TMPDIR/zig-global-cache
2727+ '';
2828+2929+ passthru.updateScript = nix-update-script { };
3030+3131+ meta = {
3232+ description = "Ziggidy *nix system info fetcher";
3333+ longDescription = ''
3434+ tuatara is a ziggidy *nix system info fetcher. WIP. It is
3535+ descendant of disfetch. Although sharing some common concepts
3636+ and principles, they are different.
3737+3838+ The main difference of tuatara from disfetch is that tuatara
3939+ will be highly customizable, while disfetch won't, because it
4040+ covers minimalism and simplicity. Though, they will share some
4141+ other principles regarding showing only needed information,
4242+ being fast and reliable and sharing the same handmade logos with
4343+ the principle of not-more-or-less-than 8 rows.
4444+ '';
4545+ homepage = "https://github.com/q60/tuatara";
4646+ license = lib.licenses.unlicense;
4747+ maintainers = with lib.maintainers; [ yiyu ];
4848+ mainProgram = "tuatara";
4949+ platforms = lib.platforms.all;
5050+ };
5151+})
···11-From e1ee1a2df1ad32de24e8fdaeac0a533681710578 Mon Sep 17 00:00:00 2001
22-From: John Ericson <git@JohnEricson.me>
33-Date: Wed, 18 Aug 2021 01:55:52 -0400
44-Subject: [PATCH 3/3] find_a_program: Only search for prefixed paths in
55- undisambiguated dirs
66-77-This means, we might search for:
88-99-- path/$machine/$version/prog
1010-- path/$machine/prog
1111-- path/$machine-prog
1212-1313-But not
1414-1515-- path/$machine/$version/$machine-prog
1616-1717-because disambiguating $machine twice is unnecessary.
1818-1919-This does mean we less liberal in what we accept than LLVM, but that's
2020-OK. The down side of always Postel's law is everyone converges on
2121-accepting all sorts of garbage, which makes debugging end-to-end hard
2222-when mistakes are not caught early.
2323----
2424- gcc/gcc.cc | 25 ++++++++++++++++---------
2525- 1 file changed, 16 insertions(+), 9 deletions(-)
2626-2727-diff --git a/gcc/gcc.cc b/gcc/gcc.cc
2828-index f9f83d1a804..d837b6ea779 100644
2929---- a/gcc/gcc.cc
3030-+++ b/gcc/gcc.cc
3131-@@ -3097,15 +3097,9 @@ program_at_path (char *path, bool machine_specific, void *data)
3232- struct file_at_path_info *info = (struct file_at_path_info *) data;
3333- size_t path_len = strlen (path);
3434-3535-- for (auto prefix : { just_machine_prefix, "" })
3636-+ auto search = [=](size_t len) -> void *
3737- {
3838-- auto len = path_len;
3939--
4040-- auto prefix_len = strlen(prefix);
4141-- memcpy (path + len, prefix, prefix_len);
4242-- len += prefix_len;
4343--
4444-- memcpy (path + len, info->name, info->name_len);
4545-+ memcpy (path + len, info->name, info->name_len + 1);
4646- len += info->name_len;
4747-4848- /* Some systems have a suffix for executable files.
4949-@@ -3120,9 +3114,22 @@ program_at_path (char *path, bool machine_specific, void *data)
5050- path[len] = '\0';
5151- if (access_check (path, info->mode) == 0)
5252- return path;
5353-+
5454-+ return NULL;
5555-+ };
5656-+
5757-+ /* Additionally search for $target-prog in machine-agnostic dirs, as an
5858-+ additional way to disambiguate targets. Do not do this in machine-specific
5959-+ dirs because so further disambiguation is needed. */
6060-+ if (!machine_specific)
6161-+ {
6262-+ auto prefix_len = strlen(just_machine_prefix);
6363-+ memcpy (path + path_len, just_machine_prefix, prefix_len);
6464-+ auto res = search(path_len + prefix_len);
6565-+ if (res) return res;
6666- }
6767-6868-- return NULL;
6969-+ return search(path_len);
7070- }
7171-7272- /* Specialization of find_a_file for programs that also takes into account
7373---
7474-2.47.2
7575-