-
Notifications
You must be signed in to change notification settings - Fork 488
/
flake.nix
67 lines (63 loc) · 1.89 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
{
inputs = {
unstablePkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "unstablePkgs";
};
};
};
outputs = { self, unstablePkgs, flake-utils, rust-overlay }:
flake-utils.lib.eachDefaultSystem
(system:
let
overlays = [ (import rust-overlay) ];
unstable = import unstablePkgs {
inherit system overlays;
};
rustToolchain = unstable.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
common = with unstable; [
gtk3
glib
glib-networking
dbus
openssl_3
librsvg
gettext
libiconv
libsoup
libsoup_3
webkitgtk
nodejs_20
corepack_20
];
# runtime Deps
libraries = with unstable;[
cairo
pango
harfbuzz
gdk-pixbuf
] ++ common;
# compile-time deps
packages = with unstable; [
curl
wget
pkg-config
rustToolchain
] ++ common;
in
{
devShells.default = unstable.mkShell {
nativeBuildInputs = packages;
buildInputs = libraries;
shellHook = ''
export LD_LIBRARY_PATH=${unstable.lib.makeLibraryPath libraries}:$LD_LIBRARY_PATH
export XDG_DATA_DIRS=${unstable.gsettings-desktop-schemas}/share/gsettings-schemas/${unstable.gsettings-desktop-schemas.name}:${unstable.gtk3}/share/gsettings-schemas/${unstable.gtk3.name}:$XDG_DATA_DIRS
export GIO_MODULE_DIR="${unstable.glib-networking}/lib/gio/modules/"
'';
};
}
);
}