remove unity and move most .nix to nixSupport
This commit is contained in:
parent
346768a144
commit
cccea1141d
6 changed files with 2 additions and 4384 deletions
37
src/nixSupport/default.nix
Normal file
37
src/nixSupport/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
pkgs,
|
||||
myCommitId,
|
||||
...
|
||||
}:
|
||||
let
|
||||
xce = pkgs.callPackage ./xce.nix {
|
||||
inherit pkgs myCommitId;
|
||||
withDebug = false;
|
||||
withAsan = false;
|
||||
withoutDb = false;
|
||||
};
|
||||
xce_withoutdb = pkgs.callPackage ./xce.nix {
|
||||
inherit pkgs myCommitId;
|
||||
withDebug = false;
|
||||
withAsan = false;
|
||||
withoutDb = true;
|
||||
};
|
||||
xce_withoutdb_debug = pkgs.callPackage ./xce.nix {
|
||||
inherit pkgs myCommitId;
|
||||
withDebug = true;
|
||||
withAsan = true;
|
||||
withoutDb = true;
|
||||
};
|
||||
xce_debug = pkgs.callPackage ./xce.nix {
|
||||
inherit pkgs myCommitId;
|
||||
withDebug = true;
|
||||
withAsan = true;
|
||||
withoutDb = false;
|
||||
};
|
||||
in
|
||||
{
|
||||
xce = xce;
|
||||
xce_debug = xce_debug;
|
||||
xce_withoutdb = xce_withoutdb;
|
||||
xce_withoutdb_debug = xce_withoutdb_debug;
|
||||
}
|
||||
56
src/nixSupport/xce.nix
Normal file
56
src/nixSupport/xce.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
pkgs,
|
||||
myCommitId,
|
||||
withDebug? false,
|
||||
withAsan? false,
|
||||
withoutDb? false,
|
||||
...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
pname = "xce";
|
||||
version = "0.0.1";
|
||||
|
||||
src = ./..;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.meson
|
||||
pkgs.ninja
|
||||
pkgs.capnproto
|
||||
pkgs.pkg-config
|
||||
pkgs.cmake
|
||||
pkgs.go
|
||||
pkgs.openssl
|
||||
pkgs.libtirpc
|
||||
pkgs.readline
|
||||
pkgs.ncurses
|
||||
pkgs.capnpc
|
||||
pkgs.which
|
||||
pkgs.findutils
|
||||
pkgs.libuv
|
||||
pkgs.elogind
|
||||
pkgs.sqlite
|
||||
pkgs.hwloc
|
||||
pkgs.linux-pam
|
||||
pkgs.zlog_with_pkgconf
|
||||
pkgs.unity-test
|
||||
];
|
||||
|
||||
build-system = [ pkgs.meson ];
|
||||
|
||||
dontStrip = (withDebug || withAsan);
|
||||
separateDebugInfo = (withDebug || withAsan);
|
||||
|
||||
impureEnvVars = [ "HOME" ];
|
||||
|
||||
mesonFlags =[
|
||||
(lib.optional withDebug "-Dwith_debug=true")
|
||||
(lib.optional withAsan "-Db_sanitize=address")
|
||||
(lib.optional withoutDb "-Dwithout_db=true")
|
||||
("-Dcommit_id=" + myCommitId)
|
||||
# (lib.optional (!with_debug) "-Dbuildtype=release")
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue