-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
68 lines (65 loc) · 1.99 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
{
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 = ./.;
buildPlatform = "crate2nix";
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;
};
scherzo = prev: {
crateBin = common.lib.filter (bin: bin.name != "scherzo_migrate" && bin.name != "scherzo_cmd") prev.crateBin;
};
};
shell = common: prev: {
packages = prev.packages ++ (with common.pkgs; [
musl.dev
mold
mkcert
cargo-deny
/*(common.lib.buildCrate {
memberName = "tokio-console";
root = builtins.fetchGit {
url = "https://github.com/tokio-rs/console.git";
rev = "a30264e0b5469ea596430b846b05e6e3541915d1";
ref = "main";
};
inherit (common) nativeBuildInputs buildInputs;
CARGO_PKG_REPOSITORY = "https://github.com/tokio-rs/console";
})*/
]);
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
'';
}
];
};
};
};
}