stockholm/tv/5pkgs/simple/flameshot-once/default.nix

29 lines
788 B
Nix
Raw Normal View History

2021-10-12 17:36:09 +00:00
{ pkgs, stockholm, ... }@args:
with stockholm.lib;
2019-02-08 16:46:32 +00:00
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
2019-02-09 01:33:58 +00:00
pkgs.xclip
2020-05-01 09:02:01 +00:00
pkgs.xwaitforwindow
2019-02-08 16:46:32 +00:00
]}
${optionalString (config != null) /* sh */ ''
. ${import ./profile.nix { inherit config pkgs; }}
''}
exec ${pkgs.haskellPackages.flameshot-once}/bin/flameshot-once "$@"
'')
pkgs.haskellPackages.flameshot-once
];
}