chore(*): drop everything that is not required for Tvix

Co-Authored-By: edef <edef@edef.eu>
Co-Authored-By: Ryan Lahfa <raito@lix.systems>
Change-Id: I9817214c3122e49d694c5e41818622a08d9dfe45
This commit is contained in:
Florian Klink 2025-01-05 17:12:30 +01:00
parent bd91cac1f3
commit df4500ea2b
2905 changed files with 34 additions and 493328 deletions

View file

@ -1,12 +0,0 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "depot-scan" ''
set -euo pipefail
path="''${1:-$(git rev-parse --show-prefix)}"
path="''${path%%/}"
attr="''${path//\//.}"
root="$(git rev-parse --show-toplevel)"
echo "scanning //$path" >&2
nix-instantiate -E "import ${./wrap.nix} $root" -A "$attr" -vv 2> >(${pkgs.perl}/bin/perl ${./depot-scan.pl}) >&2
''

View file

@ -1,11 +0,0 @@
#! /usr/bin/env -S perl -ln
use strict;
if (/^evaluating file '(.*)'$/ or
/^copied source '(.*)' -> '.*'$/ or
/^trace: depot-scan '(.*)'$/) {
print $1;
next;
}
print STDERR unless /^instantiated '.*' -> '.*'$/;

View file

@ -1,16 +0,0 @@
# this wraps import to override readFile and readDir to trace the files it touches
# technique inspired by lorri
let
global = {
import = global.scopedImport { };
scopedImport = x: builtins.scopedImport (global // x);
builtins = builtins // {
inherit (global) import scopedImport;
readFile = path: builtins.trace "depot-scan '${toString path}'" (builtins.readFile path);
readDir = path: builtins.trace "depot-scan '${toString path}'" (builtins.readDir path);
};
};
in
global.import