Unverified Commit 52bf0dc0 authored by Matteo Pacini's avatar Matteo Pacini Committed by GitHub
Browse files

kew: fix cross builds (#403223)

parents e6d17e23 8bbe4a3d
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -26,6 +26,11 @@
  withPulseaudio ? config.pulseaudio or stdenv.hostPlatform.isLinux,
}:

let
  uppercaseFirst =
    x: (lib.toUpper (lib.substring 0 1 x)) + (lib.substring 1 ((lib.strings.stringLength x) - 1) x);
in

stdenv.mkDerivation (finalAttrs: {
  pname = "kew";
  version = "3.2.0";
@@ -37,6 +42,12 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-nntbxDy1gfd4F/FvlilLeOAepqtxhnYE2XRjJSlFvgI=";
  };

  postPatch = ''
    substituteInPlace Makefile \
      --replace-fail '$(shell uname -s)' '${uppercaseFirst stdenv.hostPlatform.parsed.kernel.name}' \
      --replace-fail '$(shell uname -m)' '${stdenv.hostPlatform.parsed.cpu.name}'
  '';

  nativeBuildInputs =
    [
      pkg-config