Commit 93262df2 authored by FliegendeWurst's avatar FliegendeWurst
Browse files

fileshare: fix build with GCC 14, misc. cleanup

parent f28864e0
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  fetchgit,
  fetchFromGitea,
  pkg-config,
  git,
  libmicrohttpd,
@@ -11,16 +11,23 @@ stdenv.mkDerivation rec {
  pname = "fileshare";
  version = "0.2.4";

  src = fetchgit {
    url = "https://git.tkolb.de/Public/fileshare.git";
  src = fetchFromGitea {
    domain = "git.tkolb.de";
    owner = "Public";
    repo = "fileshare";
    rev = "v${version}";
    sha256 = "03jrhk4vj6bc2w3lsrfjpfflb4laihysgs5i4cv097nr5cz32hyk";
    sha256 = "sha256-00MxPivZngQ2I7Hopz2MipJFnbvSZU0HF2wZucmEWQ4=";
  };

  postPatch = ''
    sed -i 's,$(shell git rev-parse --short HEAD),/${version},g' Makefile
    substituteInPlace Makefile \
      --replace-fail pkg-config "${stdenv.cc.targetPrefix}pkg-config" \
      --replace-fail gcc "${stdenv.cc.targetPrefix}cc"
  '';

  env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";

  nativeBuildInputs = [
    pkg-config
    git