summary refs log tree commit diff
path: root/pkgs/development/guile-modules/guile-json/default.nix
blob: 1ca6c21c97c82ce226c5f4613ccf29de9ad7d5ae (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
32
33
34
35
36
37
38
39
{ lib
, stdenv
, fetchurl
, guile
, texinfo
, pkg-config
}:

stdenv.mkDerivation rec {
  pname = "guile-json";
  version = "4.7.0";

  src = fetchurl {
    url = "mirror://savannah/guile-json/${pname}-${version}.tar.gz";
    sha256 = "sha256-q70TV3qUUULrkZrpDGosqFZ4STO/9VgQ7l+LM7NBU5c=";
  };

  postConfigure = ''
    sed -i '/moddir\s*=/s%=.*%=''${out}/share/guile/site%' Makefile;
    sed -i '/objdir\s*=/s%=.*%=''${out}/share/guile/ccache%' Makefile;
    sed -i '/moddir\s*=/s%=.*%=''${out}/share/guile/site/json%' json/Makefile;
    sed -i '/objdir\s*=/s%=.*%=''${out}/share/guile/ccache/json%' json/Makefile;
  '';

  nativeBuildInputs = [
    pkg-config texinfo
  ];
  buildInputs = [
    guile
  ];

  meta = with lib; {
    description = "JSON Bindings for GNU Guile";
    homepage = "https://savannah.nongnu.org/projects/guile-json";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ ethancedwards8 ];
    platforms = platforms.linux;
  };
}