Not in nixpkgs — upstream ships a shell launcher + QML tree with no build step, driven entirely by `qs -p <dir>`. Packaged as a stdenvNoCC derivation that wraps the launcher with RISHOT_CONFIG_DIR (sidesteps its argv0-relative self-lookup, which wrapProgram breaks) and its runtime deps on PATH. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
68 lines
1.8 KiB
Nix
68 lines
1.8 KiB
Nix
{ lib
|
|
, stdenvNoCC
|
|
, fetchFromGitHub
|
|
, makeWrapper
|
|
, quickshell
|
|
, wl-clipboard
|
|
, imagemagick
|
|
, cliphist
|
|
, curl
|
|
, kdePackages
|
|
, libnotify
|
|
}:
|
|
|
|
# Wayland screenshot + annotation overlay, driven entirely by quickshell (qs -p
|
|
# <dir>) rather than compiled — upstream ships bin/rishot (a shell launcher)
|
|
# plus src/*.qml, no nixpkgs package exists. bin/rishot resolves its QML dir at
|
|
# $self/../src by default, which breaks once wrapProgram rewrites argv0; setting
|
|
# RISHOT_CONFIG_DIR sidesteps that self-lookup entirely (see bin/rishot upstream).
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "rishot";
|
|
version = "0-unstable-2026-07-10";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Gakuseei";
|
|
repo = "rishot";
|
|
rev = "a87427a9083981315a080133636c38d8ca565d0e";
|
|
hash = "sha256-FR7x4zAuCRKkPjU28r55JrlbbEd59S8wtIA+D/ooEeE=";
|
|
};
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
dontBuild = true;
|
|
dontConfigure = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 bin/rishot "$out/bin/rishot"
|
|
mkdir -p "$out/share/rishot"
|
|
cp -r src "$out/share/rishot/src"
|
|
|
|
install -Dm644 rishot.desktop "$out/share/applications/rishot.desktop"
|
|
install -Dm644 packaging/rishot.svg "$out/share/icons/hicolor/scalable/apps/rishot.svg"
|
|
|
|
wrapProgram "$out/bin/rishot" \
|
|
--set RISHOT_CONFIG_DIR "$out/share/rishot/src" \
|
|
--prefix PATH : ${lib.makeBinPath [
|
|
quickshell
|
|
wl-clipboard
|
|
imagemagick
|
|
cliphist
|
|
curl
|
|
kdePackages.kdialog
|
|
libnotify
|
|
]}
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = {
|
|
description = "Wayland screenshot + annotation overlay built on quickshell";
|
|
homepage = "https://github.com/Gakuseei/rishot";
|
|
license = lib.licenses.mit;
|
|
platforms = lib.platforms.linux;
|
|
mainProgram = "rishot";
|
|
};
|
|
})
|