summary refs log tree commit diff
path: root/pkgs/misc/urbit/default.nix
blob: 4fa622727241c83167689522127161c531a32179 (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
40
{ curl, fetchFromGitHub, gcc, git, gmp, libsigsegv, meson, ncurses, ninja,
  openssl, pkgconfig, re2c, stdenv, zlib }:

stdenv.mkDerivation rec {
  name = "urbit-${version}";
  version = "0.6.0";

  src = fetchFromGitHub {
    owner = "urbit";
    repo = "urbit";
    rev = "urbit-${version}";
    sha256 = "158mz6c6y5z1b6piid8hvrl5mcqh8q1ny185gz51jayia51azmgs";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [ pkgconfig ninja meson ];

  buildInputs = with stdenv.lib; [
    curl gcc git gmp libsigsegv ncurses openssl re2c zlib
  ];

  # uses 'readdir_r' deprecated by glibc 2.24
  NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";

  postPatch = ''
    patchShebangs .
  '';

  mesonFlags = [
    "--buildtype=release"
  ];

  meta = with stdenv.lib; {
    description = "An operating function";
    homepage = https://urbit.org;
    license = licenses.mit;
    maintainers = with maintainers; [ mudri ];
    platforms = with platforms; linux;
  };
}