forked from stkb/Rewrap
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathflake.nix
More file actions
75 lines (70 loc) · 2.03 KB
/
Copy pathflake.nix
File metadata and controls
75 lines (70 loc) · 2.03 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
{
description = "Development shell for Rewrap Revived";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
outputs = { nixpkgs, ... }:
let
forAllSystems = f:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
] (system: let pkgs = import nixpkgs { inherit system; }; in f pkgs);
in {
formatter = forAllSystems (pkgs: pkgs.nixfmt);
devShells = forAllSystems (pkgs:
let
# These libs are vscode dependencies provided for running the vscode tests.
# To identify missing libraries:
# > nix develop -ic ldd .obj/vscode-test/vscode-linux-x64-1.121.0/VSCode-linux-x64/code | grep found
vscodeRuntimeLibs = with pkgs;
lib.optionals stdenv.isLinux [
alsa-lib
at-spi2-core
atk
cairo
dbus
expat
glib
gtk3
libxkbcommon
mesa
nspr
nss
pango
systemd
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
xorg.libxcb
];
in {
default = pkgs.mkShell {
packages = with pkgs; [
dotnet-sdk_6
nodejs_21
python3
vsce
xvfb-run
];
shellHook = ''
export LD_LIBRARY_PATH=${
pkgs.lib.makeLibraryPath vscodeRuntimeLibs
}:$LD_LIBRARY_PATH
cat <<EOF
Rewrap Revived Dev Shell
dotnet $(dotnet --version)
node $(node --version)
npm $(npm --version)
$(python3 --version)
vsce $(vsce --version)
xvfb-run
EOF
'';
};
});
};
}