diff options
| author | tv <tv@krebsco.de> | 2023-02-03 13:15:23 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2023-02-03 13:15:23 +0100 |
| commit | 880eb5310d3ddf8da4907aadb7ecdf45f2f892d3 (patch) | |
| tree | 9af622a6a6c324452592c2672ff145b77bede3c0 /tv/5pkgs/simple/flameshot-once/default.nix | |
| parent | 831690c3f89bd32fb66667a5a844f87a60164174 (diff) | |
flameshot-once: move to tv
Diffstat (limited to 'tv/5pkgs/simple/flameshot-once/default.nix')
| -rw-r--r-- | tv/5pkgs/simple/flameshot-once/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
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 + ]; + } |
