jlkadsjklasdklj

This commit is contained in:
2025-05-19 01:49:55 +02:00
parent a1d1fe68f9
commit c8f67a3299
2 changed files with 6 additions and 7 deletions

View File

@@ -1,8 +1,6 @@
#!/usr/bin/env just --justfile
# makes variables accesible as $1 $2 $@, useful for escaping variadics
# TODO: something with NIX_SHOW_STATS=1 NIX_COUNT_CALLS=1 nix-instantiate . -A ....
set positional-arguments := true
export invokedir := invocation_directory()
@@ -324,8 +322,8 @@ _build_package_sources $system +packages:
result_writeable=results-src-writeable/"$(basename "$result")"
mkdir -p "$result_writeable"
if [[ -d "$(readlink "$result")" ]]; then
rsync -rxL "$result/" "$result_writeable/" &&
chmod -R +w "$result_writeable/" ||:
rsync -rxL --chmod=ugo+w "$result/" "$result_writeable/" ||:
#chmod -R +w "$result_writeable/"
elif [[ -f "$(readlink "$result")" ]]; then
atool "$(readlink "$result")" --extract-to="$result_writeable/" ||:
if [[ $(ls --almost-all "$result_writeable" | wc -l ) -eq 1 ]] && test -d "$result_writeable"/*; then

View File

@@ -60,7 +60,7 @@ let
# none of these overlays should cause a mass-rebuild, they should only add optional functionality
# TODO: cccache and sccache
# TODO: reduce eval time addition, any faster ways to override mkDerivation?
# TODO: mkDerivation.passthru.withOil: add <package>.withOil which run build with osh, https://oils.pub/osh.html#2-you-get-precise-error-messages
# TODO: mkDerivation.passthru.withGDB: add <package>.withGDB which runs the full build with gdb
# TODO: mkDerivation.passthru.withDebInfo: like overlay.withDebug but with cmakeBuildType = "RelWithDebInfo" mode
@@ -236,6 +236,7 @@ let
);
# TODO: this way of overriding does not work
# Not a treewide enable, just for a single derivation
# usage: nix-build . -A <package>.withCuda
# usage: nix-build . -A <package>.withRocm
overlays.withCudaOrRocm = final: prev: {
@@ -318,10 +319,10 @@ let
export CCACHE_SLOPPINESS=random_seed
if [[ ! -d "$CCACHE_DIR" ]]; then
echo "ERROR: \$CCACHE_DIR=$CCACHE_DIR not found!"
echo >&2 "ERROR: \$CCACHE_DIR=$CCACHE_DIR not found!"
exit 1
elif [[ ! -w "$CCACHE_DIR" ]]; then
echo "ERROR: \$CCACHE_DIR=$CCACHE_DIR not writeable!"
echo >&2 "ERROR: \$CCACHE_DIR=$CCACHE_DIR not writeable!"
exit 1
fi
'';