Unverified Commit 06a3aaa5 authored by Stzx's avatar Stzx
Browse files

udpspeeder: fix crash

parent 9ca21a51
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
  lib,
  stdenv,
  fetchFromGitHub,
  cmake,
  versionCheckHook,
  nix-update-script,
}:
@@ -18,15 +17,12 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-hrwkPSxY1DTEXt9vxDECDEJaoTDzBUS7rVI609uZwdU=";
  };

  preBuild = ''
    echo "const char *gitversion = \"${finalAttrs.version}\";" > git_version.h # From Makefile
    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I$PWD"
  postPatch = ''
    substituteInPlace makefile \
      --replace-fail " -static " " " \
      --replace-fail "\$(shell git rev-parse HEAD)" ${finalAttrs.version}
  '';

  nativeBuildInputs = [
    cmake
  ];

  installPhase = ''
    runHook preInstall