-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathflake.nix
80 lines (80 loc) · 2.18 KB
/
flake.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
{
inputs = {
magic_enum = {
url = "github:Neargye/magic_enum/c7a0c83ed44ec793285ebab58a86b232d10b5082";
flake = false;
};
semver = {
url = "github:Neargye/semver/2a8aa6a50fdb6a9a7ea519cbfdedb5d313b7844c";
flake = false;
};
single_application = {
url = "github:itay-grudev/SingleApplication/0d7b2630bda26f7dd4752c90faa9719455cab433";
flake = false;
};
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs@{ self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem [ "aarch64-linux" "x86_64-linux" ]
(system:
let
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
in
rec {
packages = { inherit (pkgs) across; };
checks = packages;
}
) // {
overlay = final: prev: {
across = final.stdenv.mkDerivation {
name = "across";
src = self;
cmakeFlags = [
"-DFETCH_SINGLE_APPLICATION=OFF"
"-DUSE_CORE_V5=ON"
];
nativeBuildInputs = with final; [
cmake
ninja
pkg-config
qt6.wrapQtAppsHook
];
buildInputs = with final;[
curl
spdlog
zxing-cpp
protobuf
grpc
gtest
c-ares
nlohmann_json
magic_enum
semver
qt6.qtbase
qt6.qttools
qt6.qtwayland
qt6.qtdeclarative
qt6.qt5compat
qt6.qttranslations
qt6.qtsvg
qt6.qtimageformats
];
postPatch = ''
rm -fr 3rdpart/*
ln -s ${inputs.single_application} 3rdpart/SingleApplication
'';
};
magic_enum = final.stdenv.mkDerivation {
name = "magic_enum";
src = inputs.magic_enum;
nativeBuildInputs = with final; [ cmake ];
};
semver = final.stdenv.mkDerivation {
name = "semver";
src = inputs.semver;
nativeBuildInputs = with final; [ cmake ];
};
};
};
}