Skip to content

Commit

Permalink
asset packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Dec 26, 2023
1 parent ecb7d57 commit 9d0e587
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 51 deletions.
90 changes: 40 additions & 50 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 24 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
cross-naersk.url = "github:icewind1991/cross-naersk";
cross-naersk.inputs.nixpkgs.follows = "nixpkgs";
cross-naersk.inputs.naersk.follows = "naersk";
steam-fetcher = {
# url = "github:nix-community/steam-fetcher/filelist";
url = "github:icewind1991/steam-fetcher/filelist";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = {
Expand All @@ -19,9 +24,13 @@
naersk,
rust-overlay,
cross-naersk,
steam-fetcher,
}:
utils.lib.eachDefaultSystem (system: let
overlays = [(import rust-overlay)];
overlays = [
steam-fetcher.overlays.default
(import rust-overlay)
];
pkgs = (import nixpkgs) {
inherit system overlays;
};
Expand Down Expand Up @@ -96,6 +105,20 @@
'';
buildInputs = with pkgs; [meshoptimizer];
});
assets = pkgs.fetchSteam {
name = "tf2-vpks";
appId = "232250";
depotId = "232250";
manifestId = "4816422920228384230"; # 22 December 2023 – 00:14:30 UTC
hash = "sha256-X2U7H6ydQ2z4YHjqvA6UlJp4VrECNhgoVu8OPdTsxKE=";
fileList = ["regex:(tf2|hl2)_misc.*vpk" "cp_badlands.bsp"];
};
server-with-assets = server.overrideAttrs (old: {
buildInputs = server.buildInputs ++ [ pkgs.makeWrapper ];
postInstall = ''
wrapProgram "$out/bin/vbsp-server" --set TF_DIR "${assets}"
'';
});
default = vbsp-to-gltf;
};

Expand Down

0 comments on commit 9d0e587

Please sign in to comment.