From 880eb5310d3ddf8da4907aadb7ecdf45f2f892d3 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 3 Feb 2023 13:15:23 +0100 Subject: flameshot-once: move to tv --- tv/5pkgs/simple/flameshot-once/default.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tv/5pkgs/simple/flameshot-once/default.nix (limited to 'tv/5pkgs/simple/flameshot-once/default.nix') diff --git a/tv/5pkgs/simple/flameshot-once/default.nix b/tv/5pkgs/simple/flameshot-once/default.nix new file mode 100644 index 0000000..0524c2c --- /dev/null +++ b/tv/5pkgs/simple/flameshot-once/default.nix @@ -0,0 +1,28 @@ +{ pkgs, stockholm, ... }@args: +with stockholm.lib; + +let + # config cannot be declared in the input attribute set because that would + # cause callPackage to inject the wrong config. Instead, get it from ... + # via args. + config = args.config or {}; +in + + pkgs.symlinkJoin { + name = "flameshot-once-wrapper"; + paths = [ + (pkgs.writeDashBin "flameshot-once" '' + export PATH=${makeBinPath [ + pkgs.flameshot + pkgs.qt5.qtbase + pkgs.xclip + pkgs.xwaitforwindow + ]} + ${optionalString (config != null) /* sh */ '' + . ${import ./profile.nix { inherit config pkgs; }} + ''} + exec ${pkgs.haskellPackages.flameshot-once}/bin/flameshot-once "$@" + '') + pkgs.haskellPackages.flameshot-once + ]; + } -- cgit v1.2.3