-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.nix
114 lines (102 loc) · 2.41 KB
/
package.nix
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{ stdenv
, parted
, pkgconfig
, dbus
, rust
, rustPlatform
, gettext
, fetchFromGitHub
, lib
, callPackage
, darwin
, llvmPackages
, libxml2
, glib
, libunistring
, writeShellScript
, glibc
, tzdata
, nixStable
, makeWrapper
, path
, xorg
, libunwind
, openssl
, cmake
, freetype
, expat
, libffi
, readline
, icu
, zlib
, python35
, python2
, autoconf213
, automake
, libtool
, libdnet
, yasm
}:
let
gitignoreSrc = fetchFromGitHub {
owner = "hercules-ci";
repo = "gitignore";
# put the latest commit sha of gitignore Nix library here:
rev = "2ced4519f865341adcb143c5d668f955a2cb997f";
# use what nix suggests in the mismatch message here:
sha256 = "sha256-X8xHVRr8N6SzI8Ju87V+A75r3ZwF+CEuXcx5nfZbhTk=";
};
inherit (import gitignoreSrc { inherit lib; }) gitignoreSource;
in
stdenv.mkDerivation rec {
pname = "fireframe";
version = "0.0.1";
src = gitignoreSource ./.;
cargoSha256 = "sha256:1mpw74y243ch535lcgbpcy6n9ji6cvh4irh4wj9js33cvck9q8r1";
nativeBuildInputs = [
# python35
python2
pkgconfig
makeWrapper
gettext
];
buildInputs = [
xorg.libX11
libunwind
openssl
cmake
freetype
expat
llvmPackages.clang
llvmPackages.llvm # llvm-objdump
autoconf213 # automake gettext libtool
xorg.libXt libdnet
libffi readline icu zlib
yasm
];
# NIX_CFLAGS_COMPILE = toString ([
# "-I${glib.dev}/include/gio-unix-2.0"
# "-I${nss.dev}/include/nss"
# ];
preBuild = ''
export LIBCLANG_PATH=${llvmPackages.libclang}/lib
#export CFLAGS="$CFLAGS -Wno-error=format-security -Wno-error"
#export BINDGEN_EXTRA_CLANG_ARGS="-I${parted.dev}/include -I${glibc.dev}/include -I${llvmPackages.libclang.out}/lib/clang/${llvmPackages.libclang.version}/include" # documented in the code as always... https://github.com/rust-lang/rust-bindgen/pull/1537 # but seems broken due to https://github.com/rust-lang/rust-bindgen/issues/1723
'';
shellHook = ''
${preBuild}
export PATH="${stdenv.lib.makeBinPath []}:$PATH"
'';
doCheck = false;
# installPhase = ''
# make VENDORED=1 DEBUG=0 RELEASE=release prefix=$out install
# wrapProgram $out/bin/distinst --append PATH : ${stdenv.lib.makeBinPath tools}
# '';
meta = with stdenv.lib; {
description = "";
homepage = "https://github.com/ssd-solar/fireframe";
# license = licenses.mpl2;
maintainers = with maintainers; [ mkg20001 ];
platforms = [ "x86_64-linux" ];
};
}