-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathflake.nix
More file actions
136 lines (128 loc) · 3.64 KB
/
flake.nix
File metadata and controls
136 lines (128 loc) · 3.64 KB
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
{
description = "Development environment for quartz-themes with npm scripts support";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
};
darwinLibraries = (if pkgs.stdenv.isDarwin then with pkgs; [ ] else [ ]);
linuxLibraries = (
if pkgs.stdenv.isLinux then
with pkgs;
[
libdrm
alsa-lib
# Additional libraries for Chromium/Electron
udev
# X11 libraries for headless browser automation
libx11
libxcomposite
libxdamage
libxext
libxfixes
libxrandr
libxcb
libxcursor
libxi
libxrender
libxtst
libxscrnsaver
# GTK for Electron/Chromium-based applications
gtk3
gtk4
# Additional libraries for Chromium/Electron
libGL
# Graphics buffer management (required for Chromium)
libgbm
# Font configuration
fontconfig
freetype
# UUID generation (important for unique user-data-dir)
libuuid
# System utilities
systemd
# Wayland support
wayland
# Additional Electron dependencies
libnotify
libappindicator-gtk3
libdbusmenu
]
else
[ ]
);
# Libraries needed for dynamically linked binaries (e.g., chromedriver from webdriverio)
libraries =
with pkgs;
[
# Core libraries for dynamically linked executables
stdenv.cc.cc.lib
zlib
glib
nss
nspr
atk
cups
dbus
dbus.lib
expat
libxkbcommon
pango
cairo
mesa
at-spi2-atk
at-spi2-core
# Networking
curl
wget
]
++ (if pkgs.stdenv.isDarwin then darwinLibraries else linuxLibraries);
# Use nix-ld to provide dynamic linker for downloaded binaries
nix-ld-libraries = pkgs.lib.makeLibraryPath libraries;
in
{
devShells.default = pkgs.mkShell {
buildInputs =
with pkgs;
[
# Node.js and npm
nodejs_24
bun
# Just command runner
just
# Git for version control
git
# Additional development tools
python3
]
++ libraries;
# Environment variables for nix-ld
NIX_LD_LIBRARY_PATH = nix-ld-libraries;
NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
shellHook = ''
echo "quartz-themes development environment loaded"
echo "Node.js version: $(node --version)"
echo "npm version: $(npm --version)"
echo ""
echo "Run 'npm install' to install dependencies"
echo "Run 'npm run web:run' to extract themes"
echo "Run 'just' to see available commands"
'';
};
}
);
}