Unverified Commit e3df1639 authored by Marcin Serwin's avatar Marcin Serwin
Browse files

sse2neon: modernize



Signed-off-by: default avatarMarcin Serwin <marcin@serwin.dev>
parent 07f6f2dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -207,7 +207,7 @@ stdenv'.mkDerivation (finalAttrs: {
  ++ lib.optional stdenv.cc.isClang "-DPYTHON_LINKFLAGS=" # Clang doesn't support "-export-dynamic"
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    "-DLIBDIR=/does-not-exist"
    "-DSSE2NEON_INCLUDE_DIR=${sse2neon}/lib"
    "-DSSE2NEON_INCLUDE_DIR=${sse2neon}/include"
  ];

  preConfigure = ''
+6 −12
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  pkg-config,
  stdenv,
}:

@@ -16,19 +15,14 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-vb9k+KjiGodVngza0R18LjfPTlsqFbzqXZqefm6KHj0=";
  };

  postPatch = ''
    # remove warning about gcc < 10
    substituteInPlace sse2neon.h --replace-fail "#warning \"GCC versions" "// "
  '';
  doCheck = true;

  installPhase = ''
    runHook preInstall

  nativeBuildInputs = [ pkg-config ];
    install -Dm644 sse2neon.h $out/include/sse2neon.h

  dontInstall = true;
  # use postBuild instead of installPhase, because the build
  # in itself doesn't produce any ($out) output
  postBuild = ''
    mkdir -p $out/lib
    install -m444 sse2neon.h $out/lib/
    runHook postInstall
  '';

  meta = {