Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 70 lines 1.3 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 fetchFromGitHub, 5 makeWrapper, 6 scdoc, 7 coreutils, 8 grim, 9 hyprland, 10 hyprpicker, 11 jq, 12 libnotify, 13 slurp, 14 wl-clipboard, 15 bash, 16 nix-update-script, 17}: 18 19stdenvNoCC.mkDerivation (finalAttrs: { 20 pname = "grimblast"; 21 version = "0.1-unstable-2025-07-18"; 22 23 src = fetchFromGitHub { 24 owner = "hyprwm"; 25 repo = "contrib"; 26 rev = "481175e17e155f19a3b31416530b6edf725e7034"; 27 hash = "sha256-usBNOT/uzFdsKDe5Ik+C36zqL+BfT7Lp2rqKWrpQuqk="; 28 }; 29 30 strictDeps = true; 31 32 nativeBuildInputs = [ 33 makeWrapper 34 scdoc 35 ]; 36 37 buildInputs = [ bash ]; 38 39 makeFlags = [ 40 "PREFIX=$(out)" 41 ]; 42 43 sourceRoot = "${finalAttrs.src.name}/grimblast"; 44 45 postInstall = '' 46 wrapProgram $out/bin/grimblast --prefix PATH ':' \ 47 "${ 48 lib.makeBinPath [ 49 coreutils 50 grim 51 hyprland 52 hyprpicker 53 jq 54 libnotify 55 slurp 56 wl-clipboard 57 ] 58 }" 59 ''; 60 61 passthru.updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; }; 62 63 meta = with lib; { 64 description = "Helper for screenshots within Hyprland, based on grimshot"; 65 license = licenses.mit; 66 platforms = platforms.unix; 67 teams = [ lib.teams.hyprland ]; 68 mainProgram = "grimblast"; 69 }; 70})