Commit 8b4061fd authored by jopejoe1's avatar jopejoe1 Committed by Francesco Gazzetta
Browse files

skia: make use of gnFlags

parent 23f4d2ed
Loading
Loading
Loading
Loading
+24 −29
Original line number Diff line number Diff line
@@ -70,16 +70,14 @@ stdenv.mkDerivation (finalAttrs: {
    vulkan-memory-allocator
  ];

  configurePhase = let
  gnFlags = let
    cpu = {
      "x86_64" = "x64";
      "i686" = "x86";
      "arm" = "arm";
      "aarch64" = "arm64";
    }.${stdenv.hostPlatform.parsed.cpu.name};
  in ''
    runHook preConfigure
    gn gen build --args='${toString ([
  in [
    # Build in release mode
    "is_official_build=true"
    "is_component_build=true"
@@ -99,10 +97,7 @@ stdenv.mkDerivation (finalAttrs: {
    "libwebp"
  ] ++ lib.optionals enableVulkan [
    "skia_use_vulkan=true"
    ])}'
    cd build
    runHook postConfigure
  '';
  ];

  # Somewhat arbitrary, but similar to what other distros are doing
  installPhase = ''
@@ -113,10 +108,10 @@ stdenv.mkDerivation (finalAttrs: {
    cp *.so *.a $out/lib

    # Includes
    pushd ../include
    pushd ../../include
    find . -name '*.h' -exec install -Dm644 {} $out/include/skia/{} \;
    popd
    pushd ../modules
    pushd ../../modules
    find . -name '*.h' -exec install -Dm644 {} $out/include/skia/modules/{} \;
    popd