diff --git a/pkgs/by-name/gn/gn/package.nix b/pkgs/by-name/gn/gn/package.nix index 65e7f997ed4f..752ada43ae1b 100644 --- a/pkgs/by-name/gn/gn/package.nix +++ b/pkgs/by-name/gn/gn/package.nix @@ -5,19 +5,27 @@ cctools, ninja, python3, + + # Note: Please use the recommended version for Chromium stable, i.e. from + # /pkgs/applications/networking/browsers/chromium/info.json + version ? + # This is a workaround for update-source-version to be able to update this + let + _version = "0-unstable-2025-04-28"; + in + _version, + rev ? "85cc21e94af590a267c1c7a47020d9b420f8a033", + hash ? "sha256-SYpWYvGGNLMZPR1LdKKgubbv+4QcxRw8EYp7cNI5wQQ=", }: stdenv.mkDerivation { pname = "gn"; - version = "0-unstable-2025-04-28"; + inherit version; src = fetchgit { # Note: The TAR-Archives (+archive/${rev}.tar.gz) are not deterministic! url = "https://gn.googlesource.com/gn"; - # Note: Please use the recommended version for Chromium stable, i.e. from - # /pkgs/applications/networking/browsers/chromium/info.json - rev = "85cc21e94af590a267c1c7a47020d9b420f8a033"; - hash = "sha256-SYpWYvGGNLMZPR1LdKKgubbv+4QcxRw8EYp7cNI5wQQ="; + inherit rev hash; leaveDotGit = true; deepClone = true; postFetch = '' diff --git a/pkgs/by-name/gn/gn/update.sh b/pkgs/by-name/gn/gn/update.sh index e6a498fd2778..692426e8f149 100755 --- a/pkgs/by-name/gn/gn/update.sh +++ b/pkgs/by-name/gn/gn/update.sh @@ -18,4 +18,4 @@ commit_time=$( commit_date=$(TZ= date --date "$commit_time" --iso-8601) version="0-unstable-$commit_date" -update-source-version --rev="$rev" --version-key="version" "gn" "$version" +update-source-version --rev="$rev" --version-key="_version" "gn" "$version"