-
Notifications
You must be signed in to change notification settings - Fork 103
Expand file tree
/
Copy pathpackage.nix
More file actions
47 lines (38 loc) · 1.24 KB
/
package.nix
File metadata and controls
47 lines (38 loc) · 1.24 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
{
lib,
stdenv,
fetchzip,
nodejs,
flake,
}:
stdenv.mkDerivation rec {
pname = "ccstatusline";
version = "2.2.7";
src = fetchzip {
url = "https://registry.npmjs.org/ccstatusline/-/ccstatusline-${version}.tgz";
hash = "sha256-eFI8f59wEzVhGDhB2gRo0Yl6E3EH7O/p13PrXUEUio4=";
};
nativeBuildInputs = [ nodejs ];
installPhase = ''
runHook preInstall
# The npm package already contains built files
mkdir -p $out/bin
cp $src/dist/ccstatusline.js $out/bin/ccstatusline
chmod +x $out/bin/ccstatusline
# Replace the shebang with the correct node path
substituteInPlace $out/bin/ccstatusline \
--replace-quiet "#!/usr/bin/env node" "#!${nodejs}/bin/node"
runHook postInstall
'';
passthru.category = "Claude Code Ecosystem";
meta = with lib; {
description = "A highly customizable status line formatter for Claude Code CLI";
homepage = "https://github.com/sirmalloc/ccstatusline";
changelog = "https://github.com/sirmalloc/ccstatusline/releases/tag/v${version}";
license = licenses.mit;
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
maintainers = with flake.lib.maintainers; [ ypares ];
mainProgram = "ccstatusline";
platforms = platforms.all;
};
}