Unverified Commit 79134504 authored by Jasi's avatar Jasi
Browse files

duckstation: fix update script for patched source

parent 7393b1e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ let

  linuxDrv = llvmPackages.stdenv.mkDerivation (finalAttrs: {
    pname = "duckstation";
    version = pkgSources.duckstation.version;
    version = "0.1-10091";

    src = fetchFromGitHub {
      owner = "stenzek";
+0 −1
Original line number Diff line number Diff line
{
  "duckstation": {
    "version": "0.1-10091",
    "hash_linux": "sha256-mgrln6Z0kshFy/8QberfeXHWoSxxojvn53B/WYkobpQ=",
    "hash_darwin": "sha256-6bp3ksI3a3FYuGhP6y77AxTR1XOXyjmBuQNnWwU9Zoo="
  },
  "discord_rpc": {
+2 −4
Original line number Diff line number Diff line
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils nix curl jq
#!nix-shell -i bash -p coreutils nix nix-update curl jq
# shellcheck shell=bash

set -euo pipefail
@@ -15,7 +15,7 @@ if [[ $old_version == "$new_version" ]]; then
fi

echo "Updating duckstation from $old_version -> $new_version"
duckstation_linux_hash=$(nix --extra-experimental-features "nix-command flakes" flake prefetch github:stenzek/duckstation/"$new_version" --json | jq -r '.hash')
nix-update --src-only --version "$new_version" duckstation
duckstation_darwin_hash=$(nix-hash --to-sri --type sha256 "$(nix-prefetch-url --type sha256 "https://github.com/stenzek/duckstation/releases/download/${new_version}/duckstation-mac-release.zip")")

echo "Vendor library update..."
@@ -44,7 +44,6 @@ echo "Regenerating '""$location""/sources.json'"
JSON=$(
  jq --null-input \
    --arg new_version "${new_version:1}" \
    --arg duckstation_linux_hash "$duckstation_linux_hash" \
    --arg duckstation_darwin_hash "$duckstation_darwin_hash" \
    --arg discord_rpc_rev "$discord_rpc_rev" \
    --arg discord_rpc_hash "$discord_rpc_hash" \
@@ -55,7 +54,6 @@ JSON=$(
    --arg chtdb_hash "$chtdb_hash" \
    '{ "duckstation": {
             "version": $new_version,
             "hash_linux": $duckstation_linux_hash,
             "hash_darwin": $duckstation_darwin_hash
           },
           "discord_rpc": {