Files
CjTui/flake.nix
2026-06-18 22:47:33 -05:00

53 lines
1.2 KiB
Nix

{
description = "CJTUI - Chris Jellyfin Terminal User Interface";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs systems;
pkgsFor = system: import nixpkgs {
inherit system;
};
in {
packages = forAllSystems (system:
let
pkgs = pkgsFor system;
in {
default = pkgs.rustPlatform.buildRustPackage {
pname = "cjtui";
version = "0.1.0";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
nativeBuildInputs = [
pkgs.makeWrapper
];
postInstall = ''
wrapProgram $out/bin/cjtui \
--prefix PATH : ${pkgs.lib.makeBinPath [
pkgs.mpv
pkgs.aria2
]}
'';
};
});
apps = forAllSystems (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/cjtui";
};
});
};
}