From 773db3ae47ff212c40f0cd22f9e47f66b7fe93ff Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 29 Jan 2019 20:51:11 +0100 Subject: reaktor2: 0.2.1 -> 0.2.2 --- krebs/5pkgs/haskell/reaktor2.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/haskell/reaktor2.nix b/krebs/5pkgs/haskell/reaktor2.nix index 40c628802..f06e79121 100644 --- a/krebs/5pkgs/haskell/reaktor2.nix +++ b/krebs/5pkgs/haskell/reaktor2.nix @@ -7,11 +7,11 @@ }: mkDerivation { pname = "reaktor2"; - version = "0.2.1"; + version = "0.2.2"; src = fetchgit { url = "https://cgit.krebsco.de/reaktor2"; - sha256 = "0wg76wlzfi893rl0lzhfs6bkpdcvwvgl6mpnz6w7r8f7znr4a9vr"; - rev = "0e199f7a357a4c5973e5837ec67699cf224ca69c"; + sha256 = "1kyr5i5zdzvc7fcyac1i1yvi88kcxafrgp8p79c1b9l4g9sjnv78"; + rev = "9f4e2644188f985d7cd806c13e2c0dee1688b9f0"; fetchSubmodules = true; }; isLibrary = false; -- cgit v1.2.3 From d3f9c8efccd2d6eca7d888c3ae19f2ab8fd58911 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 5 Feb 2019 21:11:09 +0100 Subject: blessings: 2.1.0 -> 2.2.0 --- krebs/5pkgs/haskell/blessings.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/haskell/blessings.nix b/krebs/5pkgs/haskell/blessings.nix index 97e4a717c..f730cc72b 100644 --- a/krebs/5pkgs/haskell/blessings.nix +++ b/krebs/5pkgs/haskell/blessings.nix @@ -1,5 +1,5 @@ with import ; -{ mkDerivation, base, fetchgit, stdenv }: let +{ mkDerivation, base, fetchgit, hspec, QuickCheck, stdenv, text }: let cfg = { "18.03" = { @@ -7,8 +7,8 @@ with import ; sha256 = "1k908zap3694fcxdk4bb29s54b0lhdh557y10ybjskfwnym7szn1"; }; "18.09" = { - version = "2.1.0"; - sha256 = "0wc8v48bb0bkvypc0j6imvnf8xc8572hykk9sgjhzf2w0ggqxv5d"; + version = "2.2.0"; + sha256 = "1pb56dgf3jj2kq3cbbppwzyg3ccgqy9xara62hkjwyxzdx20clk1"; }; }.${versions.majorMinor nixpkgsVersion}; @@ -20,7 +20,8 @@ in mkDerivation { rev = "refs/tags/v${cfg.version}"; sha256 = cfg.sha256; }; - libraryHaskellDepends = [ base ]; + libraryHaskellDepends = [ base text ]; + testHaskellDepends = [ base hspec QuickCheck ]; doHaddock = false; # WTFPL is the true license, which is unknown to cabal. license = stdenv.lib.licenses.wtfpl; -- cgit v1.2.3 From 24d008d92d24633054e37dd69f983512bf49a69d Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 7 Feb 2019 19:06:14 +0100 Subject: flameshot-once: init at 1.0.0 --- krebs/5pkgs/haskell/flameshot-once.nix | 20 ++++++++++++++++++++ krebs/5pkgs/simple/flameshot-once.nix | 14 ++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 krebs/5pkgs/haskell/flameshot-once.nix create mode 100644 krebs/5pkgs/simple/flameshot-once.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/haskell/flameshot-once.nix b/krebs/5pkgs/haskell/flameshot-once.nix new file mode 100644 index 000000000..b90dd2cb8 --- /dev/null +++ b/krebs/5pkgs/haskell/flameshot-once.nix @@ -0,0 +1,20 @@ +{ mkDerivation, async, base, blessings, dbus, fetchgit +, iso8601-time, process, stdenv, text, time, unagi-chan, unix +}: +mkDerivation { + pname = "flameshot-once"; + version = "1.0.0"; + src = fetchgit { + url = "https://cgit.krebsco.de/flameshot-once"; + sha256 = "0fjk5pgjy7r0xz4i38qb85x1z4jp8bas2mmgznp7glidz362w390"; + rev = "fb5636483871fbafe9b286b377c339c8ddf8b4f8"; + fetchSubmodules = true; + }; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + async base blessings dbus iso8601-time process text time unagi-chan + unix + ]; + license = stdenv.lib.licenses.mit; +} diff --git a/krebs/5pkgs/simple/flameshot-once.nix b/krebs/5pkgs/simple/flameshot-once.nix new file mode 100644 index 000000000..7550a4678 --- /dev/null +++ b/krebs/5pkgs/simple/flameshot-once.nix @@ -0,0 +1,14 @@ +{ pkgs }: + +pkgs.symlinkJoin { + name = "flameshot-once-wrapper"; + paths = [ + (pkgs.writeDashBin "flameshot-once" '' + export PATH=${pkgs.stdenv.lib.makeBinPath [ + pkgs.flameshot + ]}''${PATH:+:$PATH} + exec ${pkgs.haskellPackages.flameshot-once}/bin/flameshot-once "$@" + '') + pkgs.haskellPackages.flameshot-once + ]; +} -- cgit v1.2.3 From 76fd127a7f1bedd6951322b6401076dd4ee48a78 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 7 Feb 2019 22:09:51 +0100 Subject: flameshot-once: 1.0.0 -> 1.0.1 --- krebs/5pkgs/haskell/flameshot-once.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/haskell/flameshot-once.nix b/krebs/5pkgs/haskell/flameshot-once.nix index b90dd2cb8..aa0d94d8f 100644 --- a/krebs/5pkgs/haskell/flameshot-once.nix +++ b/krebs/5pkgs/haskell/flameshot-once.nix @@ -1,20 +1,21 @@ -{ mkDerivation, async, base, blessings, dbus, fetchgit -, iso8601-time, process, stdenv, text, time, unagi-chan, unix +{ mkDerivation, async, base, blessings, bytestring, dbus, fetchgit +, iso8601-time, process, random, stdenv, text, time, unagi-chan +, unix }: mkDerivation { pname = "flameshot-once"; - version = "1.0.0"; + version = "1.0.1"; src = fetchgit { url = "https://cgit.krebsco.de/flameshot-once"; - sha256 = "0fjk5pgjy7r0xz4i38qb85x1z4jp8bas2mmgznp7glidz362w390"; - rev = "fb5636483871fbafe9b286b377c339c8ddf8b4f8"; + sha256 = "01bsgadjk3y3lg19xcadlrqalr4cs028fsivgacqh31fqaq4v243"; + rev = "03623ce6c011c1e85df7d91aed4458c098ff22ff"; fetchSubmodules = true; }; isLibrary = false; isExecutable = true; executableHaskellDepends = [ - async base blessings dbus iso8601-time process text time unagi-chan - unix + async base blessings bytestring dbus iso8601-time process random + text time unagi-chan unix ]; license = stdenv.lib.licenses.mit; } -- cgit v1.2.3 From 7f40ff9b5c763f5706b8e71f3f618363b6cd9781 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 8 Feb 2019 17:26:44 +0100 Subject: flameshot-once: use qt5.qtbase --- krebs/5pkgs/simple/flameshot-once.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once.nix b/krebs/5pkgs/simple/flameshot-once.nix index 7550a4678..4cbc92a63 100644 --- a/krebs/5pkgs/simple/flameshot-once.nix +++ b/krebs/5pkgs/simple/flameshot-once.nix @@ -6,7 +6,8 @@ pkgs.symlinkJoin { (pkgs.writeDashBin "flameshot-once" '' export PATH=${pkgs.stdenv.lib.makeBinPath [ pkgs.flameshot - ]}''${PATH:+:$PATH} + pkgs.qt5.qtbase + ]} exec ${pkgs.haskellPackages.flameshot-once}/bin/flameshot-once "$@" '') pkgs.haskellPackages.flameshot-once -- cgit v1.2.3 From 1b526ec1a597882b7629e992c7579ee109282aa7 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 8 Feb 2019 17:46:32 +0100 Subject: flameshot-once: add config --- krebs/5pkgs/simple/flameshot-once.nix | 15 ---- krebs/5pkgs/simple/flameshot-once/default.nix | 26 ++++++ krebs/5pkgs/simple/flameshot-once/profile.nix | 123 ++++++++++++++++++++++++++ 3 files changed, 149 insertions(+), 15 deletions(-) delete mode 100644 krebs/5pkgs/simple/flameshot-once.nix create mode 100644 krebs/5pkgs/simple/flameshot-once/default.nix create mode 100644 krebs/5pkgs/simple/flameshot-once/profile.nix (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once.nix b/krebs/5pkgs/simple/flameshot-once.nix deleted file mode 100644 index 4cbc92a63..000000000 --- a/krebs/5pkgs/simple/flameshot-once.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ pkgs }: - -pkgs.symlinkJoin { - name = "flameshot-once-wrapper"; - paths = [ - (pkgs.writeDashBin "flameshot-once" '' - export PATH=${pkgs.stdenv.lib.makeBinPath [ - pkgs.flameshot - pkgs.qt5.qtbase - ]} - exec ${pkgs.haskellPackages.flameshot-once}/bin/flameshot-once "$@" - '') - pkgs.haskellPackages.flameshot-once - ]; -} 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 ; +{ 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 + ]; + } diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix new file mode 100644 index 000000000..bfe571ff5 --- /dev/null +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -0,0 +1,123 @@ +with import ; +{ config, pkgs }: +let + + # Refs https://github.com/lupoDharkael/flameshot/blob/master/src/widgets/capture/capturebutton.h + ButtonType = { + PENCIL = 0; + DRAWER = 1; + ARROW = 2; + SELECTION = 3; + RECTANGLE = 4; + CIRCLE = 5; + MARKER = 6; + SELECTIONINDICATOR = 7; + MOVESELECTION = 8; + UNDO = 9; + COPY = 10; + SAVE = 11; + EXIT = 12; + IMAGEUPLOADER = 13; + OPEN_APP = 14; + BLUR = 15; + REDO = 16; + PIN = 17; + TEXT = 18; + }; + + cfg = eval.config; + + eval = evalModules { + modules = singleton { + _file = toString ./config.nix; + imports = singleton config; + options = { + buttons = mkOption { + apply = map (name: ButtonType.${name}); + default = [ + "PENCIL" + "DRAWER" + "ARROW" + "SELECTION" + "RECTANGLE" + "CIRCLE" + "MARKER" + "SELECTIONINDICATOR" + "MOVESELECTION" + "UNDO" + "COPY" + "SAVE" + "EXIT" + "BLUR" + ]; + type = types.listOf (types.enum (attrNames ButtonType)); + }; + disabledTrayIcon = mkOption { + default = true; + type = types.bool; + }; + drawThickness = mkOption { + default = 8; + type = types.positive; + }; + savePath = mkOption { + default = "/tmp"; + type = types.absolute-pathname; + }; + showDesktopNotification = mkOption { + default = false; + type = types.bool; + }; + showHelp = mkOption { + default = false; + type = types.bool; + }; + }; + }; + }; + + hexchars = stringToCharacters "0123456789abcdef"; + + # Encode integer to C-escaped string of bytes, little endian / LSB 0 + le = rec { + x1 = i: let + i0 = mod i 16; + i1 = i / 16; + in + "\\x${elemAt hexchars i1}${elemAt hexchars i0}"; + + x2 = i: let + i0 = mod i 256; + i1 = i / 256; + in + "${x1 i0}${x1 i1}"; + + x4 = i: let + i0 = mod i 65536; + i1 = i / 65536; + in + "${x2 i0}${x2 i1}"; + }; + + toQList = t: xs: + assert t == "int"; + "QList<${t}>${le.x4 0}${le.x4 (length xs)}${concatMapStrings le.x4 xs}"; + + XDG_CONFIG_HOME = pkgs.write "flameshot-config" { + "/Dharkael/flameshot.ini".text = '' + [General] + buttons=@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" cfg.buttons}) + disabledTrayIcon=${toJSON cfg.disabledTrayIcon} + drawThickness=${toJSON cfg.drawThickness} + savePath=${toJSON cfg.savePath} + showDesktopNotification=${toJSON cfg.showDesktopNotification} + showHelp=${toJSON cfg.showHelp} + ''; + }; + +in + + pkgs.writeDash "flameshot.profile" '' + export FLAMESHOT_CAPTURE_PATH=${cfg.savePath} + export XDG_CONFIG_HOME=${XDG_CONFIG_HOME} + '' -- cgit v1.2.3 From f9496394975782a3aee0998a9a6d5882b67c0901 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 9 Feb 2019 02:34:32 +0100 Subject: flameshot-once: make filenamePattern configurable --- krebs/5pkgs/simple/flameshot-once/profile.nix | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index bfe571ff5..69adb240d 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -60,6 +60,12 @@ let default = 8; type = types.positive; }; + filenamePattern = mkOption { + default = "%FT%T%z_flameshot.png"; + type = + # This is types.filename extended by [%:][%:+]* + types.addCheck types.str (test "[%:0-9A-Za-z._][%:+0-9A-Za-z._-]*"); + }; savePath = mkOption { default = "/tmp"; type = types.absolute-pathname; @@ -109,6 +115,7 @@ let buttons=@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" cfg.buttons}) disabledTrayIcon=${toJSON cfg.disabledTrayIcon} drawThickness=${toJSON cfg.drawThickness} + filenamePattern=${toJSON cfg.filenamePattern} savePath=${toJSON cfg.savePath} showDesktopNotification=${toJSON cfg.showDesktopNotification} showHelp=${toJSON cfg.showHelp} -- cgit v1.2.3 From e29debea42379fcb529057edf1963928466b0181 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 9 Feb 2019 02:33:58 +0100 Subject: flameshot-once: 1.0.1 -> 1.1.0 --- krebs/5pkgs/haskell/flameshot-once.nix | 6 +++--- krebs/5pkgs/simple/flameshot-once/default.nix | 1 + krebs/5pkgs/simple/flameshot-once/profile.nix | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/haskell/flameshot-once.nix b/krebs/5pkgs/haskell/flameshot-once.nix index aa0d94d8f..89b95ca07 100644 --- a/krebs/5pkgs/haskell/flameshot-once.nix +++ b/krebs/5pkgs/haskell/flameshot-once.nix @@ -4,11 +4,11 @@ }: mkDerivation { pname = "flameshot-once"; - version = "1.0.1"; + version = "1.1.0"; src = fetchgit { url = "https://cgit.krebsco.de/flameshot-once"; - sha256 = "01bsgadjk3y3lg19xcadlrqalr4cs028fsivgacqh31fqaq4v243"; - rev = "03623ce6c011c1e85df7d91aed4458c098ff22ff"; + sha256 = "158ha1yyj3p3mdjjga62j91ml83nhrsg34xbg3dir5cb399j8pxx"; + rev = "9d688b6ffad14912bd1afe42555747cb3d213d95"; fetchSubmodules = true; }; isLibrary = false; diff --git a/krebs/5pkgs/simple/flameshot-once/default.nix b/krebs/5pkgs/simple/flameshot-once/default.nix index 344c5b90a..c442a2e96 100644 --- a/krebs/5pkgs/simple/flameshot-once/default.nix +++ b/krebs/5pkgs/simple/flameshot-once/default.nix @@ -15,6 +15,7 @@ in export PATH=${makeBinPath [ pkgs.flameshot pkgs.qt5.qtbase + pkgs.xclip ]} ${optionalString (config != null) /* sh */ '' . ${import ./profile.nix { inherit config pkgs; }} diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index 69adb240d..4fcbd62c0 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -45,7 +45,6 @@ let "SELECTIONINDICATOR" "MOVESELECTION" "UNDO" - "COPY" "SAVE" "EXIT" "BLUR" -- cgit v1.2.3 From 4e81d40e30ef2582d4566af171066bd675af7aa2 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 16 Feb 2019 17:47:12 +0100 Subject: flameshot-once: default filenamePattern w/o .png --- krebs/5pkgs/simple/flameshot-once/profile.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/flameshot-once/profile.nix b/krebs/5pkgs/simple/flameshot-once/profile.nix index 4fcbd62c0..7373da00a 100644 --- a/krebs/5pkgs/simple/flameshot-once/profile.nix +++ b/krebs/5pkgs/simple/flameshot-once/profile.nix @@ -60,7 +60,7 @@ let type = types.positive; }; filenamePattern = mkOption { - default = "%FT%T%z_flameshot.png"; + default = "%FT%T%z_flameshot"; type = # This is types.filename extended by [%:][%:+]* types.addCheck types.str (test "[%:0-9A-Za-z._][%:+0-9A-Za-z._-]*"); -- cgit v1.2.3 From 3a262f1c24df23536e4a5f7d4346a4c240fde849 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 16 Feb 2019 18:15:13 +0100 Subject: symlinkJoin: remove compatibility This reverts commit f46b3153c0c85883c9b3a98291f6d440f83bd717. --- krebs/5pkgs/default.nix | 5 ----- 1 file changed, 5 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index dc04b6a72..387f3896b 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -31,9 +31,4 @@ foldl' mergeAttrs {} export PROOT_NO_SECCOMP=1 exec ${super.proot}/bin/proot "$@" ''; - - # XXX symlinkJoin changed arguments somewhere around nixpkgs d541e0d - symlinkJoin = { name, paths, ... }@args: let - x = super.symlinkJoin args; - in if typeOf x != "lambda" then x else super.symlinkJoin name paths; } -- cgit v1.2.3 From 6f6e18d22fe8cacbd9567bcebd092f07f27716e8 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 16 Feb 2019 18:49:26 +0100 Subject: Revert "brscan4: init at 0.4.4-4" This reverts commit 1993cbc42114c759a47fed8de1e73980d3df57d9. --- krebs/5pkgs/default.nix | 9 --------- 1 file changed, 9 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index 387f3896b..4cdaedebf 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -13,15 +13,6 @@ foldl' mergeAttrs {} // { - # https://github.com/NixOS/nixpkgs/pull/30065 - brscan4 = overrideDerivation super.brscan4 (original: rec { - name = "brscan4-0.4.4-4"; - src = super.fetchurl { - url = "http://download.brother.com/welcome/dlf006645/${name}.amd64.deb"; - sha256 = "0xy5px96y1saq9l80vwvfn6anr2q42qlxdhm6ci2a0diwib5q9fd"; - }; - }); - reaktor2 = self.haskellPackages.reaktor2; ReaktorPlugins = self.callPackage ./simple/Reaktor/plugins.nix {}; -- cgit v1.2.3 From c6b863a403b81bf47d14702ac57533e1f179d760 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 17 Feb 2019 18:19:13 +0100 Subject: Reaktor: 0.7.0 -> 0.7.1 --- krebs/5pkgs/simple/Reaktor/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'krebs/5pkgs') diff --git a/krebs/5pkgs/simple/Reaktor/default.nix b/krebs/5pkgs/simple/Reaktor/default.nix index a88db6379..1cc498a68 100644 --- a/krebs/5pkgs/simple/Reaktor/default.nix +++ b/krebs/5pkgs/simple/Reaktor/default.nix @@ -2,7 +2,7 @@ python3Packages.buildPythonPackage rec { name = "Reaktor-${version}"; - version = "0.7.0"; + version = "0.7.1"; doCheck = false; @@ -14,7 +14,7 @@ python3Packages.buildPythonPackage rec { owner = "krebs"; repo = "Reaktor"; rev = "v${version}"; - sha256 = "12yy06vk0smjs0rmahrn2kd4bcdh1yjw1fz6rifw6nmgx889d9hj"; + sha256 = "0cv5a4x73ls6sk8qj2qi6gqn31rv8kvdg13dsf3jv92xdfx6brjn"; }; meta = { homepage = http://krebsco.de/; -- cgit v1.2.3