From bee1857db6f83c682664684f3e5642c0a0eb7963 Mon Sep 17 00:00:00 2001 From: cwj3rcb Date: Thu, 18 Jun 2026 22:47:33 -0500 Subject: [PATCH] nixos flake --- README.md | 2 +- flake.nix | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 flake.nix diff --git a/README.md b/README.md index 5a43919..8141b7c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This is the first actually useful programming project I have completed. I still can't write in rust because of generative AI. Maybe one day when I am better at programming I will refactor the codebase and figure out how to hand code a transcoding option that actually is compatible with Jellyfin API. -Unix Only Curreently. +Linux Only Curreently. ## Features * **Blazingly Fast Speed** diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..9e73e68 --- /dev/null +++ b/flake.nix @@ -0,0 +1,53 @@ +{ + 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"; + }; + }); + }; +} \ No newline at end of file