Better build system

This commit is contained in:
Ehmry - 2023-06-07 18:16:07 +01:00
parent 0e60b941cf
commit 022aa84ee0
19 changed files with 68 additions and 16 deletions

3
.envrc
View File

@ -1,2 +1,3 @@
use flake "git+https://gitea.c3d2.de/ehmry/meta?ref=flake"
export NIX_PATH=$PWD/nixexprs
# use nix
PATH_add bin

3
.gitmodules vendored
View File

@ -142,3 +142,6 @@
[submodule "nix_actor"]
path = nix_actor
url = https://git.syndicate-lang.org/ehmry/nix_actor.git
[submodule "new_terminal"]
path = new_terminal
url = https://git.sr.ht/~ehmry/new_terminal

@ -1 +1 @@
Subproject commit 4f6ee8d511aa4670017a030b201a80cce189c9f8
Subproject commit e8ebc723702e64958f1bae1f80c434db5f5a69cf

@ -1 +1 @@
Subproject commit 09a67caef8e3f696f0c9d69816c14975d0042bc5
Subproject commit 0e271609fde50433bb57a707a89ef69e8b90f802

@ -1 +1 @@
Subproject commit ad44d57f252824e73185b50816de9195460b2a5f
Subproject commit 1633a5b24759b2bd03db1863d475ea0e04a99fa9

@ -1 +1 @@
Subproject commit e509316985d2de36981c8d61c85ef1744ec297f1
Subproject commit f83e57ee22364d69af6a44974fc498de014afe89

2
getdns

@ -1 +1 @@
Subproject commit 63c64db979f89be38c74325967a4403273e33835
Subproject commit fedc9a8fab419ae529095f847ad7bf90cc8d1c28

@ -1 +1 @@
Subproject commit 06451baa48e9abc70496134f7abfe6b104c0d3ab
Subproject commit e2d7d98ec3fc4b73a1efbce9e8ad4c0e748f5c26

@ -1 +1 @@
Subproject commit d6ff994c64d02cb57b5b52741bbe02d223720969
Subproject commit 5ac106398c1ba4509a797ff924fa7246dbabe72a

@ -1 +1 @@
Subproject commit 0f697349ccbb885045cf0bf4c908507e2a3b2309
Subproject commit 117aa19ef3dd2b862a70060b981ae543a6fec715

5
shell.nix Normal file
View File

@ -0,0 +1,5 @@
let
pkgs = import <nixpkgs> { };
tup' = pkgs.tup.overrideAttrs
({ patches ? [ ], ... }: { patches = patches ++ [ ./tup.patch ]; });
in pkgs.mkShell { packages = [ pkgs.ccacheWrapper pkgs.tup ]; }

@ -1 +1 @@
Subproject commit 1b766af3f3eba6e5b7a7f5c45e6591e43629dc92
Subproject commit d54fcfb7864179427644c3c708d00d79ae6b68aa

@ -1 +1 @@
Subproject commit 1dd197f1021a991abb114a049b471dd2658e8cea
Subproject commit ee3fc7adea15badbfee0e8b5615e67d0e0bcc020

@ -1 +1 @@
Subproject commit 5ba404d99edb94fc4fda65af08166a6803662d38
Subproject commit c88d08bdda6fd9d184fec4cf8b513e1ea2148eea

@ -1 +1 @@
Subproject commit 51e5a2f7f2fb3271f72d603c37b429573bd83840
Subproject commit e244524bc91f228cab0228c7bc425690af115028

2
taps

@ -1 +1 @@
Subproject commit 6392af7ebef4a1da0bb606536f9261aa6f9f5954
Subproject commit 285f1833c934add0fb3aea44c46c7cb29e51c189

2
tkrzw

@ -1 +1 @@
Subproject commit 90bd457a4d33f4d1adac88d3b17eb3212c595d92
Subproject commit e7c10398880d1c2ae940d1cdccf207a294beb409

43
tup.patch Normal file
View File

@ -0,0 +1,43 @@
diff --git a/src/tup/pel_group.c b/src/tup/pel_group.c
index 0a3bc4c3..db3848fa 100644
--- a/src/tup/pel_group.c
+++ b/src/tup/pel_group.c
@@ -47,6 +47,10 @@ int pel_ignored(const char *path, int len)
return 1;
if(len == 4 && strncmp(path, ".svn", 4) == 0)
return 1;
+ if(len == 7 && strncmp(path, ".direnv", 7) == 0)
+ return 1;
+ if(len == 10 && strncmp(path, ".gitignore", 10) == 0)
+ return 1;
if(len == 7 && strncmp(path, ".ccache", 7) == 0)
return 1;
/* See also fuse_fs.c:is_hidden() */
diff --git a/src/tup/server/fuse_fs.c b/src/tup/server/fuse_fs.c
index 108051e5..88737580 100644
--- a/src/tup/server/fuse_fs.c
+++ b/src/tup/server/fuse_fs.c
@@ -100,6 +100,10 @@ static int is_hidden(const char *path)
return 1;
if(strstr(path, "/.bzr") != NULL)
return 1;
+ if(strstr(path, "/.direnv") != NULL)
+ return 1;
+ if(strstr(path, "/.gitignore") != NULL)
+ return 1;
if(is_ccache_path(path))
return 1;
return 0;
diff --git a/tup.1 b/tup.1
index 208629fe..ae0c54ce 100644
--- a/tup.1
+++ b/tup.1
@@ -291,7 +291,7 @@ Set to '1' to keep building as much as possible even if errors are encountered.
Set to '1' to track dependencies on files outside of the tup hierarchy. The default is '0', which only tracks dependencies within the tup hierarchy. For example, if you want all C files to be re-compiled when gcc is updated on your system, you should set this to '1'. In Linux and OSX, using full dependencies requires that the tup binary is suid as root so that it can run sub-processes in a chroot environment. Alternatively on Linux, if your kernel supports user namespaces, then you don't need to make the binary suid. Note that if this value is set to '1' from '0', tup will rebuild the entire project. Disabling this option when it was previously enabled does not require a full rebuild, but does take some time since the nodes representing external files are cleared out. NOTE: This does not currently work with ccache or other programs that may write to external files due to issues with locking. This may be fixed in the future.
.TP
.B updater.warnings (defaults to '1')
-Set to '0' to disable warnings about writing to hidden files. Tup doesn't track files that are hidden. If a sub-process writes to a hidden file, then by default tup will display a warning that this file was created. By disabling this option, those warnings are not displayed. Hidden filenames (or directories) include: ., .., .tup, .git, .hg, .bzr, .svn.
+Set to '0' to disable warnings about writing to hidden files. Tup doesn't track files that are hidden. If a sub-process writes to a hidden file, then by default tup will display a warning that this file was created. By disabling this option, those warnings are not displayed. Hidden filenames (or directories) include: ., .., .tup, .git, .hg, .bzr, .svn, .direnv.
.TP
.B display.color (default 'auto')
Set to 'never' to disable ANSI escape codes for colored output, or 'always' to always use ANSI escape codes for colored output. The default is 'auto', which displays uses colored output if stdout is connected to a tty, and uses no colors otherwise (ie: if stdout is redirected to a file).

@ -1 +1 @@
Subproject commit 73e63bdc779f579971167c61172e48f436c1cde5
Subproject commit 4db9037153d123bb1f12feafba7a4d2210c53578