about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/mps/default.nix
blob: fd6e5d60bf7b8e671187f9539f1791c68a2a0025 (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
{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, sqlite
}:

stdenv.mkDerivation rec {
  pname = "mps";
  version = "1.118.0";

  src = fetchFromGitHub {
    owner = "Ravenbrook";
    repo = "mps";
    rev = "refs/tags/release-${version}";
    hash = "sha256-3ql3jWLccgnQHKf23B1en+nJ9rxqmHcWd7aBr93YER0=";
  };

  postPatch = ''
    # Disable -Werror to avoid biuld failure on fresh toolchains like
    # gcc-13.
    substituteInPlace code/gc.gmk --replace-fail '-Werror ' ' '
    substituteInPlace code/gp.gmk --replace-fail '-Werror ' ' '
    substituteInPlace code/ll.gmk --replace-fail '-Werror ' ' '
  '';

  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = [ sqlite ];

  meta = {
    description = "A flexible memory management and garbage collection library";
    homepage    = "https://www.ravenbrook.com/project/mps";
    license     = lib.licenses.sleepycat;
    platforms   = lib.platforms.linux;
    maintainers = [ lib.maintainers.thoughtpolice ];
  };
}