-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathflake.nix
More file actions
48 lines (39 loc) · 1.28 KB
/
Copy pathflake.nix
File metadata and controls
48 lines (39 loc) · 1.28 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
{
description = "Overleaf CLI – work with Overleaf projects from the command line";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
packages.default = pkgs.buildNpmPackage {
pname = "olcli";
version = "0.4.0";
src = self;
npmDepsHash = ""; # Run: nix build .# 2>&1 | grep 'got:' to get the hash
nodejs = pkgs.nodejs_22;
# Build step compiles TypeScript
buildPhase = ''
npm run build
'';
# The package installs via npm global-style
dontNpmInstall = false;
meta = with pkgs.lib; {
description = "Overleaf CLI – sync, compile, and manage Overleaf projects from the terminal";
homepage = "https://github.com/aloth/olcli";
license = licenses.mit;
mainProgram = "olcli";
maintainers = [];
platforms = platforms.all;
};
};
devShells.default = pkgs.mkShell {
packages = [ pkgs.nodejs_22 ];
};
}
);
}