-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
50 lines (49 loc) · 1.34 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixCargoIntegration = {
url = "github:yusdacra/nix-cargo-integration/master";
inputs.nixpkgs.follows = "nixpkgs";
};
flakeCompat = {
url = "github:edolstra/flake-compat";
flake = false;
};
};
outputs = inputs: inputs.nixCargoIntegration.lib.makeOutputs {
root = ./.;
overrides = {
crateOverrides = common: _: {
mediasoup-sys = prev:
let
pkgs = common.pkgs;
pythonPkgs = pkgs: with pkgs; [
pip
];
pythonWithPkgs = pkgs.python3.withPackages pythonPkgs;
all = (with pkgs; [ cmake gnumake nodejs meson ninja ]) ++ [ pythonWithPkgs ];
in
{
buildInputs = (prev.buildInputs or [ ]) ++ all;
nativeBuildInputs = (prev.nativeBuildInputs or [ ]) ++ all;
};
};
shell = common: prev: {
packages = prev.packages ++ (with common.pkgs; [
mold
mkcert
]);
commands = prev.commands ++ [
{
name = "generate-cert";
command = ''
mkcert localhost 127.0.0.1 ::1
mv localhost+2.pem cert.pem
mv localhost+2-key.pem key.pem
'';
}
];
};
};
};
}