From 0cd2567a1a19240b4338f081433900e9bc10fa32 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 24 Dec 2023 04:35:50 -0500 Subject: tcmalloc-tf2: init --- misc/tcmalloc-monster.nix | 19 ------------------- pkgs/default.nix | 3 +++ 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 misc/tcmalloc-monster.nix diff --git a/misc/tcmalloc-monster.nix b/misc/tcmalloc-monster.nix deleted file mode 100644 index 52a03ef..0000000 --- a/misc/tcmalloc-monster.nix +++ /dev/null @@ -1,19 +0,0 @@ -# this uses llvm 16 to build a 32-bit version of tcmalloc, -# with a 64 and 32-bit version of mesa -# -# i'm using it to test ways to solve crashes in tf2 on -# systems with mesa also compiled against llvm 16 -let - nixpkgs = import (builtins.getFlake "github:nixos/nixpkgs") {system = "x86_64-linux";}; - - inherit (nixpkgs) llvmPackages_16 mesa pkgsi686Linux; - inherit (pkgsi686Linux) gperftools; - - x64Stdenv = llvmPackages_16.stdenv; - i686Stdenv = pkgsi686Linux.llvmPackages_16.stdenv; - mesa-i686 = pkgsi686Linux.mesa; -in { - mesa-llvm16 = mesa.override {stdenv = x64Stdenv;}; - mesa-llvm16-32bit = mesa-i686.override {stdenv = i686Stdenv;}; - gperftools-llvm16-32bit = gperftools.override {stdenv = i686Stdenv;}; -} diff --git a/pkgs/default.nix b/pkgs/default.nix index 3825a46..aa8de7c 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -43,3 +43,6 @@ in inherit (final) modrinth-app-unwrapped; }; } + // lib.optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") { + tcmalloc-tf2 = gperftools.override {inherit (pkgsi686Linux.llvmPackages_16) stdenv;}; + } -- cgit v1.2.3