diff options
author | tv <tv@krebsco.de> | 2019-02-08 17:46:32 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2019-02-09 13:43:27 +0100 |
commit | 1b526ec1a597882b7629e992c7579ee109282aa7 (patch) | |
tree | ce8190a5b36e4bc3659c1aef1de09608bd1efaf2 /krebs/5pkgs/simple/flameshot-once/default.nix | |
parent | 7f40ff9b5c763f5706b8e71f3f618363b6cd9781 (diff) |
flameshot-once: add config
Diffstat (limited to 'krebs/5pkgs/simple/flameshot-once/default.nix')
-rw-r--r-- | krebs/5pkgs/simple/flameshot-once/default.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/krebs/5pkgs/simple/flameshot-once/default.nix b/krebs/5pkgs/simple/flameshot-once/default.nix new file mode 100644 index 000000000..344c5b90a --- /dev/null +++ b/krebs/5pkgs/simple/flameshot-once/default.nix @@ -0,0 +1,26 @@ +with import <stockholm/lib>; +{ pkgs, ... }@args: + +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 + ]} + ${optionalString (config != null) /* sh */ '' + . ${import ./profile.nix { inherit config pkgs; }} + ''} + exec ${pkgs.haskellPackages.flameshot-once}/bin/flameshot-once "$@" + '') + pkgs.haskellPackages.flameshot-once + ]; + } |