diff --git a/modules/wsl/default.nix b/modules/wsl/default.nix index 101bb2d..ad48108 100644 --- a/modules/wsl/default.nix +++ b/modules/wsl/default.nix @@ -1,4 +1,5 @@ { + inputs, lib, pkgs, ... @@ -12,4 +13,7 @@ #../server/open-webui.nix #../services/tts.nix ]; + environment.systemPackages = [ + pkgs.rovr + ]; } diff --git a/overlays/pkgs.nix b/overlays/pkgs.nix index c4d52c2..91c1fad 100644 --- a/overlays/pkgs.nix +++ b/overlays/pkgs.nix @@ -1,3 +1,7 @@ -{ inputs, ... }: +{ + inputs, + ... +}: self: super: { + rovr = inputs.self.packages.x86_64-linux.rovr; } diff --git a/pkgs/default.nix b/pkgs/default.nix index c1545bf..710c65a 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,9 +1,16 @@ { inputs, ... }@flakeContext: let - pkgs = import inputs.nixpkgs { system = "x86_64-linux"; }; + system = "x86_64-linux"; + pkgs = import inputs.nixpkgs { + inherit system; + config = { + allowUnfree = true; + }; + }; in { - # packages."x86_64-linux" = { - # immich = pkgs.callPackage ./immich/package.nix { }; - # }; + packages.${system} = { + rovr = pkgs.callPackage ./rovr { }; + # immich = pkgs.callPackage ./immich { }; + }; } diff --git a/pkgs/rovr/default.nix b/pkgs/rovr/default.nix new file mode 100644 index 0000000..27e0dcd --- /dev/null +++ b/pkgs/rovr/default.nix @@ -0,0 +1,74 @@ +{ pkgs }: + +let + python = pkgs.python314.override { + packageOverrides = self: super: { + textual = super.textual.overridePythonAttrs (old: rec { + version = "7.1.0"; + src = super.fetchPypi { + pname = "textual"; + inherit version; + sha256 = "sha256-PHFI7wCpJ3tF/Xihpq3HxBnEUdPtcUoLAVsW6qKopzs="; + }; + }); + }; + }; + + py = python.pkgs; + + textualDeps = with py; [ + textual + textual-autocomplete + textual-image + textual-speedups + ]; + + pythonDeps = with py; [ + ujson + prompt-toolkit + rich + fastjsonschema + humanize + natsort + pathvalidate + pdf2image + pillow + platformdirs + psutil + puremagic + rarfile + rich-click + send2trash + tomli + ]; + +in + +py.buildPythonApplication rec { + pname = "rovr"; + version = "0.7.0"; + + src = py.fetchPypi { + inherit pname version; + format = "wheel"; + dist = "py3"; + python = "py3"; + abi = "none"; + platform = "any"; + sha256 = "sha256-CMj3jepLSA2bMcl2r89HY/ghPXEIpF5RohkBkLj6iNw="; + }; + + format = "wheel"; + + propagatedBuildInputs = pythonDeps ++ textualDeps; + + nativeBuildInputs = [ pkgs.stdenv.cc.cc.lib ]; + + doCheck = false; + + meta = with pkgs.lib; { + description = "Terminal file manager rovr"; + homepage = "https://pypi.org/project/rovr/"; + license = licenses.mit; + }; +}