From 25fe357d572b656d57d3335e7f28e0e38466cc0d Mon Sep 17 00:00:00 2001 From: socatlolmeow Date: Sun, 18 Oct 2026 17:11:42 +0200 Subject: [PATCH 1/3] add(nix): Added as a nix flake --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 26 ++++++++++++++++++++++++++ result | 1 + 3 files changed, 54 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 120000 result diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..b713556 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1792116957, + "narHash": "sha256-EjZqHKObBfIOeHZnMRVV87HB3pPq/WBkmRJWyFxmZu8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f20cd90e28fe0403873f473b29e42662cd86e8c4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..2e60f5c --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + outputs = { self, nixpkgs }: + let + systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + forAll = nixpkgs.lib.genAttrs systems; + in { + packages = forAll (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in { + default = pkgs.rustPlatform.buildRustPackage { + pname = "drift"; + version = "0.1.0"; + src = ./.; + cargoLock.lockFile = ./Cargo.lock; + nativeBuildInputs = [ pkgs.makeWrapper ]; + postInstall = '' + wrapProgram $out/bin/drift \ + --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.mpv pkgs.yt-dlp ]} + ''; + meta.mainProgram = "drift"; + }; + }); + }; +} diff --git a/result b/result new file mode 120000 index 0000000..e6263ed --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/q16fr0zcxshhn8rvr6qc4y37hw8c5v1w-drift-0.1.0 \ No newline at end of file From c17152f449358ad52e410c3db5d18ed1b37deb3d Mon Sep 17 00:00:00 2001 From: socatlolmeow Date: Sun, 18 Oct 2026 17:12:01 +0200 Subject: [PATCH 2/3] add(flake): added as a nix flake --- result | 1 - 1 file changed, 1 deletion(-) delete mode 120000 result diff --git a/result b/result deleted file mode 120000 index e6263ed..0000000 --- a/result +++ /dev/null @@ -1 +0,0 @@ -/nix/store/q16fr0zcxshhn8rvr6qc4y37hw8c5v1w-drift-0.1.0 \ No newline at end of file From 71c2ef641023f9d86677dc4520fff27300faad82 Mon Sep 17 00:00:00 2001 From: socatlolmeow Date: Sun, 18 Oct 2026 21:47:23 +0200 Subject: [PATCH 3/3] cleanup(app,ui): remove unused imports --- src/app.rs | 2 +- src/ui.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.rs b/src/app.rs index 7c1b53c..0d4f26d 100644 --- a/src/app.rs +++ b/src/app.rs @@ -9,7 +9,7 @@ use ratatui::widgets::TableState; use crate::command::{self, Amount, Command, COMMAND_NAMES}; use crate::config::{self, Config}; use crate::lyrics::{self, Lyrics}; -use crate::model::{fmt_time, split_artists, RepeatMode, Track}; +use crate::model::{split_artists, RepeatMode, Track}; use crate::player::{Player, PlayerEvent}; use crate::session::Session; use crate::store::Store; diff --git a/src/ui.rs b/src/ui.rs index 26f2878..c3cfa98 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -1,7 +1,7 @@ use ratatui::layout::{Alignment, Constraint, Layout, Margin, Rect}; use ratatui::style::{Color, Modifier, Style, Stylize}; use ratatui::text::{Line, Span}; -use ratatui::widgets::{Block, BorderType, Cell, Clear, Paragraph, Row, Table, Tabs, Wrap}; +use ratatui::widgets::{Block, BorderType, Cell, Clear, Paragraph, Row, Table, Wrap}; use ratatui::Frame; use crate::app::{App, Level, LyricsState, MenuAction, Mode, PlayState, View, NO_KEY};