mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 20:14:08 +09:00
noctalia
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{ lib, pkgs }:
|
||||
let
|
||||
version = "0.46.0";
|
||||
architecture =
|
||||
if pkgs.stdenv.hostPlatform.isx86_64 then
|
||||
"x86_64"
|
||||
else if pkgs.stdenv.hostPlatform.isAarch64 then
|
||||
"aarch64"
|
||||
else
|
||||
throw "CodexBar CLI is only packaged for x86_64-linux and aarch64-linux";
|
||||
hash =
|
||||
{
|
||||
x86_64 = "sha256-yMrOpu1WIv2sGVgvY9qf2XCoX2AXMSqR2b8bQDRU6os=";
|
||||
aarch64 = "sha256-pCp3NOlxFN6zeH67W04WGSPbUae+ktzR5vEunWqu00g=";
|
||||
}
|
||||
.${architecture};
|
||||
in
|
||||
pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "codexbar";
|
||||
inherit version;
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/steipete/CodexBar/releases/download/v${version}/CodexBarCLI-v${version}-linux-musl-${architecture}.tar.gz";
|
||||
inherit hash;
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
installPhase = ''
|
||||
tar -xzf "$src" CodexBarCLI
|
||||
install -Dm755 CodexBarCLI "$out/bin/codexbar"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "CLI for CodexBar usage data";
|
||||
homepage = "https://github.com/steipete/CodexBar";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "codexbar";
|
||||
platforms = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user