diff --git a/justfile b/justfile index 2823865..ad30c48 100644 --- a/justfile +++ b/justfile @@ -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 diff --git a/overlays.nix b/overlays.nix index 7a66b76..b9556a4 100755 --- a/overlays.nix +++ b/overlays.nix @@ -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 .withOil which run build with osh, https://oils.pub/osh.html#2-you-get-precise-error-messages # TODO: mkDerivation.passthru.withGDB: add .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 .withCuda # usage: nix-build . -A .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 '';