summary refs log tree commit diff
path: root/pkgs/development/libraries/libowfat/default.nix
blob: 4f1a5f8a17989e7715b5570d7d875dab23fd096d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "libowfat-0.32";

  src = fetchurl {
    url = "https://www.fefe.de/libowfat/${name}.tar.xz";
    sha256 = "1hcqg7pvy093bxx8wk7i4gvbmgnxz2grxpyy7b4mphidjbcv7fgl";
  };

  # Dirty patch because 0.32 "moved headers to <libowfat/> upon install"
  # but it breaks gatling-0.15 and opentracker-2018-05-26 ...
  postPatch = ''
    substituteInPlace GNUmakefile --replace \
      'install -d $(DESTDIR)$(INCLUDEDIR)/libowfat' \
      'install -d $(DESTDIR)$(INCLUDEDIR)'
    substituteInPlace GNUmakefile --replace \
      'install -m 644 $(INCLUDES) $(DESTDIR)$(INCLUDEDIR)/libowfat' \
      'install -m 644 $(INCLUDES) $(DESTDIR)$(INCLUDEDIR)'
  '';

  makeFlags = "prefix=$(out)";
  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    description = "A GPL reimplementation of libdjb";
    homepage = https://www.fefe.de/libowfat/;
    license = licenses.gpl2;
    platforms = platforms.linux;
  };
}