gn: make src version overridable
Co-authored-by: emilylange <git@emilylange.de> Signed-off-by: Marcin Serwin <marcin@serwin.dev>
This commit is contained in:
co-authored by
emilylange
parent
d654f142e7
commit
e2e3860a20
@@ -5,19 +5,27 @@
|
||||
cctools,
|
||||
ninja,
|
||||
python3,
|
||||
|
||||
# Note: Please use the recommended version for Chromium stable, i.e. from
|
||||
# <nixpkgs>/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
|
||||
# <nixpkgs>/pkgs/applications/networking/browsers/chromium/info.json
|
||||
rev = "85cc21e94af590a267c1c7a47020d9b420f8a033";
|
||||
hash = "sha256-SYpWYvGGNLMZPR1LdKKgubbv+4QcxRw8EYp7cNI5wQQ=";
|
||||
inherit rev hash;
|
||||
leaveDotGit = true;
|
||||
deepClone = true;
|
||||
postFetch = ''
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user