summaryrefslogtreecommitdiff
path: root/Biz/Bild/CcacheWrapper.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2024-11-15 14:55:37 -0500
committerBen Sima <ben@bsima.me>2024-12-21 10:06:49 -0500
commit6513755670892983db88a6633b8c1ea6019c03d1 (patch)
tree44e9eccdb7a3a74ab7e96a8fee7572dd6a78dc73 /Biz/Bild/CcacheWrapper.nix
parentae7b7e0186b5f2e0dcd4d5fac0a71fa264caedc2 (diff)
Re-namespace some stuff to Omni
I was getting confused about what is a product and what is internal infrastructure; I think it is good to keep those things separate. So I moved a bunch of stuff to an Omni namespace, actually most stuff went there. Only things that are explicitly external products are still in the Biz namespace.
Diffstat (limited to 'Biz/Bild/CcacheWrapper.nix')
-rw-r--r--Biz/Bild/CcacheWrapper.nix57
1 files changed, 0 insertions, 57 deletions
diff --git a/Biz/Bild/CcacheWrapper.nix b/Biz/Bild/CcacheWrapper.nix
deleted file mode 100644
index 78e5a08..0000000
--- a/Biz/Bild/CcacheWrapper.nix
+++ /dev/null
@@ -1,57 +0,0 @@
-self: super:
-
-let
- # this should come from config.programs.ccache.cacheDir but I can't figure out
- # how to access that from a nixpkgs overlay, so just hardcode the default
- ccacheDir = "/var/cache/ccache";
-
- # https://github.com/NixOS/nixpkgs/pull/216363#issuecomment-1430356886
- fixwebkit = pkg:
- self.useCcacheStdenv (pkg.overrideAttrs (attrs: rec {
- preConfigure = attrs.preConfigure + ''
- # not sure which of these works so just do them both
- export NUMBER_OF_PROCESSORS=$NIX_BUILD_CORES
- ninjaFlagsArray+=("-l$NIX_BUILD_CORES")
- '';
- }));
-in {
- ccacheWrapper = super.ccacheWrapper.override {
- extraConfig = ''
- export CCACHE_COMPRESS=1
- export CCACHE_DIR="${ccacheDir}"
- export CCACHE_UMASK=007
- if [ ! -d "$CCACHE_DIR" ]
- then
- echo "====="
- echo "Directory '$CCACHE_DIR' does not exist"
- echo "Please create it with:"
- echo " sudo mkdir -m0770 '$CCACHE_DIR'"
- echo " sudo chown root:nixbld '$CCACHE_DIR'"
- echo "====="
- exit 1
- fi
- if [ ! -w "$CCACHE_DIR" ]
- then
- echo "====="
- echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)"
- echo "Please verify its access permissions"
- echo "====="
- exit 1
- fi
- '';
- };
-
- useCcacheStdenv = pkg: pkg.override { stdenv = super.ccacheStdenv; };
-
- cudann = self.useCcacheStdenv super.cudann;
- llvm = self.useCcacheStdenv super.llvm;
- magma = self.useCcacheStdenv super.magma;
- nvcc = self.useCcacheStdenv super.nvcc;
- onnx = self.useCcacheStdenv super.onnx;
- onnxruntime = self.useCcacheStdenv super.onnxruntime;
- webkit = fixwebkit super.webkit;
- webkitgtk = fixwebkit super.webkitgtk;
- webkitgtk_4_1 = fixwebkit super.webkitgtk_4_1;
- webkitgtk_5_0 = fixwebkit super.webkitgtk_5_0;
- webkitgtk_6_0 = fixwebkit super.webkitgtk_6_0;
-}