Skip to content

Commit

Permalink
gn: 20190403 -> 2020-03-09
Browse files Browse the repository at this point in the history
This updates gn to the required version for chromiumDev (the recommended
version for the stable release of Chromium isn't sufficient [0]).

[0]: The Chromium build fails during the configuration phase:
ERROR at //mojo/public/tools/bindings/mojom.gni:393:16: Undefined identifier
               "cpp_typemaps",
               ^-------------
  • Loading branch information
primeos committed Mar 24, 2020
1 parent 986fbf4 commit a1b4bfe
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions pkgs/development/tools/build-managers/gn/default.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
{ stdenv, lib, fetchgit, darwin, writeText
, git, ninja, python3 }:
, ninja, python3
}:

let
rev = "64b846c96daeb3eaf08e26d8a84d8451c6cb712b";
sha256 = "1v2kzsshhxn0ck6gd5w16gi2m3higwd9vkyylmsczxfxnw8skgpy";
# Note: Please use the recommended version for Chromium, e.g.:
# https://git.archlinux.org/svntogit/packages.git/tree/trunk/chromium-gn-version.sh?h=packages/gn
rev = "fd3d768bcfd44a8d9639fe278581bd9851d0ce3a";
revNum = "1718"; # git describe HEAD --match initial-commit | cut -d- -f3
version = "2020-03-09";
sha256 = "1asc14y8by7qcn10vbk467hvx93s30pif8r0brissl0sihsaqazr";

shortRev = builtins.substring 0 7 rev;
revShort = builtins.substring 0 7 rev;
lastCommitPosition = writeText "last_commit_position.h" ''
#ifndef OUT_LAST_COMMIT_POSITION_H_
#define OUT_LAST_COMMIT_POSITION_H_
#define LAST_COMMIT_POSITION "(${shortRev})"
#define LAST_COMMIT_POSITION_NUM ${revNum}
#define LAST_COMMIT_POSITION "${revNum} (${revShort})"
#endif // OUT_LAST_COMMIT_POSITION_H_
'';

in
stdenv.mkDerivation {
pname = "gn";
version = "20190403";
in stdenv.mkDerivation {
pname = "gn-unstable";
inherit version;

src = fetchgit {
# Note: The TAR-Archives (+archive/${rev}.tar.gz) are not deterministic!
url = "https://gn.googlesource.com/gn";
inherit rev sha256;
};

nativeBuildInputs = [ ninja python3 git ];
nativeBuildInputs = [ ninja python3 ];
buildInputs = lib.optionals stdenv.isDarwin (with darwin; with apple_sdk.frameworks; [
libobjc
cctools
Expand All @@ -49,8 +55,8 @@ stdenv.mkDerivation {
setupHook = ./setup-hook.sh;

meta = with lib; {
description = "A meta-build system that generates NinjaBuild files";
homepage = https://gn.googlesource.com/gn;
description = "A meta-build system that generates build files for Ninja";
homepage = "https://gn.googlesource.com/gn";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ stesie matthewbauer ];
Expand Down

0 comments on commit a1b4bfe

Please sign in to comment.