forked from gabm/Satty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
45 lines (41 loc) · 1.13 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
{
description = "A basic Rust devshell for NixOS users developing gtk/libadwaita apps";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = {
nixpkgs,
rust-overlay,
...
}: let
systems = ["x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
forEachSystem = nixpkgs.lib.genAttrs systems;
in {
devShells = forEachSystem (
system: let
pkgs = nixpkgs.legacyPackages.${system};
rustPkgs = rust-overlay.packages.${system};
in rec {
default = satty;
satty = pkgs.mkShell {
buildInputs = with pkgs; [
pkg-config
libGL
libepoxy
gtk4
wrapGAppsHook4 # this is needed for relm4-icons to properly load after gtk::init()
libadwaita
fontconfig
(rustPkgs.rust.override {
extensions = ["rust-src"];
})
];
shellHook = ''
export GSETTINGS_SCHEMA_DIR=${pkgs.glib.getSchemaPath pkgs.gtk4}
'';
};
}
);
};
}