summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r--krebs/5pkgs/haskell/X11-aeson.nix13
-rw-r--r--krebs/5pkgs/haskell/email-header.nix46
-rw-r--r--krebs/5pkgs/haskell/kirk.nix22
-rw-r--r--krebs/5pkgs/haskell/mailaids.nix21
-rw-r--r--krebs/5pkgs/haskell/nix-serve-ng.nix30
-rw-r--r--krebs/5pkgs/haskell/purebred-email/default.nix30
-rw-r--r--krebs/5pkgs/haskell/purebred-email/untweak-mime-version-header.patch65
-rw-r--r--krebs/5pkgs/haskell/scanner.nix13
-rw-r--r--krebs/5pkgs/haskell/xmonad-aeson.nix13
-rw-r--r--krebs/5pkgs/haskell/xmonad-stockholm.nix18
-rw-r--r--krebs/5pkgs/simple/flameshot-once/config.nix416
-rw-r--r--krebs/5pkgs/simple/flameshot-once/default.nix149
-rw-r--r--krebs/5pkgs/simple/flameshot-once/flameshot/default.nix17
-rw-r--r--krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.applauncher.patch26
-rw-r--r--krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.history.patch28
-rw-r--r--krebs/5pkgs/simple/flameshot-once/flameshot/flameshot-12.imgur.patch43
16 files changed, 0 insertions, 950 deletions
diff --git a/krebs/5pkgs/haskell/X11-aeson.nix b/krebs/5pkgs/haskell/X11-aeson.nix
deleted file mode 100644
index 103d87faa..000000000
--- a/krebs/5pkgs/haskell/X11-aeson.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ mkDerivation, aeson, base, fetchgit, lib, X11 }:
-mkDerivation {
- pname = "X11-aeson";
- version = "1.0.0";
- src = fetchgit {
- url = "https://cgit.krebsco.de/X11-aeson";
- sha256 = "0y9nvssqpvqgl46g7nz9738l8jmpa7an8r3am3qaqcvmvzgwxh0d";
- rev = "c0a70a62513baf2b437db4ebe3e5a32e3cfa5905";
- fetchSubmodules = true;
- };
- libraryHaskellDepends = [ aeson base X11 ];
- license = lib.licenses.mit;
-}
diff --git a/krebs/5pkgs/haskell/email-header.nix b/krebs/5pkgs/haskell/email-header.nix
deleted file mode 100644
index f8ce03f39..000000000
--- a/krebs/5pkgs/haskell/email-header.nix
+++ /dev/null
@@ -1,46 +0,0 @@
-{ mkDerivation, attoparsec, base, base64-bytestring, bytestring
-, case-insensitive, containers, exceptions, fetchgit, QuickCheck
-, lib, stockholm, tasty, tasty-quickcheck, text, text-icu, time
-}:
-with stockholm.lib;
-
-let
-
- cfg = {
- "18.03" = {
- version = "0.3.0";
- rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8";
- sha256 = "12j2n3sbvzjnw99gga7kkdygm8n3qx2lh8q26ad6a53xm5whnz59";
- };
- "20.03" = {
- version = "0.4.1-tv1";
- rev = "refs/tags/v${cfg.version}";
- sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x";
- };
- }.${versions.majorMinor version} or {
- version = "0.4.2-tv1";
- rev = "refs/tags/v${cfg.version}";
- sha256 = "JZfqvkbb/1t0q1iWmZHmmCN2Vr+QKTiq4LVncrG+xMU=";
- };
-
-in mkDerivation {
- pname = "email-header";
- version = cfg.version;
- src = fetchgit {
- url = "https://github.com/4z3/email-header";
- rev = cfg.rev;
- sha256 = cfg.sha256;
- };
- buildDepends = [
- attoparsec base base64-bytestring bytestring case-insensitive
- containers exceptions text text-icu time
- ];
- testDepends = [
- base bytestring case-insensitive containers QuickCheck tasty
- tasty-quickcheck text time
- ];
- jailbreak = true;
- homepage = "http://github.com/knrafto/email-header";
- description = "Parsing and rendering of email and MIME headers";
- license = lib.licenses.bsd3;
-}
diff --git a/krebs/5pkgs/haskell/kirk.nix b/krebs/5pkgs/haskell/kirk.nix
deleted file mode 100644
index d6fdec4c9..000000000
--- a/krebs/5pkgs/haskell/kirk.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ mkDerivation, async, base, bytestring, fetchgit, lib, network
-, optparse-applicative, text
-}:
-mkDerivation {
- pname = "kirk";
- version = "1.0.1";
- src = fetchgit {
- url = "http://cgit.krebsco.de/kirk";
- sha256 = "1acsmmc485c54axpy9bd0320j18hs261vl1vdxns4n04sxzqd7k0";
- rev = "cdf3cb373af8f9b03a9487a63eb32e0226913589";
- fetchSubmodules = true;
- };
- isLibrary = true;
- isExecutable = true;
- libraryHaskellDepends = [
- base bytestring network optparse-applicative text
- ];
- executableHaskellDepends = [
- async base network optparse-applicative text
- ];
- license = lib.licenses.mit;
-}
diff --git a/krebs/5pkgs/haskell/mailaids.nix b/krebs/5pkgs/haskell/mailaids.nix
deleted file mode 100644
index 91b4cc451..000000000
--- a/krebs/5pkgs/haskell/mailaids.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ mkDerivation, aeson, aeson-pretty, base, bytestring
-, case-insensitive, fetchgit, lens, lib, optparse-applicative
-, purebred-email, text, vector, word8
-}:
-mkDerivation {
- pname = "mailaids";
- version = "1.1.0";
- src = fetchgit {
- url = "https://cgit.krebsco.de/mailaids";
- sha256 = "0mkq3b0j28h7ydg6aaqlqnvajb8nhdc9g7rmil2d4vl5fxxaqspv";
- rev = "a25fc32eceefc10a91ef77ff2763b3f1b9324aaf";
- fetchSubmodules = true;
- };
- isLibrary = false;
- isExecutable = true;
- executableHaskellDepends = [
- aeson aeson-pretty base bytestring case-insensitive lens
- optparse-applicative purebred-email text vector word8
- ];
- license = lib.licenses.mit;
-}
diff --git a/krebs/5pkgs/haskell/nix-serve-ng.nix b/krebs/5pkgs/haskell/nix-serve-ng.nix
deleted file mode 100644
index 62e02ce82..000000000
--- a/krebs/5pkgs/haskell/nix-serve-ng.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ mkDerivation, async, base, base16, base32, bytestring, charset
-, fetchgit, http-client, http-types, lib, managed, megaparsec, mtl
-, network, nix, optparse-applicative, tasty-bench, temporary, text
-, turtle, vector, wai, wai-extra, warp, warp-tls
-, boost
-}:
-mkDerivation {
- pname = "nix-serve-ng";
- version = "1.0.1";
- src = fetchgit {
- url = "https://github.com/aristanetworks/nix-serve-ng";
- sha256 = "sha256-PkzwtjUgYuqfWtCH1nRqVRaajihN1SqMVjWmoSG/CCY=";
- rev = "9b546864f4090736f3f9069a01ea5d42cf7bab7c";
- fetchSubmodules = true;
- };
- isLibrary = false;
- isExecutable = true;
- executableHaskellDepends = [
- base base16 base32 bytestring charset http-types managed megaparsec
- mtl network optparse-applicative vector wai wai-extra warp warp-tls
- ];
- executablePkgconfigDepends = [ nix ];
- executableSystemDepends = [ boost.dev ];
- benchmarkHaskellDepends = [
- async base bytestring http-client tasty-bench temporary text turtle
- vector
- ];
- description = "A drop-in replacement for nix-serve that's faster and more stable";
- license = lib.licenses.bsd3;
-}
diff --git a/krebs/5pkgs/haskell/purebred-email/default.nix b/krebs/5pkgs/haskell/purebred-email/default.nix
deleted file mode 100644
index 62fc82183..000000000
--- a/krebs/5pkgs/haskell/purebred-email/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ mkDerivation, attoparsec, base, base64-bytestring, bytestring
-, case-insensitive, concise, deepseq, fetchgit, hedgehog, lens, lib
-, QuickCheck, quickcheck-instances, random, semigroupoids
-, stringsearch, tasty, tasty-golden, tasty-hedgehog, tasty-hunit
-, tasty-quickcheck, text, time
-}:
-mkDerivation {
- pname = "purebred-email";
- version = "0.5.1";
- src = fetchgit {
- url = "https://github.com/purebred-mua/purebred-email";
- sha256 = "0iilyy5dkbzbiazyyfjdz585c3x8b7c2piynmycm7krkc48993vw";
- rev = "7ba346e10ad1521a923bc04a4ffeca479d8dd071";
- fetchSubmodules = true;
- };
- isLibrary = true;
- isExecutable = true;
- libraryHaskellDepends = [
- attoparsec base base64-bytestring bytestring case-insensitive
- concise deepseq lens random semigroupoids stringsearch text time
- ];
- testHaskellDepends = [
- attoparsec base bytestring case-insensitive hedgehog lens
- QuickCheck quickcheck-instances random tasty tasty-golden
- tasty-hedgehog tasty-hunit tasty-quickcheck text time
- ];
- homepage = "https://github.com/purebred-mua/purebred-email";
- description = "types and parser for email messages (including MIME)";
- license = lib.licenses.agpl3Plus;
-}
diff --git a/krebs/5pkgs/haskell/purebred-email/untweak-mime-version-header.patch b/krebs/5pkgs/haskell/purebred-email/untweak-mime-version-header.patch
deleted file mode 100644
index 97baf7ac1..000000000
--- a/krebs/5pkgs/haskell/purebred-email/untweak-mime-version-header.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-diff --git a/src/Data/MIME.hs b/src/Data/MIME.hs
-index 19af53e..be8cbd4 100644
---- a/src/Data/MIME.hs
-+++ b/src/Data/MIME.hs
-@@ -810,7 +810,6 @@ multipart takeTillEnd boundary =
- -- | Sets the @MIME-Version: 1.0@ header.
- --
- instance RenderMessage MIME where
-- tweakHeaders = set (headers . at "MIME-Version") (Just "1.0")
- buildBody h z = Just $ case z of
- Part partbody -> Builder.byteString partbody
- Encapsulated msg -> buildMessage msg
-diff --git a/tests/Generator.hs b/tests/Generator.hs
-index 9e1f166..23bd122 100644
---- a/tests/Generator.hs
-+++ b/tests/Generator.hs
-@@ -64,7 +64,7 @@ exampleMailsParseSuccessfully =
- textPlain7bit :: MIMEMessage
- textPlain7bit =
- let m = createTextPlainMessage "This is a simple mail."
-- in over headers (\(Headers xs) -> Headers $ (CI.mk "Subject", "Hello there") : xs) m
-+ in over headers (\(Headers xs) -> Headers $ (CI.mk "MIME-Version", "1.0") : (CI.mk "Subject", "Hello there") : xs) m
-
- multiPartMail :: MIMEMessage
- multiPartMail =
-@@ -72,13 +72,16 @@ multiPartMail =
- to' = Single $ Mailbox Nothing (AddrSpec "bar" (DomainDotAtom $ pure "bar.com"))
- subject = "Hello there"
- p = createTextPlainMessage "This is a simple mail."
-+ & set (headers . at "MIME-Version") (Just "1.0")
- a = createAttachment
- contentTypeApplicationOctetStream
- (Just "foo.bin")
- "fileContentsASDF"
-+ & set (headers . at "MIME-Version") (Just "1.0")
- now = UTCTime (ModifiedJulianDay 123) (secondsToDiffTime 123)
- in createMultipartMixedMessage "asdf" (fromList [p, a])
-- & set (headers . at "From") (Just $ renderMailboxes [from'])
-+ & set (headers . at "MIME-Version") (Just "1.0")
-+ . set (headers . at "From") (Just $ renderMailboxes [from'])
- . set (headers . at "To") (Just $ renderAddresses [to'])
- . set (headers . at "Date") (Just $ renderRFC5422Date now)
- . set (headers . at "Subject") (Just $ T.encodeUtf8 subject)
-diff --git a/tests/Message.hs b/tests/Message.hs
-index 6711519..3e40397 100644
---- a/tests/Message.hs
-+++ b/tests/Message.hs
-@@ -29,7 +29,7 @@ import Data.Char (isPrint)
- import Data.Foldable (fold)
- import Data.List.NonEmpty (NonEmpty(..), intersperse)
-
--import Control.Lens (set, view)
-+import Control.Lens ((&), at, set, view)
- import qualified Data.ByteString as B
- import qualified Data.Text as T
-
-@@ -99,7 +99,7 @@ genMessage = Gen.choice [ genTextPlain, genMultipart, encapsulate <$> genMessage
- prop_messageRoundTrip :: Property
- prop_messageRoundTrip = property $ do
- msg <- forAll genMessage
-- parse (message mime) (renderMessage msg) === Right msg
-+ parse (message mime) (renderMessage $ msg & set (headers . at "MIME-Version") (Just "1.0")) === Right msg
-
- prop_messageFromRoundTrip :: Property
- prop_messageFromRoundTrip = property $ do
diff --git a/krebs/5pkgs/haskell/scanner.nix b/krebs/5pkgs/haskell/scanner.nix
deleted file mode 100644
index a317e575e..000000000
--- a/krebs/5pkgs/haskell/scanner.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ mkDerivation, base, fetchgit, lib }:
-mkDerivation {
- pname = "scanner";
- version = "1.0.1";
- src = fetchgit {
- url = "http://cgit.ni.krebsco.de/scanner";
- sha256 = "1lgl158axczsm4fx53fyq1d4116v91jsx4dbz66ka4k1ljqrmhgn";
- rev = "7f091a3bc152ad3974a1873b460fa1759bf8dcad";
- fetchSubmodules = true;
- };
- libraryHaskellDepends = [ base ];
- license = lib.licenses.mit;
-}
diff --git a/krebs/5pkgs/haskell/xmonad-aeson.nix b/krebs/5pkgs/haskell/xmonad-aeson.nix
deleted file mode 100644
index d27f9c783..000000000
--- a/krebs/5pkgs/haskell/xmonad-aeson.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ mkDerivation, aeson, base, fetchgit, lib, X11-aeson, xmonad }:
-mkDerivation {
- pname = "xmonad-aeson";
- version = "1.0.0";
- src = fetchgit {
- url = "https://cgit.krebsco.de/xmonad-aeson";
- sha256 = "0l1gna6p1498vzm6kj0ywj0i7775mz5n7k9nymwggvfb1pyxv3h9";
- rev = "a95f652b150f17db3f2439214a6346335d6d8d89";
- fetchSubmodules = true;
- };
- libraryHaskellDepends = [ aeson base X11-aeson xmonad ];
- license = lib.licenses.mit;
-}
diff --git a/krebs/5pkgs/haskell/xmonad-stockholm.nix b/krebs/5pkgs/haskell/xmonad-stockholm.nix
deleted file mode 100644
index c43dbe271..000000000
--- a/krebs/5pkgs/haskell/xmonad-stockholm.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{ mkDerivation, base, containers, directory, fetchgit, filepath
-, lib, unix, X11, X11-xft, X11-xshape, xmonad, xmonad-contrib
-}:
-mkDerivation {
- pname = "xmonad-stockholm";
- version = "1.3.1";
- src = fetchgit {
- url = "https://cgit.krebsco.de/xmonad-stockholm";
- sha256 = "1m4kkppy143jvjzhy5aawh8q6sglpnqhiajxbdcr42j02ibf3vvq";
- rev = "89bae8aad73db8fe9e11da7d515f0b236e7fea51";
- fetchSubmodules = true;
- };
- libraryHaskellDepends = [
- base containers directory filepath unix X11 X11-xft X11-xshape
- xmonad xmonad-contrib
- ];
- license = lib.licenses.mit;
-}
diff --git a/krebs/5pkgs/simple/flameshot-once/config.nix b/krebs/5pkgs/simple/flameshot-once/config.nix
deleted file mode 100644
index 24df403aa..000000000
--- a/krebs/5pkgs/simple/flameshot-once/config.nix
+++ /dev/null
@@ -1,416 +0,0 @@
-{ config, pkgs, ... }:
-with pkgs.stockholm.lib;
-
-let
- # 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
- if i == 0 then
- "\\0"
- else if i < 16 then
- "\\x${elemAt hexchars i0}"
- else
- "\\x${elemAt hexchars i1}${elemAt hexchars i0}";
-
- x2 = i: let
- i0 = mod i 256;
- i1 = i / 256;
- in
- "${x1 i1}${x1 i0}";
-
- x4 = i: let
- i0 = mod i 65536;
- i1 = i / 65536;
- in
- "${x2 i1}${x2 i0}";
- };
-
- toQList = t: xs:
- assert t == "int";
- "QList<${t}>${le.x4 0}${le.x1 (length xs)}${concatMapStrings le.x4 xs}";
-in
-
-{
- options = {
- imgur = mkOption {
- default = {};
- type = types.submodule {
- options = {
- enable = mkEnableOption "imgur";
- createUrl = mkOption {
- example = "http://p.r/image";
- type = types.str;
- };
- deleteUrl = mkOption {
- example = "http://p.r/image/delete/%1";
- type = types.str;
- };
- xdg-open = mkOption {
- default = {};
- type = types.submodule {
- options = {
- enable = mkEnableOption "imgur.xdg-open" // {
- default = true;
- };
- browser = mkOption {
- default = "${pkgs.coreutils}/bin/false";
- type = types.str;
- };
- createPrefix = mkOption {
- default = config.imgur.createUrl;
- type = types.str;
- };
- deletePrefix = mkOption {
- default = removeSuffix "/%1" config.imgur.deleteUrl;
- type = types.str;
- };
- };
- };
- };
- };
- };
- };
- package = mkOption {
- type = types.package;
- default = import ./flameshot { inherit pkgs; };
- };
- settings = {
- # Options without a description are not documented in flameshot's README.
- # Compare with:
- # nix-shell -p flameshot-once.dev --run get-recognizedGeneralOptions
- General = mapAttrs (_: recursiveUpdate { default = null; }) {
- allowMultipleGuiInstances = mkOption {
- description = ''
- Allow multiple instances of `flameshot gui` to run at the same time
- '';
- type = with types; nullOr bool;
- };
- antialiasingPinZoom = mkOption {
- description = ''
- Anti-aliasing image when zoom the pinned image
- '';
- type = with types; nullOr bool;
- };
- autoCloseIdleDaemon = mkOption {
- description = ''
- Automatically close daemon when it's not needed
- '';
- type = with types; nullOr bool;
- };
- buttons = let
- buttonTypes = {
- # Generated with:
- # nix-shell -p flameshot-once.dev --run get-buttonTypes
- TYPE_PENCIL = 0;
- TYPE_DRAWER = 1;
- TYPE_ARROW = 2;
- TYPE_SELECTION = 3;
- TYPE_RECTANGLE = 4;
- TYPE_CIRCLE = 5;
- TYPE_MARKER = 6;
- TYPE_SELECTIONINDICATOR = 7;
- TYPE_MOVESELECTION = 8;
- TYPE_UNDO = 9;
- TYPE_COPY = 10;
- TYPE_SAVE = 11;
- TYPE_EXIT = 12;
- TYPE_IMAGEUPLOADER = 13;
- TYPE_OPEN_APP = 14;
- TYPE_PIXELATE = 15;
- TYPE_REDO = 16;
- TYPE_PIN = 17;
- TYPE_TEXT = 18;
- TYPE_CIRCLECOUNT = 19;
- TYPE_SIZEINCREASE = 20;
- TYPE_SIZEDECREASE = 21;
- TYPE_INVERT = 22;
- TYPE_ACCEPT = 23;
- };
- iterableButtonTypes = [
- # Generated with:
- # nix-shell -p flameshot-once.dev --run get-iterableButtonTypes
- "TYPE_ACCEPT"
- "TYPE_ARROW"
- "TYPE_CIRCLE"
- "TYPE_CIRCLECOUNT"
- "TYPE_COPY"
- "TYPE_DRAWER"
- "TYPE_EXIT"
- "TYPE_IMAGEUPLOADER"
- "TYPE_MARKER"
- "TYPE_MOVESELECTION"
- "TYPE_OPEN_APP"
- "TYPE_PENCIL"
- "TYPE_PIN"
- "TYPE_PIXELATE"
- "TYPE_RECTANGLE"
- "TYPE_REDO"
- "TYPE_SAVE"
- "TYPE_SELECTION"
- "TYPE_SIZEDECREASE"
- "TYPE_SIZEINCREASE"
- "TYPE_TEXT"
- "TYPE_UNDO"
- ];
- in mkOption {
- apply = names:
- if names != null then let
- values = map (name: buttonTypes.${name}) names;
- in
- ''@Variant(\0\0\0\x7f\0\0\0\v${toQList "int" values})''
- else
- null;
- description = ''
- Configure which buttons to show after drawing a selection
- '';
- type = with types; nullOr (listOf (enum iterableButtonTypes));
- };
- checkForUpdates = mkOption {
- type = with types; nullOr bool;
- };
- contrastOpacity = mkOption {
- description = ''
- Opacity of area outside selection
- '';
- type = with types; nullOr (boundedInt 0 255);
- };
- contrastUiColor = mkOption {
- description = ''
- Contrast UI color
- '';
- type = with types; nullOr flameshot.color;
- };
- copyAndCloseAfterUpload = mkOption {
- type = with types; nullOr bool;
- };
- copyOnDoubleClick = mkOption {
- type = with types; nullOr bool;
- };
- copyPathAfterSave = mkOption {
- description = ''
- Copy path to image after save
- '';
- type = with types; nullOr bool;
- };
- copyURLAfterUpload = mkOption {
- description = ''
- On successful upload, close the dialog and copy URL to clipboard
- '';
- type = with types; nullOr bool;
- };
- disabledTrayIcon = mkOption {
- description = ''
- Whether the tray icon is disabled
- '';
- type = with types; nullOr bool;
- };
- drawColor = mkOption {
- description = ''
- Last used color
- '';
- type = with types; nullOr flameshot.color;
- };
- drawFontSize = mkOption {
- type = with types; nullOr positive;
- };
- drawThickness = mkOption {
- description = ''
- Last used tool thickness
- '';
- type = with types; nullOr positive;
- };
- filenamePattern = mkOption {
- description = ''
- Filename pattern using C++ strftime formatting
- '';
- type =
- # This is types.filename extended by [%:][%:+]*
- with types;
- nullOr (addCheck str (test "[%:0-9A-Za-z._][%:+0-9A-Za-z._-]*"));
- };
- fontFamily = mkOption {
- type = with types; nullOr str;
- };
- historyConfirmationToDelete = mkOption {
- type = with types; nullOr bool;
- };
- ignoreUpdateToVersion = mkOption {
- description = ''
- Ignore updates to versions less than this value
- '';
- type = with types; nullOr str;
- };
- keepOpenAppLauncher = mkOption {
- description = ''
- Keep the App Launcher open after selecting an app
- '';
- type = with types; nullOr bool;
- };
- predefinedColorPaletteLarge = mkOption {
- description = ''
- Use larger color palette as the default one
- '';
- type = with types; nullOr bool;
- };
- saveAfterCopy = mkOption {
- description = ''
- Save image after copy
- '';
- type = with types; nullOr bool;
- };
- saveAsFileExtension = mkOption {
- description = ''
- Default file extension for screenshots
- '';
- type = with types; nullOr (addCheck filename (hasPrefix "."));
- };
- safeLastRegion = mkOption {
- type = with types; nullOr bool;
- };
- savePath = mkOption {
- description = ''
- Image Save Path
- '';
- type = with types; nullOr absolute-pathname;
- };
- savePathFixed = mkOption {
- description = ''
- Whether the savePath is a fixed path
- '';
- type = with types; nullOr bool;
- };
- showDesktopNotification = mkOption {
- description = ''
- Show desktop notifications
- '';
- type = with types; nullOr bool;
- };
- showHelp = mkOption {
- description = ''
- Show the help screen on startup
- '';
- type = with types; nullOr bool;
- };
- showMagnifier = mkOption {
- type = with types; nullOr bool;
- };
- showSelectionGeometry = mkOption {
- type = with types; nullOr (boundedInt 0 5);
- };
- showSelectionGeometryHideTime = mkOption {
- type = with types; nullOr uint;
- };
- showSidePanelButton = mkOption {
- description = ''
- Show the side panel button
- '';
- type = with types; nullOr bool;
- };
- showStartupLaunchMessage = mkOption {
- type = with types; nullOr bool;
- };
- squareMagnifier = mkOption {
- type = with types; nullOr bool;
- };
- startupLaunch = mkOption {
- description = ''
- Launch at startup
- '';
- type = with types; nullOr bool;
- };
- uiColor = mkOption {
- description = ''
- Main UI color
- '';
- type = with types; nullOr flameshot.color;
- };
- undoLimit = mkOption {
- type = with types; nullOr (boundedInt 0 999);
- };
- uploadClientSecret = mkOption {
- type = with types; nullOr str;
- };
- uploadHistoryMax = mkOption {
- type = with types; nullOr uint;
- };
- uploadWithoutConfirmation = mkOption {
- description = ''
- Upload to imgur without confirmation
- '';
- type = with types; nullOr bool;
- };
- useJpgForClipboard = mkOption {
- description = ''
- Use JPG format instead of PNG
- '';
- type = with types; nullOr bool;
- };
- userColors = mkOption {
- apply = value:
- if value != null then
- concatStringsSep ", " value
- else
- null;
- description = ''
- List of colors for color picker
- The colors are arranged counter-clockwise with the first being set
- to the right of the cursor. "picker" adds a custom color picker.
- '';
- type =
- with types;
- nullOr (listOf (either flameshot.color (enum ["picker"])));
- };
- };
- Shortcuts = genAttrs [
- # Generated with:
- # nix-shell -p flameshot-once.dev --run get-Shortcuts
- "TYPE_ACCEPT"
- "TYPE_ARROW"
- "TYPE_CIRCLE"
- "TYPE_CIRCLECOUNT"
- "TYPE_COMMIT_CURRENT_TOOL"
- "TYPE_COPY"
- "TYPE_DELETE_CURRENT_TOOL"
- "TYPE_DRAWER"
- "TYPE_EXIT"
- "TYPE_IMAGEUPLOADER"
- "TYPE_INVERT"
- "TYPE_MARKER"
- "TYPE_MOVESELECTION"
- "TYPE_MOVE_DOWN"
- "TYPE_MOVE_LEFT"
- "TYPE_MOVE_RIGHT"
- "TYPE_MOVE_UP"
- "TYPE_OPEN_APP"
- "TYPE_PENCIL"
- "TYPE_PIN"
- "TYPE_PIXELATE"
- "TYPE_RECTANGLE"
- "TYPE_REDO"
- "TYPE_RESIZE_DOWN"
- "TYPE_RESIZE_LEFT"
- "TYPE_RESIZE_RIGHT"
- "TYPE_RESIZE_UP"
- "TYPE_SAVE"
- "TYPE_SELECTION"
- "TYPE_SELECTIONINDICATOR"
- "TYPE_SELECT_ALL"
- "TYPE_SIZEDECREASE"
- "TYPE_SIZEINCREASE"
- "TYPE_SYM_RESIZE_DOWN"
- "TYPE_SYM_RESIZE_LEFT"
- "TYPE_SYM_RESIZE_RIGHT"
- "TYPE_SYM_RESIZE_UP"
- "TYPE_TEXT"
- "TYPE_TOGGLE_PANEL"
- "TYPE_UNDO"
- ] (name: mkOption {
- default = null;
- type = with types; nullOr str;
- });
- };
- };
-}
diff --git a/krebs/5pkgs/simple/flameshot-once/default.nix b/krebs/5pkgs/simple/flameshot-once/default.nix
deleted file mode 100644
index 3626409f3..000000000
--- a/krebs/5pkgs/simple/flameshot-once/default.nix
+++ /dev/null
@@ -1,149 +0,0 @@
-{ name ? "flameshot-once", pkgs, ... }@args:
-with pkgs.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 {};
-
- cfg = evalModulesConfig (singleton {
- _file = toString ./default.nix;
- _module.args.pkgs = pkgs;
- imports = [
- config
- ./config.nix
- ];
- });
-in
-
-pkgs.symlinkJoin {
- inherit name;
- paths = [
- (pkgs.write "flameshot-once" {
- "/bin/flameshot-once" = {
- executable = true;
- text = /* sh */ ''
- #! ${pkgs.dash}/bin/dash
- export PATH=${makeBinPath [
- pkgs.qt5.qtbase
- ]}:''${PATH+:$PATH}
- ${optionalString (config != null) /* sh */ ''
- export XDG_CONFIG_HOME=${placeholder "out"}/etc
- ${optionalString cfg.imgur.enable /* sh */ ''
- export IMGUR_CREATE_URL=${shell.escape cfg.imgur.createUrl}
- export IMGUR_DELETE_URL=${shell.escape cfg.imgur.deleteUrl}
- ${optionalString cfg.imgur.xdg-open.enable /* sh */ ''
- export PATH=${placeholder "out"}/lib/imgur/bin''${PATH+:$PATH}
- ''}
- ''}
- ''}
- ${cfg.package}/bin/flameshot &
- exec ${cfg.package}/bin/flameshot gui
- '';
- };
- "/etc/flameshot/flameshot.ini".text =
- lib.generators.toINI {} (stripAttr cfg.settings);
- ${if cfg.imgur.enable then "/lib/imgur/bin/xdg-open" else null} = {
- executable = true;
- text = /* sh */ ''
- #! ${pkgs.dash}/bin/dash
- set -efu
- uri=$1
- prefix=$(${pkgs.coreutils}/bin/dirname "$uri")
- case $prefix in
- (${shell.escape cfg.imgur.xdg-open.createPrefix})
- echo "opening image in browser: $uri" >&2
- exec ${config.imgur.xdg-open.browser} "$uri"
- ;;
- (${shell.escape cfg.imgur.xdg-open.deletePrefix})
- echo "deleting image: $uri" >&2
- exec ${pkgs.curl}/bin/curl -fsS -X DELETE "$uri"
- ;;
- (*)
- echo "don't know how to open URI: $uri" >&2
- exit 1
- esac
- '';
- };
- })
- ];
-}
-// {
- dev = pkgs.write "flameshot-once-tools" {
- "/bin/get-buttonTypes" = {
- executable = true;
- text = /* sh */ ''
- #! ${pkgs.dash}/bin/dash
- indent=$(${placeholder "out"}/bin/indent-of buttonTypes)
- src=${cfg.package.src}/src/tools/capturetool.h
- ${pkgs.coreutils}/bin/cat "$src" |
- ${pkgs.gnused}/bin/sed -nr '
- s/^\s*(TYPE_\S+)\s*=\s*([0-9]+),/\1 = \2;/p
- ' |
- ${placeholder "out"}/bin/prefix " $indent"
- '';
- };
- "/bin/get-iterableButtonTypes" = {
- executable = true;
- text = /* sh */ ''
- #! ${pkgs.dash}/bin/dash
- indent=$(${placeholder "out"}/bin/indent-of iterableButtonTypes)
- src=${cfg.package.src}/src/widgets/capture/capturetoolbutton.cpp
- ${pkgs.coreutils}/bin/cat "$src" |
- ${pkgs.gnused}/bin/sed -n '/\<iterableButtonTypes = {/,/^}/p' |
- ${pkgs.gcc}/bin/cpp |
- ${pkgs.coreutils}/bin/tr , \\n |
- ${pkgs.gnused}/bin/sed -rn 's/^ *CaptureTool::(TYPE_[A-Z_]+).*/"\1"/p' |
- ${pkgs.coreutils}/bin/sort |
- ${placeholder "out"}/bin/prefix " $indent"
- '';
- };
- "/bin/get-recognizedGeneralOptions" = {
- executable = true;
- text = /* sh */ ''
- #! ${pkgs.dash}/bin/dash
- src=${cfg.package.src}/src/utils/confighandler.cpp
- ${pkgs.coreutils}/bin/cat "$src" |
- ${pkgs.gnused}/bin/sed -n '/\<recognizedGeneralOptions = {/,/^};/p' |
- ${pkgs.gcc}/bin/cpp |
- ${pkgs.gnugrep}/bin/grep -F OPTION |
- ${pkgs.coreutils}/bin/sort
- '';
- };
- "/bin/get-Shortcuts" = {
- executable = true;
- text = /* sh */ ''
- #! ${pkgs.dash}/bin/dash
- indent=$(${placeholder "out"}/bin/indent-of Shortcuts)
- src=${cfg.package.src}/src/utils/confighandler.cpp
- ${pkgs.coreutils}/bin/cat "$src" |
- ${pkgs.gnused}/bin/sed -n '/recognizedShortcuts = {/,/^};/p ' |
- ${pkgs.gcc}/bin/cpp |
- ${pkgs.gnused}/bin/sed -nr 's/^\s*SHORTCUT\("(TYPE_[^"]+).*/"\1"/p' |
- ${pkgs.coreutils}/bin/sort |
- ${placeholder "out"}/bin/prefix " $indent"
- '';
- };
- "/bin/indent-of" = {
- executable = true;
- text = /* sh */ ''
- #! ${pkgs.dash}/bin/dash
- # usage: indent-of NAME NIX_FILE
- exec ${pkgs.gawk}/bin/awk -v name="$1" '
- $1 == name && $2 == "=" {
- sub("[^ ].*", "")
- print
- }
- ' ${./config.nix}
- '';
- };
- "/bin/prefix" = {
- executable = true;
- text = /* sh */ ''
- #! ${pkgs.dash}/bin/dash
- ${pkgs.gawk}/bin/awk -v prefix="$1" '{ print prefix $0 }'
- '';
- };
- };
-}
diff --git a/krebs/5pkgs/simple/flameshot-once/flameshot