Skip to content

Commit 101d4ee

Browse files
authored
chore: add flake for development with Nix (#5509)
1 parent d1acfad commit 101d4ee

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

flake.lock

+41
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
description = "code-server";
3+
4+
inputs.flake-utils.url = "github:numtide/flake-utils";
5+
6+
outputs = { self, nixpkgs, flake-utils }:
7+
flake-utils.lib.eachDefaultSystem
8+
(system:
9+
let pkgs = nixpkgs.legacyPackages.${system};
10+
nodejs = pkgs.nodejs-16_x;
11+
yarn' = pkgs.yarn.override { inherit nodejs; };
12+
in {
13+
devShells.default = pkgs.mkShell {
14+
nativeBuildInputs = with pkgs; [
15+
nodejs yarn' python pkg-config git rsync jq moreutils
16+
];
17+
buildInputs = with pkgs; (lib.optionals (!stdenv.isDarwin) [ libsecret ]
18+
++ (with xorg; [ libX11 libxkbfile ])
19+
++ lib.optionals stdenv.isDarwin [
20+
AppKit Cocoa CoreServices Security cctools xcbuild
21+
]);
22+
};
23+
}
24+
);
25+
}

0 commit comments

Comments
 (0)