mirror of
https://codeberg.org/spire/nix.git
synced 2026-08-02 12:25:00 +02:00
improve srcds time/versioning
This commit is contained in:
parent
f27c721ba1
commit
3c3bf63ddf
2 changed files with 19 additions and 19 deletions
|
|
@ -11,8 +11,8 @@
|
|||
steamworks-sdk-redist,
|
||||
system,
|
||||
}: let
|
||||
inherit (builtins) fromJSON readFile map toString elem head replaceStrings;
|
||||
depotInputs = fromJSON (readFile ./depots.json);
|
||||
inherit (lib) importJSON map toString elem last replaceStrings naturalSort;
|
||||
depotInputs = importJSON ./depots.json;
|
||||
fetchSupported = elem system depotdownloader.meta.platforms;
|
||||
fetcher = input:
|
||||
if fetchSupported
|
||||
|
|
@ -49,8 +49,9 @@
|
|||
name = "srcds-tf2-src";
|
||||
paths = allDepots;
|
||||
};
|
||||
timeToVersion = replaceStrings ["T" ":" "Z"] ["-" "-" ""];
|
||||
time = (head depotInputs).date;
|
||||
timeToVersion = replaceStrings ["T" ":"] ["-" "-"];
|
||||
times = map (depot: depot.date) depotInputs;
|
||||
time = last (naturalSort times);
|
||||
|
||||
curlCompat = curlWithGnuTls.overrideAttrs (
|
||||
final: prev: {
|
||||
|
|
@ -82,8 +83,7 @@ in
|
|||
chmod -R +w $out
|
||||
|
||||
# the steamclient.so included in the depot is 32bit so it wont work
|
||||
cp ${steamworks-sdk-redist}/lib/steamclient.so $out/bin/steamclient.so
|
||||
chmod -R +w $out/bin/steamclient.so
|
||||
cp ${steamworks-sdk-redist}/lib/steamclient.so $out/bin/linux64/steamclient.so
|
||||
|
||||
echo 440 > $out/steam_appid.txt
|
||||
|
||||
|
|
|
|||
|
|
@ -3,22 +3,22 @@
|
|||
def main [] {
|
||||
update_all_depots
|
||||
|
||||
nix-update --flake --use-update-script ambuild
|
||||
nix build .#ambuild
|
||||
# nix-update --flake --use-update-script ambuild
|
||||
# nix build .#ambuild
|
||||
|
||||
nix-update --flake --version=$"(get_metamod_version)" metamod-source
|
||||
nix build .#metamods.x86_64-linux.tf2
|
||||
# nix-update --flake --version=$"(get_metamod_version)" metamod-source
|
||||
# nix build .#metamods.x86_64-linux.tf2
|
||||
|
||||
nix-update --flake --use-update-script sourcemod
|
||||
nix build .#sourcemods.x86_64-linux.tf2
|
||||
# nix-update --flake --use-update-script sourcemod
|
||||
# nix build .#sourcemods.x86_64-linux.tf2
|
||||
|
||||
let sdks = open nix/sourcemod/hl2sdks.json | columns
|
||||
$sdks | each {|sdk| update_sdk $sdk}
|
||||
# let sdks = open nix/sourcemod/hl2sdks.json | columns
|
||||
# $sdks | each {|sdk| update_sdk $sdk}
|
||||
|
||||
nix-update --flake --use-update-script sourcemod-include-curl
|
||||
nix-update --flake --use-update-script sourcemod-include-library
|
||||
nix-update --flake --use-update-script sourcemod-include-steamworks
|
||||
nix-update --flake --use-update-script sourcemod-includes
|
||||
# nix-update --flake --use-update-script sourcemod-include-curl
|
||||
# nix-update --flake --use-update-script sourcemod-include-library
|
||||
# nix-update --flake --use-update-script sourcemod-include-steamworks
|
||||
# nix-update --flake --use-update-script sourcemod-includes
|
||||
|
||||
nix fmt
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ def get_manifest [app: int, depot: int] {
|
|||
# builting rm doesn't work for some reason?
|
||||
env rm -r ./depots
|
||||
let manifest = $info | get manifest | into int
|
||||
let date = $info | get date | into datetime | format date '%+'
|
||||
let date = $info | get date | into datetime | date to-timezone UTC | format date '%Y-%m-%dT%H:%M:%S'
|
||||
|
||||
{
|
||||
app_id: $app,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue