Loading pkgs/by-name/gi/github-desktop/package.nix +17 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ gnome-keyring, libsecret, curl, _experimental-update-script-combinators, nix-update-script, }: let Loading Loading @@ -177,6 +180,20 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; passthru = { inherit (finalAttrs) cacheRoot cacheApp; updateScript = _experimental-update-script-combinators.sequence [ (nix-update-script { extraArgs = [ "--version-regex" ''^release-(\d\.\d\.\d)$'' ]; }) # TODO: in the future, use `nix-update --custom-dep`. ./update-yarn-caches.sh ]; }; meta = { description = "GUI for managing Git and GitHub"; homepage = "https://desktop.github.com"; Loading pkgs/by-name/gi/github-desktop/update-yarn-caches.sh 0 → 100755 +27 −0 Original line number Diff line number Diff line #!/usr/bin/env nix-shell #!nix-shell -i bash -p nix gnused common-updater-scripts set -euxo pipefail cd "$(dirname $0)" setKV() { sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" package.nix } for cache in cacheApp cacheRoot; do hashKey="${cache}Hash" setKV "$hashKey" sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= pushd ../../../.. set +e newHash="$(nix-build --no-out-link -A github-desktop.$cache 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')" set -e popd if [ -z "$newHash" ]; then echo Failed to update hash for $cache exit 1 fi setKV "$hashKey" "$newHash" done Loading
pkgs/by-name/gi/github-desktop/package.nix +17 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,9 @@ gnome-keyring, libsecret, curl, _experimental-update-script-combinators, nix-update-script, }: let Loading Loading @@ -177,6 +180,20 @@ stdenv.mkDerivation (finalAttrs: { runHook postInstall ''; passthru = { inherit (finalAttrs) cacheRoot cacheApp; updateScript = _experimental-update-script-combinators.sequence [ (nix-update-script { extraArgs = [ "--version-regex" ''^release-(\d\.\d\.\d)$'' ]; }) # TODO: in the future, use `nix-update --custom-dep`. ./update-yarn-caches.sh ]; }; meta = { description = "GUI for managing Git and GitHub"; homepage = "https://desktop.github.com"; Loading
pkgs/by-name/gi/github-desktop/update-yarn-caches.sh 0 → 100755 +27 −0 Original line number Diff line number Diff line #!/usr/bin/env nix-shell #!nix-shell -i bash -p nix gnused common-updater-scripts set -euxo pipefail cd "$(dirname $0)" setKV() { sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" package.nix } for cache in cacheApp cacheRoot; do hashKey="${cache}Hash" setKV "$hashKey" sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= pushd ../../../.. set +e newHash="$(nix-build --no-out-link -A github-desktop.$cache 2>&1 >/dev/null | grep "got:" | cut -d':' -f2 | sed 's| ||g')" set -e popd if [ -z "$newHash" ]; then echo Failed to update hash for $cache exit 1 fi setKV "$hashKey" "$newHash" done