-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
114 lines (93 loc) · 4 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
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
rec {
description = "Windstille GUI Engine";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
tinycmmc.url = "github:grumbel/tinycmmc";
tinycmmc.inputs.nixpkgs.follows = "nixpkgs";
tinycmmc.inputs.flake-utils.follows = "flake-utils";
logmich.url = "github:logmich/logmich";
logmich.inputs.nixpkgs.follows = "nixpkgs";
logmich.inputs.tinycmmc.follows = "tinycmmc";
geomcpp.url = "github:grumbel/geomcpp";
geomcpp.inputs.nixpkgs.follows = "nixpkgs";
geomcpp.inputs.tinycmmc.follows = "tinycmmc";
priocpp.url = "github:grumbel/priocpp";
priocpp.inputs.nixpkgs.follows = "nixpkgs";
priocpp.inputs.flake-utils.follows = "flake-utils";
priocpp.inputs.tinycmmc.follows = "tinycmmc";
priocpp.inputs.logmich.follows = "logmich";
priocpp.inputs.sexpcpp.follows = "sexpcpp";
surfcpp.url = "github:grumbel/surfcpp";
surfcpp.inputs.nixpkgs.follows = "nixpkgs";
surfcpp.inputs.tinycmmc.follows = "tinycmmc";
surfcpp.inputs.geomcpp.follows = "geomcpp";
surfcpp.inputs.logmich.follows = "logmich";
babyxml.url = "github:grumbel/babyxml";
babyxml.inputs.nixpkgs.follows = "nixpkgs";
babyxml.inputs.tinycmmc.follows = "tinycmmc";
sexpcpp.url = "github:lispparser/sexp-cpp";
sexpcpp.inputs.nixpkgs.follows = "nixpkgs";
sexpcpp.inputs.flake-utils.follows = "flake-utils";
sexpcpp.inputs.tinycmmc.follows = "tinycmmc";
wstinput.url = "github:windstilleteam/wstinput";
wstinput.inputs.nixpkgs.follows = "nixpkgs";
wstinput.inputs.flake-utils.follows = "flake-utils";
wstinput.inputs.tinycmmc.follows = "tinycmmc";
wstinput.inputs.logmich.follows = "logmich";
wstinput.inputs.priocpp.follows = "priocpp";
wstinput.inputs.sexpcpp.follows = "sexpcpp";
wstdisplay.url = "github:windstilleteam/wstdisplay";
wstdisplay.inputs.nixpkgs.follows = "nixpkgs";
wstdisplay.inputs.tinycmmc.follows = "tinycmmc";
wstdisplay.inputs.geomcpp.follows = "geomcpp";
wstdisplay.inputs.babyxml.follows = "babyxml";
wstdisplay.inputs.surfcpp.follows = "surfcpp";
wstdisplay.inputs.logmich.follows = "logmich";
wstsound.url = "github:windstilleteam/wstsound";
wstsound.inputs.nixpkgs.follows = "nixpkgs";
wstsound.inputs.flake-utils.follows = "flake-utils";
wstsound.inputs.tinycmmc.follows = "tinycmmc";
};
outputs = { self, nixpkgs, flake-utils,
tinycmmc, logmich, geomcpp, priocpp, surfcpp, babyxml, sexpcpp,
wstinput, wstdisplay, wstsound }:
tinycmmc.lib.eachSystemWithPkgs (pkgs:
{
packages = rec {
default = wstgui;
wstgui = pkgs.stdenv.mkDerivation {
pname = "wstgui";
version = "0.3.0";
src = nixpkgs.lib.cleanSource ./.;
cmakeFlags = [ "-DBUILD_EXTRA=ON" ];
nativeBuildInputs = [
pkgs.buildPackages.cmake
pkgs.buildPackages.pkg-config
];
postFixup =
(nixpkgs.lib.optionalString pkgs.targetPlatform.isWindows ''
mkdir -p $out/bin/
ln -sfv ${wstdisplay.packages.${pkgs.system}.default}/bin/*.dll $out/bin/
# FIXME: should be handled by sexpcpp itself
ln -sfv ${pkgs.jsoncpp}/bin/*.dll $out/bin/
'');
buildInputs = [
babyxml.packages.${pkgs.system}.default
];
propagatedBuildInputs = [
geomcpp.packages.${pkgs.system}.default
logmich.packages.${pkgs.system}.default
priocpp.packages.${pkgs.system}.default
sexpcpp.packages.${pkgs.system}.default
surfcpp.packages.${pkgs.system}.default
tinycmmc.packages.${pkgs.system}.default
wstdisplay.packages.${pkgs.system}.default
wstinput.packages.${pkgs.system}.default
wstsound.packages.${pkgs.system}.default
];
};
};
}
);
}