-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathflake.nix
144 lines (127 loc) · 4.53 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
{
description = "Sipi C++ build environment setup";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachSystem ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"] (system:
let
overlays = [
(final: prev: {
# The iiif-validator is not yet part of nixpkgs, so we need to add it as an overlay
iiif-validator = final.callPackage ./iiif-validator.nix { };
})
];
pkgs = import nixpkgs {
inherit system overlays;
};
in
{
devShells = {
# devShells.clang describes a shell with the clang compiler
clang = pkgs.mkShell.override {stdenv = pkgs.clang16Stdenv;} {
name = "sipi";
shellHook = ''
export PS1="\\u@\\h | nix-develop> "
'';
packages = with pkgs; [
# List other packages you want in your devShell
# C++ Compiler is already part of stdenv
# Build tool
cmake
gcovr # code coverage helper tool
lcov # code coverage helper tool
# Build dependencies
asio # networking library needed for crow (microframework for the web)
curl
exiv2
ffmpeg
file # libmagic-dev
gettext
glibcLocales # locales
gperf
iconv
inih
libidn
libuuid # uuid und uuid-dev
# numactl # libnuma-dev not available on mac
libwebp
openssl # libssl-dev
readline70 # libreadline-dev
pkg-config
unzip
];
};
# devShells.default describes the default shell with C++, cmake,
# and other dependencies
default = pkgs.mkShell.override {stdenv = pkgs.gcc13Stdenv;} {
name = "sipi";
shellHook = ''
export PS1="\\u@\\h | nix-develop> "
'';
packages = with pkgs; [
# TODO: extract only the dependencies provided through callPackage and not try to build the derivation
# Include the package from packages.default defined on the pkgs.callPackage line
# self'.packages.default
# List other packages you want in your devShell
# C++ Compiler is already part of stdenv
# Build tool
cmake
gcovr # code coverage helper tool
lcov # code coverage helper tool
# Build dependencies
asio # networking library needed for crow (microframework for the web)
curl
exiv2
ffmpeg
file # libmagic-dev
gettext
glibcLocales # locales
gperf
iconv
inih
libidn
libuuid # uuid und uuid-dev
# numactl # libnuma-dev not available on mac
libwebp
openssl # libssl-dev
readline70 # libreadline-dev
# Other stuff
# at
doxygen
pkg-config
unzip
# valgrind
# additional test dependencies
nginx
libtiff
graphicsmagick
apacheHttpd
imagemagick
libxml2
libxslt
# Python dependencies
python311Full
python311Packages.deprecation
python311Packages.docker
python311Packages.pip
python311Packages.psutil
python311Packages.pytest
python311Packages.requests
python311Packages.sphinx
python311Packages.testcontainers
python311Packages.wrapt
# added through overlay to nixpkgs
iiif-validator
];
};
};
# The `callPackage` automatically fills the parameters of the function
# in package.nix with what's inside the `pkgs` attribute.
packages.default = pkgs.callPackage ./package.nix {};
# The `config` variable contains our own outputs, so we can reference
# neighbor attributes like the package we just defined one line earlier.
# devShells.default = config.packages.default;
});
}