Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 58 lines 2.5 kB view raw
1{ 2 buildLua, 3 fetchFromGitHub, 4 lib, 5 unstableGitUpdater, 6}: 7let 8 mkScript = 9 pname: args: 10 let 11 self = { 12 inherit pname; 13 version = "0-unstable-2024-11-23"; 14 src = fetchFromGitHub { 15 owner = "occivink"; 16 repo = "mpv-image-viewer"; 17 rev = "128b498e3e57a14deea5ca9bbf662f8c1ca79e8d"; 18 hash = "sha256-VwIL1529CW9MLK4N9jHHddSSZD5RsJ5bWGWqGJ751C0="; 19 }; 20 21 sourceRoot = "${self.src.name}/scripts"; 22 23 passthru = { 24 updateScript = unstableGitUpdater { }; 25 }; 26 27 meta = { 28 description = "Configuration, scripts and tips for using mpv as an image viewer"; 29 longDescription = '' 30 ${pname} is a component of mpv-image-viewer. 31 32 mpv-image-viewer aggregates configurations, scripts and tips for using 33 mpv as an image viewer. The affectionate nickname mvi is given to mpv in 34 such case. 35 36 Each mpv-image-viewer script can be used on its own without depending on 37 any of the others. Refer to the README and script-opts/ directory for 38 additional configuration tips or examples. 39 ''; 40 homepage = "https://github.com/occivink/mpv-image-viewer"; 41 license = lib.licenses.unlicense; 42 maintainers = with lib.maintainers; [ colinsane ]; 43 }; 44 }; 45 in 46 buildLua (lib.attrsets.recursiveUpdate self args); 47in 48lib.recurseIntoAttrs ( 49 lib.mapAttrs (name: lib.makeOverridable (mkScript name)) { 50 detect-image.meta.description = "Allows you to run specific commands when images are being displayed. Does not do anything by default, needs to be configured through detect_image.conf"; 51 equalizer = { }; 52 freeze-window.meta.description = "By default, mpv automatically resizes the window when the current file changes to fit its size. This script freezes the window so that this does not happen. There is no configuration"; 53 image-positioning.meta.description = "Adds several high-level commands to zoom and pan"; 54 minimap.meta.description = "Adds a minimap that displays the position of the image relative to the view"; 55 ruler.meta.description = "Adds a ruler command that lets you measure positions, distances and angles in the image. Can be configured through ruler.conf"; 56 status-line.meta.description = "Adds a status line that can show different properties in the corner of the window. By default it shows filename [positon/total] in the bottom left"; 57 } 58)