diff options
Diffstat (limited to 'krebs/5pkgs')
59 files changed, 633 insertions, 973 deletions
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix index f9ed6439c..866796a4e 100644 --- a/krebs/5pkgs/default.nix +++ b/krebs/5pkgs/default.nix @@ -1,8 +1,11 @@ -let - stockholm.lib = import ../../lib; +self: super: let + stockholm = { + lib = import ../../lib/pure.nix { lib = super.lib; }; + outPath = toString ../.; + }; in with stockholm.lib; -self: super: + fix (foldl' (flip extends) (self: super) ( [ (self: super: { inherit stockholm; }) diff --git a/krebs/5pkgs/haskell/brockman/default.nix b/krebs/5pkgs/haskell/brockman/default.nix index 6a0c7f9df..a902b5fb1 100644 --- a/krebs/5pkgs/haskell/brockman/default.nix +++ b/krebs/5pkgs/haskell/brockman/default.nix @@ -7,12 +7,12 @@ }: mkDerivation rec { pname = "brockman"; - version = "4.0.4"; + version = "5.1.1"; src = fetchFromGitHub { owner = "kmein"; repo = "brockman"; rev = version; - sha256 = "sha256-GOEEUjehFgMMf6cNpi0AP/Rz74sTDEcpKRbLD+6YEz0="; + sha256 = "sha256-5/2Xjh6YqV3+kkQr8CiXay9Dd8IAnL8D4dc8afnlki4="; }; isLibrary = false; isExecutable = true; diff --git a/krebs/5pkgs/haskell/default.nix b/krebs/5pkgs/haskell/default.nix index 98cbcb3b9..7e9ee7521 100644 --- a/krebs/5pkgs/haskell/default.nix +++ b/krebs/5pkgs/haskell/default.nix @@ -8,11 +8,13 @@ in haskell = super.haskell // { packages = mapAttrs (name: value: if hasAttr "override" value - then value.override { inherit overrides; } + then value.override (old: { + overrides = composeExtensions (old.overrides or (_: _: {})) overrides; + }) else value ) super.haskell.packages; }; - haskellPackages = super.haskellPackages.override { - inherit overrides; - }; + haskellPackages = super.haskellPackages.override (old: { + overrides = composeExtensions (old.overrides or (_: _: {})) overrides; + }); } diff --git a/krebs/5pkgs/haskell/email-header.nix b/krebs/5pkgs/haskell/email-header.nix index e1e9d423f..f8ce03f39 100644 --- a/krebs/5pkgs/haskell/email-header.nix +++ b/krebs/5pkgs/haskell/email-header.nix @@ -18,9 +18,9 @@ let sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x"; }; }.${versions.majorMinor version} or { - version = "0.4.1-tv2"; + version = "0.4.2-tv1"; rev = "refs/tags/v${cfg.version}"; - sha256 = "1yg4b5318lpviwgjs4kdcqg8cwfnxxfcdckcjq12r2nnj2k4ms2d"; + sha256 = "JZfqvkbb/1t0q1iWmZHmmCN2Vr+QKTiq4LVncrG+xMU="; }; in mkDerivation { diff --git a/krebs/5pkgs/haskell/flameshot-once.nix b/krebs/5pkgs/haskell/flameshot-once.nix deleted file mode 100644 index c8007ce9e..000000000 --- a/krebs/5pkgs/haskell/flameshot-once.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ mkDerivation, async, base, blessings, bytestring, dbus, fetchgit -, iso8601-time, lib, process, random, text, time, unagi-chan, unix -}: -mkDerivation { - pname = "flameshot-once"; - version = "1.4.0"; - src = fetchgit { - url = "https://cgit.krebsco.de/flameshot-once"; - sha256 = "13szgsiwn29aixm5xvs1m7128y5km5xss0ry5ii5y068rc2vysw8"; - rev = "4475893c2081b3d9db4b7a54d0ce38d0914a17bf"; - fetchSubmodules = true; - }; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ - async base blessings bytestring dbus iso8601-time process random - text time unagi-chan unix - ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/hack.nix b/krebs/5pkgs/haskell/hack.nix deleted file mode 100644 index df3343818..000000000 --- a/krebs/5pkgs/haskell/hack.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ mkDerivation, base, blessings, containers, data-default, fetchgit -, lens, lib, mtl, old-locale, process, scanner, time, unix, zippers -}: -mkDerivation { - pname = "hack"; - version = "1.0.1"; - src = fetchgit { - url = "https://cgit.krebsco.de/hack"; - sha256 = "0ry5ikn89ij512qvk1xhdhfz4s8a6b9yawgx6lxgnw5jkiyjd7ka"; - rev = "f3ea150aca5cc86878fa10bc5b1f0918fc154e2a"; - fetchSubmodules = true; - }; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ base ]; - executableHaskellDepends = [ - base blessings containers data-default lens mtl old-locale process - scanner time unix zippers - ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/mailaids.nix b/krebs/5pkgs/haskell/mailaids.nix index f152a76f4..91b4cc451 100644 --- a/krebs/5pkgs/haskell/mailaids.nix +++ b/krebs/5pkgs/haskell/mailaids.nix @@ -1,14 +1,14 @@ { mkDerivation, aeson, aeson-pretty, base, bytestring -, case-insensitive, fetchgit, lens, optparse-applicative -, purebred-email, lib, text, vector, word8 +, case-insensitive, fetchgit, lens, lib, optparse-applicative +, purebred-email, text, vector, word8 }: mkDerivation { pname = "mailaids"; - version = "1.0.0"; + version = "1.1.0"; src = fetchgit { url = "https://cgit.krebsco.de/mailaids"; - sha256 = "15h0k82czm89gkwhp1rwdy77jz8dmb626qdz7c2narvz9j7169v5"; - rev = "8f11927ea74d6adb332c884502ebd9c486837523"; + sha256 = "0mkq3b0j28h7ydg6aaqlqnvajb8nhdc9g7rmil2d4vl5fxxaqspv"; + rev = "a25fc32eceefc10a91ef77ff2763b3f1b9324aaf"; fetchSubmodules = true; }; isLibrary = false; diff --git a/krebs/5pkgs/haskell/much.nix b/krebs/5pkgs/haskell/much.nix deleted file mode 100644 index 5045465e6..000000000 --- a/krebs/5pkgs/haskell/much.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ mkDerivation, aeson, attoparsec, base, base64-bytestring -, blaze-builder, blessings, bytestring, case-insensitive -, containers, data-default, deepseq, directory, either -, email-header, fetchgit, filepath, friendly-time, http-types -, hyphenation, lib, linebreak, network, old-locale -, optparse-applicative, process, random, rosezipper, safe, scanner -, servant-server, split, terminal-size, text, time, transformers -, transformers-compat, unix, vector, wai, warp -}: -mkDerivation { - pname = "much"; - version = "1.3.1"; - src = fetchgit { - url = "https://cgit.krebsco.de/much"; - sha256 = "0gwyhqcvg9ywna8fhb9hnx97qh5inglj3l0pcwkgwcvm27mfpcqa"; - rev = "77357335a3a88a4b93f91a46ab939a1a9b192977"; - fetchSubmodules = true; - }; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - aeson attoparsec base base64-bytestring blaze-builder blessings - bytestring case-insensitive containers data-default deepseq - directory either email-header filepath friendly-time http-types - hyphenation linebreak network old-locale optparse-applicative - process random rosezipper safe scanner servant-server split - terminal-size text time transformers transformers-compat unix - vector wai warp - ]; - executableHaskellDepends = [ - aeson base blessings bytestring case-insensitive containers - data-default deepseq directory filepath hyphenation linebreak - process rosezipper safe scanner text time transformers unix - ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/nix-serve-ng.nix b/krebs/5pkgs/haskell/nix-serve-ng.nix new file mode 100644 index 000000000..62e02ce82 --- /dev/null +++ b/krebs/5pkgs/haskell/nix-serve-ng.nix @@ -0,0 +1,30 @@ +{ 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/pager.nix b/krebs/5pkgs/haskell/pager.nix deleted file mode 100644 index 2f4a71f34..000000000 --- a/krebs/5pkgs/haskell/pager.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ mkDerivation, base, blessings, bytestring, containers -, data-default, hack, lib, optparse-applicative, probability -, scanner, speculate, split, terminal-size, text, unix, X11 -, fetchgit -}: -mkDerivation { - pname = "pager"; - version = "1.0.0"; - src = fetchgit { - url = "https://cgit.krebsco.de/pager"; - sha256 = "1qlkhqidaa6w02ix9ambfdsm7lfyx30ap481b9ic1ppyfkhqzfp6"; - rev = "fc6105a5e7d1e3a07bf07ea85e7902dd8e9fc849"; - fetchSubmodules = true; - }; - isLibrary = false; - isExecutable = true; - executableHaskellDepends = [ - base blessings bytestring containers data-default hack - optparse-applicative probability scanner speculate split - terminal-size text unix X11 - ]; - license = lib.licenses.mit; -} diff --git a/krebs/5pkgs/haskell/purebred-email/default.nix b/krebs/5pkgs/haskell/purebred-email/default.nix index ebf315388..62fc82183 100644 --- a/krebs/5pkgs/haskell/purebred-email/default.nix +++ b/krebs/5pkgs/haskell/purebred-email/default.nix @@ -1,31 +1,27 @@ { mkDerivation, attoparsec, base, base64-bytestring, bytestring , case-insensitive, concise, deepseq, fetchgit, hedgehog, lens, lib -, QuickCheck, quickcheck-instances, semigroupoids, semigroups +, QuickCheck, quickcheck-instances, random, semigroupoids , stringsearch, tasty, tasty-golden, tasty-hedgehog, tasty-hunit , tasty-quickcheck, text, time }: mkDerivation { pname = "purebred-email"; - version = "0.4.3"; + version = "0.5.1"; src = fetchgit { url = "https://github.com/purebred-mua/purebred-email"; - sha256 = "06xhccavrdzfsvg65mzdnp0a7b1ilk2rqpnyvkr171ir6mqdpb19"; - rev = "769b360643f699c0a8cd6f1c3a3de36cf0479834"; + sha256 = "0iilyy5dkbzbiazyyfjdz585c3x8b7c2piynmycm7krkc48993vw"; + rev = "7ba346e10ad1521a923bc04a4ffeca479d8dd071"; fetchSubmodules = true; }; - patches = [ - ./untweak-mime-version-header.patch - ]; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ attoparsec base base64-bytestring bytestring case-insensitive - concise deepseq lens semigroupoids semigroups stringsearch text - time + concise deepseq lens random semigroupoids stringsearch text time ]; testHaskellDepends = [ attoparsec base bytestring case-insensitive hedgehog lens - QuickCheck quickcheck-instances semigroups tasty tasty-golden + QuickCheck quickcheck-instances random tasty tasty-golden tasty-hedgehog tasty-hunit tasty-quickcheck text time ]; homepage = "https://github.com/purebred-mua/purebred-email"; diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix index ae42bc1a3..f85f3f678 100644 --- a/krebs/5pkgs/override/default.nix +++ b/krebs/5pkgs/override/default.nix @@ -9,20 +9,6 @@ self: super: { }; }); - flameshot = super.flameshot.overrideAttrs (old: rec { - name = "flameshot-${version}"; - version = "0.10.2"; - src = self.fetchFromGitHub { - owner = "flameshot-org"; - repo = "flameshot"; - rev = "v${version}"; - sha256 = "sha256-rZUiaS32C77tFJmEkw/9MGbVTVscb6LOCyWaWO5FyR4="; - }; - patches = old.patches or [] ++ [ - ./flameshot/flameshot_imgur_0.10.2.patch - ]; - }); - # https://github.com/proot-me/PRoot/issues/106 proot = self.writeDashBin "proot" '' export PROOT_NO_SECCOMP=1 diff --git a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch b/krebs/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch deleted file mode 100644 index c4c0bf38a..000000000 --- a/krebs/5pkgs/override/flameshot/flameshot_imgur_0.10.2.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- a/src/tools/imgur/imguruploader.cpp -+++ b/src/tools/imgur/imguruploader.cpp -@@ -31,6 +31,7 @@ - #include <QTimer> - #include <QUrlQuery> - #include <QVBoxLayout> -+#include <stdlib.h> - - ImgurUploader::ImgurUploader(const QPixmap& capture, QWidget* parent) - : QWidget(parent) -@@ -79,8 +80,11 @@ void ImgurUploader::handleReply(QNetworkReply* reply) - m_imageURL.setUrl(data[QStringLiteral("link")].toString()); - - auto deleteToken = data[QStringLiteral("deletehash")].toString(); -+ char *deleteImageURLPattern = secure_getenv("IMGUR_DELETE_URL"); -+ if (deleteImageURLPattern == NULL) -+ deleteImageURLPattern = "https://imgur.com/delete/%1"; - m_deleteImageURL.setUrl( -- QStringLiteral("https://imgur.com/delete/%1").arg(deleteToken)); -+ QString::fromUtf8(deleteImageURLPattern).arg(deleteToken)); - - // save history - QString imageName = m_imageURL.toString(); -@@ -133,7 +137,10 @@ void ImgurUploader::upload() - QString description = FileNameHandler().parsedPattern(); - urlQuery.addQueryItem(QStringLiteral("description"), description); - -- QUrl url(QStringLiteral("https://api.imgur.com/3/image")); -+ char *createImageURLPattern = secure_getenv("IMGUR_CREATE_URL"); -+ if (createImageURLPattern == NULL) -+ createImageURLPattern = "https://api.imgur.com/3/image"; -+ QUrl url(QString::fromUtf8(createImageURLPattern)); - url.setQuery(urlQuery); - QNetworkRequest request(url); - request.setHeader(QNetworkRequest::ContentTypeHeader, diff --git a/krebs/5pkgs/simple/K_belwagen.nix b/krebs/5pkgs/simple/K_belwagen.nix index 80d377b0c..2f64bb09d 100644 --- a/krebs/5pkgs/simple/K_belwagen.nix +++ b/krebs/5pkgs/simple/K_belwagen.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation { buildInputs = [ pkgs.jack1 - pkgs.pkgconfig + pkgs.pkg-config ]; patchPhase = '' diff --git a/krebs/5pkgs/simple/Reaktor/scripts/tell-on_join.sh b/krebs/5pkgs/simple/Reaktor/scripts/tell-on_join.sh index c21dc8776..6978e38c6 100755 --- a/krebs/5pkgs/simple/Reaktor/scripts/tell-on_join.sh +++ b/krebs/5pkgs/simple/Reaktor/scripts/tell-on_join.sh @@ -1,7 +1,7 @@ #! /bin/sh set -euf -# require flock from util-linux (pkgs.utillinux) +# require flock from util-linux (pkgs.util-linux) if test "${FLOCK-}" != "$state_file"; then exec env FLOCK="$state_file" flock "$state_file" "$0" "$@" fi diff --git a/krebs/5pkgs/simple/brain/default.nix b/krebs/5pkgs/simple/brain/default.nix index 9b125862b..d7e36a527 100644 --- a/krebs/5pkgs/simple/brain/default.nix +++ b/krebs/5pkgs/simple/brain/default.nix @@ -1,12 +1,28 @@ -{ pass, write, writeDash, ... }: +{ pkgs }: -write "brain" { - "/bin/brain".link = writeDash "brain" '' +let + pass = pkgs.pass.withExtensions (ext: [ + ext.pass-otp + ]); +in + +pkgs.write "brain" { + "/bin/brain".link = pkgs.writeDash "brain" '' PASSWORD_STORE_DIR=$HOME/brain \ - exec ${pass}/bin/pass $@ + exec ${pass}/bin/pass "$@" ''; - "/bin/brainmenu".link = writeDash "brainmenu" '' + "/bin/brainmenu".link = pkgs.writeDash "brainmenu" '' PASSWORD_STORE_DIR=$HOME/brain \ - exec ${pass}/bin/passmenu $@ + exec ${pass}/bin/passmenu "$@" ''; + "/share/bash-completion/completions/brain".link = + pkgs.runCommand "brain-completions" { + } /* sh */ '' + sed -r ' + s/\<_pass?(_|\>)/_brain\1/g + s/\<__password_store/_brain/g + s/\<pass\>/brain/ + s/\$HOME\/\.password-store/$HOME\/brain/ + ' < ${pass}/share/bash-completion/completions/pass > $out + ''; } diff --git a/krebs/5pkgs/simple/cabal-read.nix b/krebs/5pkgs/simple/cabal-read.nix deleted file mode 100644 index 03b42ef2c..000000000 --- a/krebs/5pkgs/simple/cabal-read.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ writeHaskellPackage }: - -# Because `sed -n 's/.*\<ghc-options:\s\+\(.*\)/\1/p'` is too simple. -writeHaskellPackage "cabal-read" { - executables.ghc-options = { - extra-depends = ["Cabal"]; - text = /* haskell */ '' - {-# LANGUAGE CPP #-} - module Main (main) where - import Data.List - import Data.Maybe - import Distribution.Compiler - import Distribution.PackageDescription.Parsec - import Distribution.Types.BuildInfo - import Distribution.Types.CondTree - import Distribution.Types.Executable - import Distribution.Types.GenericPackageDescription - import Distribution.Types.UnqualComponentName - import Distribution.Verbosity - import System.Environment - main :: IO () - main = do - [path, name] <- getArgs - - desc <- readGenericPackageDescription normal path - - case lookup (mkUnqualComponentName name) (condExecutables desc) of - Just exe -> - putStrLn . intercalate " " . fromMaybe [] . lookup GHC - #if MIN_VERSION_Cabal(3,0,0) - . perCompilerFlavorToList - #endif - . options . buildInfo . condTreeData $ exe - - Nothing -> - error ("executable " <> name <> " not found in " <> path) - ''; - }; -} diff --git a/krebs/5pkgs/simple/cac-api/default.nix b/krebs/5pkgs/simple/cac-api/default.nix index 5f37f6682..59cd36cde 100644 --- a/krebs/5pkgs/simple/cac-api/default.nix +++ b/krebs/5pkgs/simple/cac-api/default.nix @@ -1,5 +1,5 @@ { fetchgit, lib, stdenv -, bc, cac-cert, coreutils, curl, dash, gnugrep, gnused, inotifyTools, jq, ncurses, openssh, sshpass +, bc, cac-cert, coreutils, curl, dash, gnugrep, gnused, inotify-tools, jq, ncurses, openssh, sshpass }: stdenv.mkDerivation { @@ -26,7 +26,7 @@ stdenv.mkDerivation { curl gnugrep gnused - inotifyTools + inotify-tools jq ncurses openssh diff --git a/krebs/5pkgs/simple/certaids.nix b/krebs/5pkgs/simple/certaids.nix new file mode 100644 index 000000000..34f4c3e14 --- /dev/null +++ b/krebs/5pkgs/simple/certaids.nix @@ -0,0 +1,109 @@ +{ pkgs }: + +pkgs.write "certaids" { + "/bin/cert2json".link = pkgs.writeDash "cert2json" '' + # usage: cert2json < CERT > JSON + set -efu + + ${pkgs.openssl}/bin/openssl crl2pkcs7 -nocrl -certfile /dev/stdin | + ${pkgs.openssl}/bin/openssl pkcs7 -print_certs -text | + ${pkgs.gawk}/bin/awk -F, -f ${pkgs.writeText "cert2json.awk" '' + function abort(msg) { + print(msg) > "/dev/stderr" + exit 1 + } + + function toJSON(x, type, ret) { + type = typeof(x) + switch (type) { + case "array": + if (isArray(x)) return arrayToJSON(x) + if (isObject(x)) return objectToJSON(x) + abort("cannot render array to JSON", x) + case "number": + return numberToJSON(x) + case "string": + return stringToJSON(x) + case "strnum": + case "unassigned": + case "regexp": + case "untyped": + default: + abort("cannot render type: " type) + } + } + + function isArray(x, i, k) { + i = 1 + for (k in x) { + if (k != i++) return 0 + i++ + } + return 1 + } + + function isObject(x, k) { + for (k in x) { + if (typeof(k) != "string") return 0 + } + return 1 + } + + function arrayToJSON(x, k, ret) { + ret = "["< |