summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/flameshot-once/default.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2019-02-26 08:58:51 +0100
committermakefu <github@syntax-fehler.de>2019-02-26 08:58:51 +0100
commite437c7d17b4accf9c18d2aa17a0ec98a171d8f3f (patch)
treebbb65961d3eaaa7f14461383290db99f391bb6cb /krebs/5pkgs/simple/flameshot-once/default.nix
parent6da32a5952faf38c92c7b289cc6ae0881ec4aa36 (diff)
parent2db5d56cf2e252822f38900ef9436d7b118476a9 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'krebs/5pkgs/simple/flameshot-once/default.nix')
-rw-r--r--krebs/5pkgs/simple/flameshot-once/default.nix27
1 files changed, 27 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..c442a2e96
--- /dev/null
+++ b/krebs/5pkgs/simple/flameshot-once/default.nix
@@ -0,0 +1,27 @@
+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
+ pkgs.xclip
+ ]}
+ ${optionalString (config != null) /* sh */ ''
+ . ${import ./profile.nix { inherit config pkgs; }}
+ ''}
+ exec ${pkgs.haskellPackages.flameshot-once}/bin/flameshot-once "$@"
+ '')
+ pkgs.haskellPackages.flameshot-once
+ ];
+ }