Expose tf2/packages/default.nix as a function, so a custom nixpkgs instantiation can be provided

This commit is contained in:
Shelvacu
2025-06-29 18:31:37 -07:00
committed by Shelvacu on fw
parent 1b61a16e8c
commit 307a217a1b
3 changed files with 14 additions and 8 deletions

View File

@@ -9,8 +9,8 @@
packages.x86_64-linux.default =
let
pkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
tf2pkgs = inputs.tf2-nix.packages.x86_64-linux;
in tf2pkgs.mergeTf2Configs (with tf2pkgs; [
tf2Pkgs = inputs.tf2-nix.lib.mkTf2Pkgs { inherit pkgs; };
in tf2Pkgs.mergeTf2Configs (with tf2Pkgs; [
mastercomfig.presets.medium-low
mastercomfig.addons.flat-mouse
mastercomfig.addons.no-tutorial

View File

@@ -7,13 +7,17 @@
};
outputs = { self, ... }@inputs:
let
# keep it as an attrset arg for future expandability
mkTf2Pkgs = { pkgs }: import ./tf2/packages { inherit pkgs; };
in
inputs.flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import inputs.nixpkgs { inherit system; };
lib = pkgs.lib;
in {
legacyPackages = import ./tf2/packages {
inherit pkgs lib;
};
});
legacyPackages = mkTf2Pkgs pkgs;
})
// {
lib = { inherit mkTf2Pkgs; };
};
}

View File

@@ -1,6 +1,8 @@
{ pkgs, lib }:
{ pkgs }:
let
inherit (pkgs) lib;
mkTf2Config = pkgs.callPackage ../mkTf2Config.nix {};
fetchFromGameBanana =