diff options
author | Vincent Ambo <mail@tazj.in> | 2022-01-30T16·06+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-01-31T16·11+0000 |
commit | aa122cbae78ce97d60c0c98ba14df753d97e40b1 (patch) | |
tree | 12b98d85c4b18fe870feb26de70db9ba61837bd7 /users | |
parent | 2d10d60fac0fd00a71b65cfdcb9fba0477b2086c (diff) |
style: format entire depot with nixpkgs-fmt r/3723
This CL can be used to compare the style of nixpkgs-fmt against other formatters (nixpkgs, alejandra). Change-Id: I87c6abff6bcb546b02ead15ad0405f81e01b6d9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/4397 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org> Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: wpcarro <wpcarro@gmail.com> Reviewed-by: Profpatsch <mail@profpatsch.de> Reviewed-by: kanepyork <rikingcoding@gmail.com> Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: cynthia <cynthia@tvl.fyi> Reviewed-by: edef <edef@edef.eu> Reviewed-by: eta <tvl@eta.st> Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to '')
139 files changed, 5047 insertions, 3870 deletions
diff --git a/users/Profpatsch/arglib/netencode.nix b/users/Profpatsch/arglib/netencode.nix index 50f4c11c2d8f..3f1d121e5132 100644 --- a/users/Profpatsch/arglib/netencode.nix +++ b/users/Profpatsch/arglib/netencode.nix @@ -2,13 +2,14 @@ let netencode = { - rust = depot.nix.writers.rustSimpleLib { - name = "arglib-netencode"; - dependencies = [ - depot.users.Profpatsch.execline.exec-helpers - depot.users.Profpatsch.netencode.netencode-rs - ]; - } '' + rust = depot.nix.writers.rustSimpleLib + { + name = "arglib-netencode"; + dependencies = [ + depot.users.Profpatsch.execline.exec-helpers + depot.users.Profpatsch.netencode.netencode-rs + ]; + } '' extern crate netencode; extern crate exec_helpers; @@ -37,4 +38,5 @@ let ''; }; -in depot.nix.readTree.drvTargets netencode +in +depot.nix.readTree.drvTargets netencode diff --git a/users/Profpatsch/atomically-write.nix b/users/Profpatsch/atomically-write.nix index d5039d3e46b9..c4d07cfbb1fa 100644 --- a/users/Profpatsch/atomically-write.nix +++ b/users/Profpatsch/atomically-write.nix @@ -25,4 +25,5 @@ let mv "$tmp/out" "$to" ''; -in atomically-write +in +atomically-write diff --git a/users/Profpatsch/blog/default.nix b/users/Profpatsch/blog/default.nix index d3c5c596b444..44a7a21aa3c3 100644 --- a/users/Profpatsch/blog/default.nix +++ b/users/Profpatsch/blog/default.nix @@ -2,11 +2,11 @@ let bins = depot.nix.getBins pkgs.lowdown [ "lowdown" ] - // depot.nix.getBins pkgs.cdb [ "cdbget" "cdbmake" "cdbdump" ] - // depot.nix.getBins pkgs.coreutils [ "mv" "cat" "printf" "test" ] - // depot.nix.getBins pkgs.s6-networking [ "s6-tcpserver" ] - // depot.nix.getBins pkgs.time [ "time" ] - ; + // depot.nix.getBins pkgs.cdb [ "cdbget" "cdbmake" "cdbdump" ] + // depot.nix.getBins pkgs.coreutils [ "mv" "cat" "printf" "test" ] + // depot.nix.getBins pkgs.s6-networking [ "s6-tcpserver" ] + // depot.nix.getBins pkgs.time [ "time" ] + ; # / # TODO: use @@ -14,7 +14,7 @@ let { route = [ "notes" ]; name = "Notes"; - page = {cssFile}: router cssFile; + page = { cssFile }: router cssFile; } { route = [ "projects" ]; @@ -28,7 +28,7 @@ let { route = [ "notes" "preventing-oom" ]; name = "Preventing out-of-memory (OOM) errors on Linux"; - page = {cssFile}: markdownToHtml { + page = { cssFile }: markdownToHtml { name = "preventing-oom"; markdown = ./notes/preventing-oom.md; inherit cssFile; @@ -37,7 +37,7 @@ let { route = [ "notes" "rust-string-conversions" ]; name = "Converting between different String types in Rust"; - page = {cssFile}: markdownToHtml { + page = { cssFile }: markdownToHtml { name = "rust-string-conversions"; markdown = ./notes/rust-string-conversions.md; inherit cssFile; @@ -69,48 +69,52 @@ let title = "Ligature Emulation in Emacs"; subtitle = "It’s not pretty, but the results are"; description = "How to set up ligatures using <code>prettify-symbols-mode</code> and the Hasklig/FiraCode fonts."; - page = {cssFile}: markdownToHtml { + page = { cssFile }: markdownToHtml { name = "2017-05-04-ligature-emluation-in-emacs"; markdown = ./posts/2017-05-04-ligature-emulation-in-emacs.md; inherit cssFile; }; route = [ "posts" "2017-05-04-ligature-emluation-in-emacs" ]; - tags = ["emacs"]; + tags = [ "emacs" ]; } ]; # convert a markdown file to html via lowdown - markdownToHtml = { - name, - # the file to convert - markdown, - # css file to add to the final result, as { route } - cssFile - }: - depot.nix.runExecline "${name}.html" {} ([ - "importas" "out" "out" + markdownToHtml = + { name + , # the file to convert + markdown + , # css file to add to the final result, as { route } + cssFile + }: + depot.nix.runExecline "${name}.html" { } ([ + "importas" + "out" + "out" (depot.users.Profpatsch.lib.debugExec "") bins.lowdown - "-s" "-Thtml" - ] ++ - (lib.optional (cssFile != null) (["-M" "css=${mkRoute cssFile.route}"])) - ++ [ - "-o" "$out" - markdown + "-s" + "-Thtml" + ] ++ + (lib.optional (cssFile != null) ([ "-M" "css=${mkRoute cssFile.route}" ])) + ++ [ + "-o" + "$out" + markdown ]); # takes a { route … } attrset and converts the route lists to an absolute path fullRoute = attrs: lib.pipe attrs [ - (map (x@{route, ...}: x // { route = mkRoute route; })) + (map (x@{ route, ... }: x // { route = mkRoute route; })) ]; # a cdb from route to a netencoded version of data for each route router = cssFile: lib.pipe (notes ++ posts) [ (map (r: with depot.users.Profpatsch.lens; - lib.pipe r [ - (over (field "route") mkRoute) - (over (field "page") (_ { inherit cssFile; })) - ])) + lib.pipe r [ + (over (field "route") mkRoute) + (over (field "page") (_ { inherit cssFile; })) + ])) (map (x: { name = x.route; value = depot.users.Profpatsch.netencode.gen.dwim x; @@ -121,11 +125,12 @@ let # Create a link to the given source file/directory, given the relative path in the depot repo. # Checks that the file exists at evaluation time. - depotCgitLink = { - # relative path from the depot root (without leading /). - relativePath - }: - assert + depotCgitLink = + { + # relative path from the depot root (without leading /). + relativePath + }: + assert (lib.assertMsg (builtins.pathExists (depot.path.origSrc + "/${relativePath}")) "depotCgitLink: path /${relativePath} does not exist in depot, and depot.path was ${toString depot.path}"); @@ -133,12 +138,20 @@ let # look up a route by path ($1) router-lookup = cssFile: depot.nix.writeExecline "router-lookup" { readNArgs = 1; } [ - cdbLookup (router cssFile) "$1" + cdbLookup + (router cssFile) + "$1" ]; runExeclineStdout = name: args: cmd: depot.nix.runExecline name args ([ - "importas" "-ui" "out" "out" - "redirfd" "-w" "1" "$out" + "importas" + "-ui" + "out" + "out" + "redirfd" + "-w" + "1" + "$out" ] ++ cmd); notes-index-html = @@ -170,106 +183,167 @@ let html = s: s; projects-index-html = - let o = projects; - in '' - <dl> - ${scope o (o: '' - <dt><a href="${str o.link}">${esc o.name}</a></dt> - <dd>${html o.description}</dd> - '')} - </dl> - ''; + let o = projects; + in '' + <dl> + ${scope o (o: '' + <dt><a href="${str o.link}">${esc o.name}</a></dt> + <dd>${html o.description}</dd> + '')} + </dl> + ''; projects-index = pkgs.writeText "projects-index.html" projects-index-html; posts-index-html = - let o = fullRoute posts; - in '' - <dl> - ${scope o (o: '' - <dt>${str o.date} <a href="${str o.route}">${esc o.title}</a></dt> - <dd>${html o.description}</dd> - '')} - </dl> - ''; + let o = fullRoute posts; + in '' + <dl> + ${scope o (o: '' + <dt>${str o.date} <a href="${str o.route}">${esc o.title}</a></dt> + <dd>${html o.description}</dd> + '')} + </dl> + ''; posts-index = pkgs.writeText "projects-index.html" posts-index-html; arglibNetencode = val: depot.nix.writeExecline "arglib-netencode" { } [ - "export" "ARGLIB_NETENCODE" (depot.users.Profpatsch.netencode.gen.dwim val) + "export" + "ARGLIB_NETENCODE" + (depot.users.Profpatsch.netencode.gen.dwim val) "$@" ]; # A simple http server that serves the site. Yes, it’s horrible. - site-server = { cssFile, port }: depot.nix.writeExecline "blog-server" {} [ + site-server = { cssFile, port }: depot.nix.writeExecline "blog-server" { } [ (depot.users.Profpatsch.lib.runInEmptyEnv [ "PATH" ]) - bins.s6-tcpserver "127.0.0.1" port - bins.time "--format=time: %es" "--" - runOr return400 - "pipeline" [ + bins.s6-tcpserver + "127.0.0.1" + port + bins.time + "--format=time: %es" + "--" + runOr + return400 + "pipeline" + [ (arglibNetencode { what = "request"; }) depot.users.Profpatsch.read-http ] depot.users.Profpatsch.netencode.record-splice-env - runOr return500 - "importas" "-i" "path" "path" - "if" [ depot.tools.eprintf "GET \${path}\n" ] - runOr return404 - "backtick" "-ni" "TEMPLATE_DATA" [ + runOr + return500 + "importas" + "-i" + "path" + "path" + "if" + [ depot.tools.eprintf "GET \${path}\n" ] + runOr + return404 + "backtick" + "-ni" + "TEMPLATE_DATA" + [ # TODO: factor this out of here, this is routing not serving - "ifelse" [ bins.test "$path" "=" "/notes" ] - [ "export" "content-type" "text/html" - "export" "serve-file" notes-index - depot.users.Profpatsch.netencode.env-splice-record - ] - "ifelse" [ bins.test "$path" "=" "/projects" ] - [ "export" "content-type" "text/html" - "export" "serve-file" projects-index - depot.users.Profpatsch.netencode.env-splice-record - ] - "ifelse" [ bins.test "$path" "=" "/posts" ] - [ "export" "content-type" "text/html" - "export" "serve-file" posts-index - depot.users.Profpatsch.netencode.env-splice-record - ] + "ifelse" + [ bins.test "$path" "=" "/notes" ] + [ + "export" + "content-type" + "text/html" + "export" + "serve-file" + notes-index + depot.users.Profpatsch.netencode.env-splice-record + ] + "ifelse" + [ bins.test "$path" "=" "/projects" ] + [ + "export" + "content-type" + "text/html" + "export" + "serve-file" + projects-index + depot.users.Profpatsch.netencode.env-splice-record + ] + "ifelse" + [ bins.test "$path" "=" "/posts" ] + [ + "export" + "content-type" + "text/html" + "export" + "serve-file" + posts-index + depot.users.Profpatsch.netencode.env-splice-record + ] # TODO: ignore potential query arguments. See 404 message - "pipeline" [ (router-lookup cssFile) "$path" ] + "pipeline" + [ (router-lookup cssFile) "$path" ] depot.users.Profpatsch.netencode.record-splice-env - "importas" "-ui" "page" "page" - "export" "content-type" "text/html" - "export" "serve-file" "$page" + "importas" + "-ui" + "page" + "page" + "export" + "content-type" + "text/html" + "export" + "serve-file" + "$page" depot.users.Profpatsch.netencode.env-splice-record ] - runOr return500 - "if" [ - "pipeline" [ bins.printf '' - HTTP/1.1 200 OK - Content-Type: {{{content-type}}}; charset=UTF-8 - Connection: close - - '' ] + runOr + return500 + "if" + [ + "pipeline" + [ + bins.printf + '' + HTTP/1.1 200 OK + Content-Type: {{{content-type}}}; charset=UTF-8 + Connection: close + + '' + ] depot.users.Profpatsch.netencode.netencode-mustache ] - "pipeline" [ "importas" "t" "TEMPLATE_DATA" bins.printf "%s" "$t" ] + "pipeline" + [ "importas" "t" "TEMPLATE_DATA" bins.printf "%s" "$t" ] depot.users.Profpatsch.netencode.record-splice-env - "importas" "-ui" "serve-file" "serve-file" - bins.cat "$serve-file" + "importas" + "-ui" + "serve-file" + "serve-file" + bins.cat + "$serve-file" ]; # run argv or $1 if argv returns a failure status code. runOr = depot.nix.writeExecline "run-or" { readNArgs = 1; } [ - "foreground" [ "$@" ] - "importas" "?" "?" - "ifelse" [ bins.test "$?" "-eq" "0" ] - [] - "if" [ depot.tools.eprintf "runOr: exited \${?}, running \${1}\n" ] + "foreground" + [ "$@" ] + "importas" + "?" + "?" + "ifelse" + [ bins.test "$?" "-eq" "0" ] + [ ] + "if" + [ depot.tools.eprintf "runOr: exited \${?}, running \${1}\n" ] "$1" ]; - return400 = depot.nix.writeExecline "return400" {} [ - bins.printf "%s" '' + return400 = depot.nix.writeExecline "return400" { } [ + bins.printf + "%s" + '' HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=UTF-8 Connection: close @@ -277,8 +351,10 @@ let '' ]; - return404 = depot.nix.writeExecline "return404" {} [ - bins.printf "%s" '' + return404 = depot.nix.writeExecline "return404" { } [ + bins.printf + "%s" + '' HTTP/1.1 404 Not Found Content-Type: text/plain; charset=UTF-8 Connection: close @@ -287,8 +363,10 @@ let '' ]; - return500 = depot.nix.writeExecline "return500" {} [ - bins.printf "%s" '' + return500 = depot.nix.writeExecline "return500" { } [ + bins.printf + "%s" + '' HTTP/1.1 500 Internal Server Error Content-Type: text/plain; charset=UTF-8 Connection: close @@ -297,10 +375,11 @@ let '' ]; - capture-stdin = depot.nix.writers.rustSimple { - name = "capture-stdin"; - dependencies = [ depot.users.Profpatsch.execline.exec-helpers ]; - } '' + capture-stdin = depot.nix.writers.rustSimple + { + name = "capture-stdin"; + dependencies = [ depot.users.Profpatsch.execline.exec-helpers ]; + } '' extern crate exec_helpers; use std::io::Read; fn main() { @@ -337,29 +416,40 @@ let cdbRecords = with depot.nix.yants; defun [ (attrs (either drv string)) string ] - (attrs: - (lib.concatStrings (lib.mapAttrsToList cdbRecord attrs)) + "\n"); + (attrs: + (lib.concatStrings (lib.mapAttrsToList cdbRecord attrs)) + "\n"); # run cdbmake on a list of key/value pairs (strings - cdbMake = name: attrs: depot.nix.runExecline "${name}.cdb" { - stdin = cdbRecords attrs; - } [ - "importas" "out" "out" + cdbMake = name: attrs: depot.nix.runExecline "${name}.cdb" + { + stdin = cdbRecords attrs; + } [ + "importas" + "out" + "out" depot.users.Profpatsch.lib.eprint-stdin - "if" [ bins.cdbmake "db" "tmp" ] - bins.mv "db" "$out" + "if" + [ bins.cdbmake "db" "tmp" ] + bins.mv + "db" + "$out" ]; # look up a key ($2) in the given cdb ($1) cdbLookup = depot.nix.writeExecline "cdb-lookup" { readNArgs = 2; } [ # cdb ($1) on stdin - "redirfd" "-r" "0" "$1" + "redirfd" + "-r" + "0" + "$1" # key ($2) lookup - bins.cdbget "$2" + bins.cdbget + "$2" ]; -in depot.nix.readTree.drvTargets { - inherit +in +depot.nix.readTree.drvTargets { + inherit router depotCgitLink site-server diff --git a/users/Profpatsch/cdb.nix b/users/Profpatsch/cdb.nix index 8cfaa3ea7ac6..86e0a2d58f24 100644 --- a/users/Profpatsch/cdb.nix +++ b/users/Profpatsch/cdb.nix @@ -1,14 +1,15 @@ { depot, pkgs, ... }: let - cdbListToNetencode = depot.nix.writers.rustSimple { - name = "cdb-list-to-netencode"; - dependencies = [ - depot.third_party.rust-crates.nom - depot.users.Profpatsch.execline.exec-helpers - depot.users.Profpatsch.netencode.netencode-rs - ]; - } '' + cdbListToNetencode = depot.nix.writers.rustSimple + { + name = "cdb-list-to-netencode"; + dependencies = [ + depot.third_party.rust-crates.nom + depot.users.Profpatsch.execline.exec-helpers + depot.users.Profpatsch.netencode.netencode-rs + ]; + } '' extern crate nom; extern crate exec_helpers; extern crate netencode; @@ -84,7 +85,8 @@ let ''; -in { +in +{ inherit cdbListToNetencode ; diff --git a/users/Profpatsch/emacs-tree-sitter-move/default.nix b/users/Profpatsch/emacs-tree-sitter-move/default.nix index fdc059c089b6..a9f259d96d20 100644 --- a/users/Profpatsch/emacs-tree-sitter-move/default.nix +++ b/users/Profpatsch/emacs-tree-sitter-move/default.nix @@ -1,3 +1,3 @@ # nothing yet (TODO: expose shell & tool) -{...}: -{} +{ ... }: +{ } diff --git a/users/Profpatsch/emacs-tree-sitter-move/shell.nix b/users/Profpatsch/emacs-tree-sitter-move/shell.nix index 81d622ac73e5..f400d5c02161 100644 --- a/users/Profpatsch/emacs-tree-sitter-move/shell.nix +++ b/users/Profpatsch/emacs-tree-sitter-move/shell.nix @@ -1,14 +1,15 @@ -{ pkgs ? import ../../../third_party {}, ... }: +{ pkgs ? import ../../../third_party { }, ... }: let inherit (pkgs) lib; - treeSitterGrammars = pkgs.runCommandLocal "grammars" {} '' + treeSitterGrammars = pkgs.runCommandLocal "grammars" { } '' mkdir -p $out/bin ${lib.concatStringsSep "\n" (lib.mapAttrsToList (name: src: "ln -s ${src}/parser $out/bin/${name}.so") pkgs.tree-sitter.builtGrammars)}; ''; -in pkgs.mkShell { +in +pkgs.mkShell { buildInputs = [ pkgs.tree-sitter.builtGrammars.python ]; diff --git a/users/Profpatsch/execline/default.nix b/users/Profpatsch/execline/default.nix index c6a8d284a634..752774e6ad0c 100644 --- a/users/Profpatsch/execline/default.nix +++ b/users/Profpatsch/execline/default.nix @@ -1,16 +1,19 @@ { depot, pkgs, lib, ... }: let - exec-helpers = depot.nix.writers.rustSimpleLib { - name = "exec-helpers"; - } (builtins.readFile ./exec_helpers.rs); + exec-helpers = depot.nix.writers.rustSimpleLib + { + name = "exec-helpers"; + } + (builtins.readFile ./exec_helpers.rs); - print-one-env = depot.nix.writers.rustSimple { - name = "print-one-env"; - dependencies = [ - depot.users.Profpatsch.execline.exec-helpers - ]; - } '' + print-one-env = depot.nix.writers.rustSimple + { + name = "print-one-env"; + dependencies = [ + depot.users.Profpatsch.execline.exec-helpers + ]; + } '' extern crate exec_helpers; use std::os::unix::ffi::OsStrExt; use std::io::Write; @@ -25,7 +28,8 @@ let } ''; -in depot.nix.readTree.drvTargets { +in +depot.nix.readTree.drvTargets { inherit exec-helpers print-one-env diff --git a/users/Profpatsch/git-db/default.nix b/users/Profpatsch/git-db/default.nix index 7c6f1aee7c5c..ad5d927677bf 100644 --- a/users/Profpatsch/git-db/default.nix +++ b/users/Profpatsch/git-db/default.nix @@ -1,8 +1,10 @@ { depot, pkgs, lib, ... }: -depot.nix.writers.rustSimple { +depot.nix.writers.rustSimple +{ name = "git-db"; dependencies = [ depot.third_party.rust-crates.git2 ]; -} (builtins.readFile ./git-db.rs) +} + (builtins.readFile ./git-db.rs) diff --git a/users/Profpatsch/imap-idle.nix b/users/Profpatsch/imap-idle.nix index 3ad5375d89af..84af5d0e54a9 100644 --- a/users/Profpatsch/imap-idle.nix +++ b/users/Profpatsch/imap-idle.nix @@ -1,14 +1,17 @@ { depot, pkgs, lib, ... }: let - imap-idle = depot.nix.writers.rustSimple { - name = "imap-idle"; - dependencies = [ - depot.users.Profpatsch.arglib.netencode.rust - depot.third_party.rust-crates.imap - depot.third_party.rust-crates.epoll - depot.users.Profpatsch.execline.exec-helpers - ]; - } (builtins.readFile ./imap-idle.rs); + imap-idle = depot.nix.writers.rustSimple + { + name = "imap-idle"; + dependencies = [ + depot.users.Profpatsch.arglib.netencode.rust + depot.third_party.rust-crates.imap + depot.third_party.rust-crates.epoll + depot.users.Profpatsch.execline.exec-helpers + ]; + } + (builtins.readFile ./imap-idle.rs); -in imap-idle +in +imap-idle diff --git a/users/Profpatsch/lens.nix b/users/Profpatsch/lens.nix index 58d9c27f5242..28f7506bddae 100644 --- a/users/Profpatsch/lens.nix +++ b/users/Profpatsch/lens.nix @@ -32,7 +32,7 @@ let inherit fst snd; }; - swap = {fst, snd}: { + swap = { fst, snd }: { fst = snd; snd = fst; }; @@ -71,7 +71,7 @@ let lensP = strong: to: pab: strong.dimap to - ({fst,snd}: snd fst) + ({ fst, snd }: snd fst) (strong.firstP pab); # first element of a tuple @@ -112,7 +112,8 @@ let (map (accessor: accessor profunctorSubclass) accessors); -in { +in +{ inherit id _ diff --git a/users/Profpatsch/lib.nix b/users/Profpatsch/lib.nix index e3d59b7d8beb..879d87755d56 100644 --- a/users/Profpatsch/lib.nix +++ b/users/Profpatsch/lib.nix @@ -1,34 +1,49 @@ { depot, pkgs, ... }: let bins = depot.nix.getBins pkgs.coreutils [ "printf" "echo" "cat" "printenv" "tee" ] - // depot.nix.getBins pkgs.bash [ "bash" ] - // depot.nix.getBins pkgs.fdtools [ "multitee" ] - ; + // depot.nix.getBins pkgs.bash [ "bash" ] + // depot.nix.getBins pkgs.fdtools [ "multitee" ] + ; # Print `msg` and and argv to stderr, then execute into argv - debugExec = msg: depot.nix.writeExecline "debug-exec" {} [ - "if" [ - "fdmove" "-c" "1" "2" - "if" [ bins.printf "%s: " msg ] - "if" [ bins.echo "$@" ] + debugExec = msg: depot.nix.writeExecline "debug-exec" { } [ + "if" + [ + "fdmove" + "-c" + "1" + "2" + "if" + [ bins.printf "%s: " msg ] + "if" + [ bins.echo "$@" ] ] "$@" ]; # Print stdin to stderr and stdout - eprint-stdin = depot.nix.writeExecline "eprint-stdin" {} [ - "pipeline" [ bins.multitee "0-1,2" ] "$@" + eprint-stdin = depot.nix.writeExecline "eprint-stdin" { } [ + "pipeline" + [ bins.multitee "0-1,2" ] + "$@" ]; # Assume the input on stdin is netencode, pretty print it to stderr and forward it to stdout - eprint-stdin-netencode = depot.nix.writeExecline "eprint-stdin-netencode" {} [ - "pipeline" [ + eprint-stdin-netencode = depot.nix.writeExecline "eprint-stdin-netencode" { } [ + "pipeline" + [ # move stdout to 3 - "fdmove" "3" "1" + "fdmove" + "3" + "1" # the multitee copies stdin to 1 (the other pipeline end) and 3 (the stdout of the outer pipeline block) - "pipeline" [ bins.multitee "0-1,3" ] + "pipeline" + [ bins.multitee "0-1,3" ] # make stderr the stdout of pretty, merging with the stderr of pretty - "fdmove" "-c" "1" "2" + "fdmove" + "-c" + "1" + "2" depot.users.Profpatsch.netencode.pretty ] "$@" @@ -36,9 +51,11 @@ let # print the given environment variable in $1 to stderr, then execute into the rest of argv eprintenv = depot.nix.writeExecline "eprintenv" { readNArgs = 1; } [ - "ifelse" [ "fdmove" "-c" "1" "2" bins.printenv "$1" ] + "ifelse" + [ "fdmove" "-c" "1" "2" bins.printenv "$1" ] [ "$@" ] - "if" [ depot.tools.eprintf "eprintenv: could not find \"\${1}\" in the environment\n" ] + "if" + [ depot.tools.eprintf "eprintenv: could not find \"\${1}\" in the environment\n" ] "$@" ]; @@ -52,24 +69,34 @@ let # stdout: foo\n # stderr: foo\nbar\n split-stdin = depot.nix.writeExecline "split-stdin" { argMode = "env"; } [ - "pipeline" [ + "pipeline" + [ # this is horrible yes but the quickest way I knew how to implement it - "runblock" "1" bins.bash "-c" ''${bins.tee} >("$@")'' "bash-split-stdin" + "runblock" + "1" + bins.bash + "-c" + ''${bins.tee} >("$@")'' + "bash-split-stdin" ] - "runblock" "-r" "1" + "runblock" + "-r" + "1" ]; # remove everything but a few selected environment variables runInEmptyEnv = keepVars: let - importas = pkgs.lib.concatMap (var: [ "importas" "-i" var var ]) keepVars; - # we have to explicitely call export here, because PATH is probably empty - export = pkgs.lib.concatMap (var: [ "${pkgs.execline}/bin/export" var ''''${${var}}'' ]) keepVars; - in depot.nix.writeExecline "empty-env" {} - (importas ++ [ "emptyenv" ] ++ export ++ [ "${pkgs.execline}/bin/exec" "$@" ]); + importas = pkgs.lib.concatMap (var: [ "importas" "-i" var var ]) keepVars; + # we have to explicitely call export here, because PATH is probably empty + export = pkgs.lib.concatMap (var: [ "${pkgs.execline}/bin/export" var ''''${${var}}'' ]) keepVars; + in + depot.nix.writeExecline "empty-env" { } + (importas ++ [ "emptyenv" ] ++ export ++ [ "${pkgs.execline}/bin/exec" "$@" ]); -in { +in +{ inherit debugExec eprint-stdin diff --git a/users/Profpatsch/netencode/default.nix b/users/Profpatsch/netencode/default.nix index 739bda3d78c9..d38925814832 100644 --- a/users/Profpatsch/netencode/default.nix +++ b/users/Profpatsch/netencode/default.nix @@ -1,31 +1,36 @@ { depot, pkgs, lib, ... }: let - netencode-rs = depot.nix.writers.rustSimpleLib { + netencode-rs = depot.nix.writers.rustSimpleLib + { name = "netencode"; dependencies = [ depot.third_party.rust-crates.nom depot.users.Profpatsch.execline.exec-helpers ]; - } (builtins.readFile ./netencode.rs); + } + (builtins.readFile ./netencode.rs); gen = import ./gen.nix { inherit lib; }; - pretty-rs = depot.nix.writers.rustSimpleLib { - name = "netencode-pretty"; - dependencies = [ - netencode-rs - ]; - } (builtins.readFile ./pretty.rs); + pretty-rs = depot.nix.writers.rustSimpleLib + { + name = "netencode-pretty"; + dependencies = [ + netencode-rs + ]; + } + (builtins.readFile ./pretty.rs); - pretty = depot.nix.writers.rustSimple { - name = "netencode-pretty"; - dependencies = [ - netencode-rs - pretty-rs - depot.users.Profpatsch.execline.exec-helpers - ]; - } '' + pretty = depot.nix.writers.rustSimple + { + name = "netencode-pretty"; + dependencies = [ + netencode-rs + pretty-rs + depot.users.Profpatsch.execline.exec-helpers + ]; + } '' extern crate netencode; extern crate netencode_pretty; extern crate exec_helpers; @@ -41,24 +46,27 @@ let } ''; - netencode-mustache = depot.nix.writers.rustSimple { - name = "netencode_mustache"; - dependencies = [ - depot.users.Profpatsch.arglib.netencode.rust - netencode-rs - depot.third_party.rust-crates.mustache - ]; - } (builtins.readFile ./netencode-mustache.rs); + netencode-mustache = depot.nix.writers.rustSimple + { + name = "netencode_mustache"; + dependencies = [ + depot.users.Profpatsch.arglib.netencode.rust + netencode-rs + depot.third_party.rust-crates.mustache + ]; + } + (builtins.readFile ./netencode-mustache.rs); - record-get = depot.nix.writers.rustSimple { - name = "record-get"; - dependencies = [ - netencode-rs - depot.users.Profpatsch.execline.exec-helpers - depot.users.Profpatsch.arglib.netencode.rust - ]; - } '' + record-get = depot.nix.writers.rustSimple + { + name = "record-get"; + dependencies = [ + netencode-rs + depot.users.Profpatsch.execline.exec-helpers + depot.users.Profpatsch.arglib.netencode.rust + ]; + } '' extern crate netencode; extern crate arglib_netencode; extern crate exec_helpers; @@ -80,13 +88,14 @@ let } ''; - record-splice-env = depot.nix.writers.rustSimple { - name = "record-splice-env"; - dependencies = [ - netencode-rs - depot.users.Profpatsch.execline.exec-helpers - ]; - } '' + record-splice-env = depot.nix.writers.rustSimple + { + name = "record-splice-env"; + dependencies = [ + netencode-rs + depot.users.Profpatsch.execline.exec-helpers + ]; + } '' extern crate netencode; extern crate exec_helpers; use netencode::dec::{Record, Try, ScalarAsBytes, Decoder, DecodeError}; @@ -109,13 +118,14 @@ let } ''; - env-splice-record = depot.nix.writers.rustSimple { - name = "env-splice-record"; - dependencies = [ - netencode-rs - depot.users.Profpatsch.execline.exec-helpers - ]; - } '' + env-splice-record = depot.nix.writers.rustSimple + { + name = "env-splice-record"; + dependencies = [ + netencode-rs + depot.users.Profpatsch.execline.exec-helpers + ]; + } '' extern crate netencode; extern crate exec_helpers; use netencode::{T}; @@ -135,7 +145,8 @@ let } ''; -in depot.nix.readTree.drvTargets { +in +depot.nix.readTree.drvTargets { inherit netencode-rs pretty-rs diff --git a/users/Profpatsch/netencode/gen.nix b/users/Profpatsch/netencode/gen.nix index 305ff7b08dd6..efc9629ca0df 100644 --- a/users/Profpatsch/netencode/gen.nix +++ b/users/Profpatsch/netencode/gen.nix @@ -27,29 +27,33 @@ let concatStrings = builtins.concatStringsSep ""; record = lokv: netstring "{" "}" - (concatStrings (map ({key, val}: tag key val) lokv)); + (concatStrings (map ({ key, val }: tag key val) lokv)); list = l: netstring "[" "]" (concatStrings l); dwim = val: - let match = { - "bool" = n1; - "int" = i6; - "string" = text; - "set" = attrs: - # it could be a derivation, then just return the path - if attrs.type or "" == "derivation" then text "${attrs}" - else - record (lib.mapAttrsToList - (k: v: { - key = k; - val = dwim v; - }) attrs); - "list" = l: list (map dwim l); - }; - in match.${builtins.typeOf val} val; + let + match = { + "bool" = n1; + "int" = i6; + "string" = text; + "set" = attrs: + # it could be a derivation, then just return the path + if attrs.type or "" == "derivation" then text "${attrs}" + else + record (lib.mapAttrsToList + (k: v: { + key = k; + val = dwim v; + }) + attrs); + "list" = l: list (map dwim l); + }; + in + match.${builtins.typeOf val} val; -in { +in +{ inherit unit n1 diff --git a/users/Profpatsch/netstring/default.nix b/users/Profpatsch/netstring/default.nix index b4990cae6766..e85cf24dd8e6 100644 --- a/users/Profpatsch/netstring/default.nix +++ b/users/Profpatsch/netstring/default.nix @@ -12,9 +12,10 @@ let (k: v: toNetstring (toNetstring k + toNetstring v)) attrs); - python-netstring = depot.users.Profpatsch.writers.python3Lib { - name = "netstring"; - } '' + python-netstring = depot.users.Profpatsch.writers.python3Lib + { + name = "netstring"; + } '' def read_netstring(bytes): (int_length, rest) = bytes.split(sep=b':', maxsplit=1) val = rest[:int(int_length)] @@ -39,9 +40,10 @@ let return res ''; - rust-netstring = depot.nix.writers.rustSimpleLib { - name = "netstring"; - } '' + rust-netstring = depot.nix.writers.rustSimpleLib + { + name = "netstring"; + } '' pub fn to_netstring(s: &[u8]) -> Vec<u8> { let len = s.len(); // length of the integer as ascii @@ -55,12 +57,13 @@ let } ''; -in depot.nix.readTree.drvTargets { +in +depot.nix.readTree.drvTargets { inherit toNetstring toNetstringList toNetstringKeyVal python-netstring rust-netstring - ; + ; } diff --git a/users/Profpatsch/netstring/tests/default.nix b/users/Profpatsch/netstring/tests/default.nix index 710ba3d30526..6a1062988f1e 100644 --- a/users/Profpatsch/netstring/tests/default.nix +++ b/users/Profpatsch/netstring/tests/default.nix @@ -2,12 +2,13 @@ let - python-netstring-test = depot.users.Profpatsch.writers.python3 { - name = "python-netstring-test"; - libraries = p: [ - depot.users.Profpatsch.netstring.python-netstring - ]; - } '' + python-netstring-test = depot.users.Profpatsch.writers.python3 + { + name = "python-netstring-test"; + libraries = p: [ + depot.users.Profpatsch.netstring.python-netstring + ]; + } '' import netstring def assEq(left, right): @@ -33,12 +34,13 @@ let ) ''; - rust-netstring-test = depot.nix.writers.rustSimple { - name = "rust-netstring-test"; - dependencies = [ - depot.users.Profpatsch.netstring.rust-netstring - ]; - } '' + rust-netstring-test = depot.nix.writers.rustSimple + { + name = "rust-netstring-test"; + dependencies = [ + depot.users.Profpatsch.netstring.rust-netstring + ]; + } '' extern crate netstring; fn main() { @@ -53,7 +55,8 @@ let } ''; -in depot.nix.readTree.drvTargets { +in +depot.nix.readTree.drvTargets { inherit python-netstring-test rust-netstring-test diff --git a/users/Profpatsch/nix-home/default.nix b/users/Profpatsch/nix-home/default.nix index cf9ab0d4d4ae..8f52055ade31 100644 --- a/users/Profpatsch/nix-home/default.nix +++ b/users/Profpatsch/nix-home/default.nix @@ -2,97 +2,145 @@ let bins = depot.nix.getBins pkgs.stow [ "stow" ] - // depot.nix.getBins pkgs.coreutils [ "mkdir" "ln" "printenv" "rm" ] - // depot.nix.getBins pkgs.xe [ "xe" ] - // depot.nix.getBins pkgs.lr [ "lr" ] - // depot.nix.getBins pkgs.nix [ "nix-store" ] - ; + // depot.nix.getBins pkgs.coreutils [ "mkdir" "ln" "printenv" "rm" ] + // depot.nix.getBins pkgs.xe [ "xe" ] + // depot.nix.getBins pkgs.lr [ "lr" ] + // depot.nix.getBins pkgs.nix [ "nix-store" ] + ; # run stow to populate the target directory with the given stow package, read from stowDir. # Bear in mind that `stowDirOriginPath` should always be semantically bound to the given `stowDir`, otherwise stow might become rather confused. - runStow = { - # “stow package” to stow (see manpage) - stowPackage, - # “target directory” to stow in (see manpage) - targetDir, - # The “stow directory” (see manpage), containing “stow packages” (see manpage) - stowDir, - # representative directory for the stowDir in the file system, against which stow will create relative links. - # ATTN: this is always overwritten with the contents of `stowDir`! You shouldn’t re-use the same `stowDirOriginPath` for different `stowDir`s, otherwise there might be surprises. - stowDirOriginPath, - }: depot.nix.writeExecline "stow-${stowPackage}" {} [ - # first, create a temporary stow directory to use as source - # (stow will use it to determine the origin of files) - "if" [ bins.mkdir "-p" stowDirOriginPath ] - # remove old symlinks - "if" [ - "pipeline" [ - bins.lr "-0" "-t" "depth == 1 && type == l" stowDirOriginPath + runStow = + { + # “stow package” to stow (see manpage) + stowPackage + , # “target directory” to stow in (see manpage) + targetDir + , # The “stow directory” (see manpage), containing “stow packages” (see manpage) + stowDir + , # representative directory for the stowDir in the file system, against which stow will create relative links. + # ATTN: this is always overwritten with the contents of `stowDir`! You shouldn’t re-use the same `stowDirOriginPath` for different `stowDir`s, otherwise there might be surprises. + stowDirOriginPath + , + }: depot.nix.writeExecline "stow-${stowPackage}" { } [ + # first, create a temporary stow directory to use as source + # (stow will use it to determine the origin of files) + "if" + [ bins.mkdir "-p" stowDirOriginPath ] + # remove old symlinks + "if" + [ + "pipeline" + [ + bins.lr + "-0" + "-t" + "depth == 1 && type == l" + stowDirOriginPath + ] + bins.xe + "-0" + bins.rm ] - bins.xe "-0" bins.rm - ] - # create an indirect gc root so our config is not cleaned under our asses by a garbage collect - "if" [ - bins.nix-store + # create an indirect gc root so our config is not cleaned under our asses by a garbage collect + "if" + [ + bins.nix-store "--realise" "--indirect" - "--add-root" "${stowDirOriginPath}/.nix-stowdir-gc-root" + "--add-root" + "${stowDirOriginPath}/.nix-stowdir-gc-root" stowDir - ] - # populate with new stow targets - "if" [ - "elglob" "-w0" "stowPackages" "${stowDir}/*" - bins.ln "--force" "-st" stowDirOriginPath "$stowPackages" - ] - # stow always looks for $HOME/.stowrc to read more arguments - "export" "HOME" "/homeless-shelter" - bins.stow + ] + # populate with new stow targets + "if" + [ + "elglob" + "-w0" + "stowPackages" + "${stowDir}/*" + bins.ln + "--force" + "-st" + stowDirOriginPath + "$stowPackages" + ] + # stow always looks for $HOME/.stowrc to read more arguments + "export" + "HOME" + "/homeless-shelter" + bins.stow # always run restow for now; this does more stat but will remove stale links "--restow" - "--dir" stowDirOriginPath - "--target" targetDir + "--dir" + stowDirOriginPath + "--target" + targetDir stowPackage - ]; + ]; # create a stow dir from a list of drv paths and a stow package name. makeStowDir = (with depot.nix.yants; - defun - [ (list (struct { + defun + [ + (list (struct { originalDir = drv; stowPackage = string; })) drv - ] ) - (dirs: - depot.nix.runExecline "make-stow-dir" { - stdin = lib.pipe dirs [ - (map depot.users.Profpatsch.netencode.gen.dwim) - depot.users.Profpatsch.netstring.toNetstringList - ]; - } [ - "importas" "out" "out" - "if" [ bins.mkdir "-p" "$out" ] - "forstdin" "-d" "" "-o" "0" "line" - "pipeline" [ - depot.users.Profpatsch.execline.print-one-env "line" - ] - depot.users.Profpatsch.netencode.record-splice-env - "importas" "-ui" "originalDir" "originalDir" - "importas" "-ui" "stowPackage" "stowPackage" - bins.ln "-sT" "$originalDir" "\${out}/\${stowPackage}" - ]); + ]) + (dirs: + depot.nix.runExecline "make-stow-dir" + { + stdin = lib.pipe dirs [ + (map depot.users.Profpatsch.netencode.gen.dwim) + depot.users.Profpatsch.netstring.toNetstringList + ]; + } [ + "importas" + "out" + "out" + "if" + [ bins.mkdir "-p" "$out" ] + "forstdin" + "-d" + "" + "-o" + "0" + "line" + "pipeline" + [ + depot.users.Profpatsch.execline.print-one-env + "line" + ] + depot.users.Profpatsch.netencode.record-splice-env + "importas" + "-ui" + "originalDir" + "originalDir" + "importas" + "-ui" + "stowPackage" + "stowPackage" + bins.ln + "-sT" + "$originalDir" + "\${out}/\${stowPackage}" + ]); in # TODO: temp setup -lib.pipe {} [ +lib.pipe { } [ (_: makeStowDir [{ stowPackage = "scripts"; originalDir = pkgs.linkFarm "scripts-farm" [ - { name = "scripts/ytextr"; - path = depot.users.Profpatsch.ytextr; } - ]; + { + name = "scripts/ytextr"; + path = depot.users.Profpatsch.ytextr; + } + ]; }]) (d: runStow { stowDir = d; diff --git a/users/Profpatsch/nixpkgs-rewriter/default.nix b/users/Profpatsch/nixpkgs-rewriter/default.nix index 787162d4973a..0740a870aa4a 100644 --- a/users/Profpatsch/nixpkgs-rewriter/default.nix +++ b/users/Profpatsch/nixpkgs-rewriter/default.nix @@ -8,12 +8,12 @@ let ; bins = depot.nix.getBins pkgs.coreutils [ "head" "shuf" ] - // depot.nix.getBins pkgs.jq [ "jq" ] - // depot.nix.getBins pkgs.findutils [ "xargs" ] - // depot.nix.getBins pkgs.gnused [ "sed" ] - ; + // depot.nix.getBins pkgs.jq [ "jq" ] + // depot.nix.getBins pkgs.findutils [ "xargs" ] + // depot.nix.getBins pkgs.gnused [ "sed" ] + ; - export-json-object = pkgs.writers.writePython3 "export-json-object" {} '' + export-json-object = pkgs.writers.writePython3 "export-json-object" { } '' import json import sys import os @@ -29,34 +29,50 @@ let os.execvp(sys.argv[1], sys.argv[1:]) ''; - meta-stdenv-lib = pkgs.writers.writeHaskell "meta-stdenv-lib" { - libraries = [ - pkgs.haskellPackages.hnix - pkgs.haskellPackages.aeson - ]; - } ./MetaStdenvLib.hs; + meta-stdenv-lib = pkgs.writers.writeHaskell "meta-stdenv-lib" + { + libraries = [ + pkgs.haskellPackages.hnix + pkgs.haskellPackages.aeson + ]; + } ./MetaStdenvLib.hs; replace-between-lines = writeExecline "replace-between-lines" { readNArgs = 1; } [ - "importas" "-ui" "file" "fileName" - "importas" "-ui" "from" "fromLine" - "importas" "-ui" "to" "toLine" - "if" [ depot.tools.eprintf "%s-%s\n" "$from" "$to" ] + "importas" + "-ui" + "file" + "fileName" + "importas" + "-ui" + "from" + "fromLine" + "importas" + "-ui" + "to" + "toLine" + "if" + [ depot.tools.eprintf "%s-%s\n" "$from" "$to" ] (debugExec "adding lib") bins.sed - "-e" "\${from},\${to} \${1}" - "-i" "$file" + "-e" + "\${from},\${to} \${1}" + "-i" + "$file" ]; add-lib-if-necessary = writeExecline "add-lib-if-necessary" { readNArgs = 1; } [ - "pipeline" [ meta-stdenv-lib "$1" ] - export-json-object - # first replace any stdenv.lib mentions in the arg header - # if this is not done, the replace below kills these. - # Since we want it anyway ultimately, let’s do it here. - "if" [ replace-between-lines "s/stdenv\.lib/lib/" ] - # then add the lib argument - # (has to be before stdenv, otherwise default arguments might be in the way) - replace-between-lines "s/stdenv/lib, stdenv/" + "pipeline" + [ meta-stdenv-lib "$1" ] + export-json-object + # first replace any stdenv.lib mentions in the arg header + # if this is not done, the replace below kills these. + # Since we want it anyway ultimately, let’s do it here. + "if" + [ replace-between-lines "s/stdenv\.lib/lib/" ] + # then add the lib argument + # (has to be before stdenv, otherwise default arguments might be in the way) + replace-between-lines + "s/stdenv/lib, stdenv/" ]; metaString = ''meta = with stdenv.lib; {''; @@ -80,33 +96,53 @@ let ''; instantiate-nixpkgs-randomly = writeExecline "instantiate-nixpkgs-randomly" { readNArgs = 1; } [ - "export" "NIXPKGS_ALLOW_BROKEN" "1" - "export" "NIXPKGS_ALLOW_UNFREE" "1" - "export" "NIXPKGS_ALLOW_INSECURE" "1" - "export" "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" "1" - "pipeline" [ + "export" + "NIXPKGS_ALLOW_BROKEN" + "1" + "export" + "NIXPKGS_ALLOW_UNFREE" + "1" + "export" + "NIXPKGS_ALLOW_INSECURE" + "1" + "export" + "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" + "1" + "pipeline" + [ "nix" - "eval" - "--raw" - ''( + "eval" + "--raw" + ''( let pkgs = import ''${1} {}; in builtins.toJSON (builtins.attrNames pkgs) )'' ] - "pipeline" [ bins.jq "-r" ".[]" ] - "pipeline" [ bins.shuf ] - "pipeline" [ bins.head "-n" "1000" ] - bins.xargs "-I" "{}" "-n1" - "if" [ depot.tools.eprintf "instantiating %s\n" "{}" ] - "nix-instantiate" "$1" "-A" "{}" + "pipeline" + [ bins.jq "-r" ".[]" ] + "pipeline" + [ bins.shuf ] + "pipeline" + [ bins.head "-n" "1000" ] + bins.xargs + "-I" + "{}" + "-n1" + "if" + [ depot.tools.eprintf "instantiating %s\n" "{}" ] + "nix-instantiate" + "$1" + "-A" + "{}" ]; -in depot.nix.readTree.drvTargets { +in +depot.nix.readTree.drvTargets { inherit - instantiate-nixpkgs-randomly - # requires hnix, which we don’t want in tvl for now - # uncomment manually if you want to use it. - # meta-stdenv-lib - # replace-stdenv-lib + instantiate-nixpkgs-randomly + # requires hnix, which we don’t want in tvl for now + # uncomment manually if you want to use it. + # meta-stdenv-lib + # replace-stdenv-lib ; } diff --git a/users/Profpatsch/read-http.nix b/users/Profpatsch/read-http.nix index 854a11b7d099..d9ad6fc30d94 100644 --- a/users/Profpatsch/read-http.nix +++ b/users/Profpatsch/read-http.nix @@ -2,15 +2,18 @@ let - read-http = depot.nix.writers.rustSimple { - name = "read-http"; - dependencies = [ - depot.third_party.rust-crates.ascii - depot.third_party.rust-crates.httparse - depot.users.Profpatsch.netencode.netencode-rs - depot.users.Profpatsch.arglib.netencode.rust - depot.users.Profpatsch.execline.exec-helpers - ]; - } (builtins.readFile ./read-http.rs); + read-http = depot.nix.writers.rustSimple + { + name = "read-http"; + dependencies = [ + depot.third_party.rust-crates.ascii + depot.third_party.rust-crates.httparse + depot.users.Profpatsch.netencode.netencode-rs + depot.users.Profpatsch.arglib.netencode.rust + depot.users.Profpatsch.execline.exec-helpers + ]; + } + (builtins.readFile ./read-http.rs); -in read-http +in +read-http diff --git a/users/Profpatsch/reverse-haskell-deps.nix b/users/Profpatsch/reverse-haskell-deps.nix index b47347ea9fea..6df7bc6329cd 100644 --- a/users/Profpatsch/reverse-haskell-deps.nix +++ b/users/Profpatsch/reverse-haskell-deps.nix @@ -5,22 +5,27 @@ let - rev = depot.nix.writeExecline "reverse-haskell-deps" {} [ - "pipeline" [ - "${pkgs.curl}/bin/curl" "-L" "https://packdeps.haskellers.com/reverse" + rev = depot.nix.writeExecline "reverse-haskell-deps" { } [ + "pipeline" + [ + "${pkgs.curl}/bin/curl" + "-L" + "https://packdeps.haskellers.com/reverse" ] rev-hs ]; - rev-hs = pkgs.writers.writeHaskell "revers-haskell-deps-hs" { - libraries = [ - pkgs.haskellPackages.nicify-lib - pkgs.haskellPackages.tagsoup - ]; + rev-hs = pkgs.writers.writeHaskell "revers-haskell-deps-hs" + { + libraries = [ + pkgs.haskellPackages.nicify-lib + pkgs.haskellPackages.tagsoup + ]; - } + } ./reverse-haskell-deps.hs; -in rev +in +rev diff --git a/users/Profpatsch/struct-edit/default.nix b/users/Profpatsch/struct-edit/default.nix index 970cdd4d028b..11a7200ce427 100644 --- a/users/Profpatsch/struct-edit/default.nix +++ b/users/Profpatsch/struct-edit/default.nix @@ -1,13 +1,13 @@ { depot, ... }: depot.nix.buildGo.program { - name = "struct-edit"; - srcs = [ - ./main.go - ]; - deps = [ - depot.third_party.gopkgs."github.com".charmbracelet.bubbletea - depot.third_party.gopkgs."github.com".charmbracelet.lipgloss - depot.third_party.gopkgs."github.com".muesli.termenv - depot.third_party.gopkgs."github.com".mattn.go-isatty - ]; + name = "struct-edit"; + srcs = [ + ./main.go + ]; + deps = [ + depot.third_party.gopkgs."github.com".charmbracelet.bubbletea + depot.third_party.gopkgs."github.com".charmbracelet.lipgloss + depot.third_party.gopkgs."github.com".muesli.termenv + depot.third_party.gopkgs."github.com".mattn.go-isatty + ]; } diff --git a/users/Profpatsch/tree-sitter.nix b/users/Profpatsch/tree-sitter.nix index 4f81b8e7a77c..2224da2a3b8c 100644 --- a/users/Profpatsch/tree-sitter.nix +++ b/users/Profpatsch/tree-sitter.nix @@ -2,17 +2,18 @@ let bins = depot.nix.getBins pkgs.coreutils [ "head" "printf" "cat" ] - // depot.nix.getBins pkgs.ncurses [ "tput" ] - // depot.nix.getBins pkgs.bc [ "bc" ] - // depot.nix.getBins pkgs.ocamlPackages.sexp [ "sexp" ]; - - print-ast = depot.nix.writers.rustSimple { - name = "print-ast"; - dependencies = with depot.third_party.rust-crates; [ - libloading - tree-sitter - ]; - } '' + // depot.nix.getBins pkgs.ncurses [ "tput" ] + // depot.nix.getBins pkgs.bc [ "bc" ] + // depot.nix.getBins pkgs.ocamlPackages.sexp [ "sexp" ]; + + print-ast = depot.nix.writers.rustSimple + { + name = "print-ast"; + dependencies = with depot.third_party.rust-crates; [ + libloading + tree-sitter + ]; + } '' extern crate libloading; extern crate tree_sitter; use std::mem; @@ -58,13 +59,14 @@ let }; }; - watch-file-modified = depot.nix.writers.rustSimple { - name = "watch-file-modified"; - dependencies = [ - depot.third_party.rust-crates.inotify - depot.users.Profpatsch.netstring.rust-netstring - ]; - } '' + watch-file-modified = depot.nix.writers.rustSimple + { + name = "watch-file-modified"; + dependencies = [ + depot.third_party.rust-crates.inotify + depot.users.Profpatsch.netstring.rust-netstring + ]; + } '' extern crate inotify; extern crate netstring; use inotify::{EventMask, WatchMask, Inotify}; @@ -101,75 +103,103 @@ let ''; # clear screen and set LINES and COLUMNS to terminal height & width - clear-screen = depot.nix.writeExecline "clear-screen" {} [ - "if" [ bins.tput "clear" ] - "backtick" "-in" "LINES" [ bins.tput "lines" ] - "backtick" "-in" "COLUMNS" [ bins.tput "cols" ] + clear-screen = depot.nix.writeExecline "clear-screen" { } [ + "if" + [ bins.tput "clear" ] + "backtick" + "-in" + "LINES" + [ bins.tput "lines" ] + "backtick" + "-in" + "COLUMNS" + [ bins.tput "cols" ] "$@" ]; print-nix-file = depot.nix.writeExecline "print-nix-file" { readNArgs = 1; } [ - "pipeline" [ print-ast "${tree-sitter-nix}/parser" "tree_sitter_nix" "$1" ] - "pipeline" [ bins.sexp "print" ] + "pipeline" + [ print-ast "${tree-sitter-nix}/parser" "tree_sitter_nix" "$1" ] + "pipeline" + [ bins.sexp "print" ] clear-screen - "importas" "-ui" "lines" "LINES" - "backtick" "-in" "ls" [ + "importas" + "-ui" + "lines" + "LINES" + "backtick" + "-in" + "ls" + [ "pipeline" - # when you pull out bc to decrement an integer it’s time to switch to python lol - [ bins.printf "x=%s; --x\n" "$lines" ] - bins.bc + # when you pull out bc to decrement an integer it’s time to switch to python lol + [ bins.printf "x=%s; --x\n" "$lines" ] + bins.bc ] - "importas" "-ui" "l" "ls" - bins.head "-n\${l}" + "importas" + "-ui" + "l" + "ls" + bins.head + "-n\${l}" ]; print-nix-file-on-update = depot.nix.writeExecline "print-nix-file-on-update" { readNArgs = 1; } [ - "if" [ print-nix-file "$1" ] - "pipeline" [ watch-file-modified "$1" ] - "forstdin" "-d" "" "file" - "importas" "file" "file" - print-nix-file "$file" + "if" + [ print-nix-file "$1" ] + "pipeline" + [ watch-file-modified "$1" ] + "forstdin" + "-d" + "" + "file" + "importas" + "file" + "file" + print-nix-file + "$file" ]; # copied from nixpkgs buildTreeSitterGrammar = - { - # language name - language - # source for the language grammar - , source - }: - - pkgs.stdenv.mkDerivation { - - pname = "${language}-grammar"; - inherit (pkgs.tree-sitter) version; - - src = source; - - buildInputs = [ pkgs.tree-sitter ]; - - dontUnpack = true; - configurePhase= ":"; - buildPhase = '' - runHook preBuild - scanner_cc="$src/src/scanner.cc" - if [ ! -f "$scanner_cc" ]; then - scanner_cc="" - fi - $CXX -I$src/src/ -c $scanner_cc - $CC -I$src/src/ -shared -o parser -Os scanner.o $src/src/parser.c -lstdc++ - runHook postBuild - ''; - installPhase = '' - runHook preInstall - mkdir $out - mv parser $out/ - runHook postInstall - ''; - }; - -in depot.nix.readTree.drvTargets { + { + # language name + language + # source for the language grammar + , source + }: + + pkgs.stdenv.mkDerivation { + + pname = "${language}-grammar"; + inherit (pkgs.tree-sitter) version; + + src = source; + + buildInputs = [ pkgs.tree-sitter ]; + + dontUnpack = true; + configurePhase = ":"; + buildPhase = '' + runHook preBuild + scanner_cc="$src/src/scanner.cc" + if [ ! -f "$scanner_cc" ]; then + scanner_cc="" + fi + $CXX -I$src/src/ -c $scanner_cc + $CC -I$src/src/ -shared -o parser -Os scanner.o $src/src/parser.c -lstdc++ + runHook postBuild + ''; + installPhase = '' + runHook preInstall + mkdir $out + mv parser $out/ + runHook postInstall + ''; + }; + +in +depot.nix.readTree.drvTargets { inherit print-ast tree-sitter-nix diff --git a/users/Profpatsch/writers/default.nix b/users/Profpatsch/writers/default.nix index 3151a9d3bd44..02f39da02dbe 100644 --- a/users/Profpatsch/writers/default.nix +++ b/users/Profpatsch/writers/default.nix @@ -1,7 +1,7 @@ { depot, pkgs, lib, ... }: let - bins = depot.nix.getBins pkgs.s6-portable-utils ["s6-mkdir" "s6-cat" "s6-ln" "s6-ls" "s6-touch" ] - // depot.nix.getBins pkgs.coreutils ["printf" ]; + bins = depot.nix.getBins pkgs.s6-portable-utils [ "s6-mkdir" "s6-cat" "s6-ln" "s6-ls" "s6-touch" ] + // depot.nix.getBins pkgs.coreutils [ "printf" ]; inherit (depot.nix.yants) defun struct restrict attrs list string drv any; @@ -11,56 +11,76 @@ let restrict "flake error" (s: lib.any (prefix: (builtins.substring 0 1 s) == prefix) - [ "E" "W" ]) + [ "E" "W" ]) string; Libraries = defun [ (attrs any) (list drv) ]; - python3 = { - name, - libraries ? (_: []), - flakeIgnore ? [] - }: pkgs.writers.writePython3 name { - libraries = Libraries libraries pkgs.python3Packages; - flakeIgnore = - let ignoreTheseErrors = [ - # whitespace after { - "E201" - # whitespace before } - "E202" - # fuck 4-space indentation - "E121" "E111" - # who cares about blank lines … - # … at end of files - "W391" - # … between functions - "E302" "E305" - ]; - in list FlakeError (ignoreTheseErrors ++ flakeIgnore); - }; + python3 = + { name + , libraries ? (_: [ ]) + , flakeIgnore ? [ ] + }: pkgs.writers.writePython3 name { + libraries = Libraries libraries pkgs.python3Packages; + flakeIgnore = + let + ignoreTheseErrors = [ + # whitespace after { + "E201" + # whitespace before } + "E202" + # fuck 4-space indentation + "E121" + "E111" + # who cares about blank lines … + # … at end of files + "W391" + # … between functions + "E302" + "E305" + ]; + in + list FlakeError (ignoreTheseErrors ++ flakeIgnore); + }; # TODO: add the same flake check as the pyhon3 writer - python3Lib = { name, libraries ? (_: []) }: moduleString: - let srcTree = depot.nix.runExecline.local name { stdin = moduleString; } [ - "importas" "out" "out" - "if" [ bins.s6-mkdir "-p" "\${out}/${name}" ] - "if" [ - "redirfd" "-w" "1" "\${out}/setup.py" - bins.printf '' - from distutils.core import setup + python3Lib = { name, libraries ? (_: [ ]) }: moduleString: + let + srcTree = depot.nix.runExecline.local name { stdin = moduleString; } [ + "importas" + "out" + "out" + "if" + [ bins.s6-mkdir "-p" "\${out}/${name}" ] + "if" + [ + "redirfd" + "-w" + "1" + "\${out}/setup.py" + bins.printf + '' + from distutils.core import setup - setup( - name='%s', - packages=['%s'] - ) - '' name name - ] - "if" [ - # redirect stdin to the init py - "redirfd" "-w" "1" "\${out}/${name}/__init__.py" - bins.s6-cat - ] - ]; - in pkgs.python3Packages.buildPythonPackage { + setup( + name='%s', + packages=['%s'] + ) + '' + name + name + ] + "if" + [ + # redirect stdin to the init py + "redirfd" + "-w" + "1" + "\${out}/${name}/__init__.py" + bins.s6-cat + ] + ]; + in + pkgs.python3Packages.buildPythonPackage { inherit name; src = srcTree; propagatedBuildInputs = libraries pkgs.python3Packages; @@ -68,7 +88,8 @@ let }; -in { +in +{ inherit python3 python3Lib diff --git a/users/Profpatsch/writers/tests/default.nix b/users/Profpatsch/writers/tests/default.nix index dc760af9e16e..d0d62d3b0e1b 100644 --- a/users/Profpatsch/writers/tests/default.nix +++ b/users/Profpatsch/writers/tests/default.nix @@ -10,38 +10,46 @@ let coreutils ; - run = drv: depot.nix.runExecline.local "run-${drv.name}" {} [ - "if" [ drv ] - "importas" "out" "out" - "${coreutils}/bin/touch" "$out" + run = drv: depot.nix.runExecline.local "run-${drv.name}" { } [ + "if" + [ drv ] + "importas" + "out" + "out" + "${coreutils}/bin/touch" + "$out" ]; - pythonTransitiveLib = python3Lib { - name = "transitive"; - } '' + pythonTransitiveLib = python3Lib + { + name = "transitive"; + } '' def transitive(s): return s + " 1 2 3" ''; - pythonTestLib = python3Lib { - name = "test_lib"; - libraries = _: [ pythonTransitiveLib ]; - } '' + pythonTestLib = python3Lib + { + name = "test_lib"; + libraries = _: [ pythonTransitiveLib ]; + } '' import transitive def test(): return transitive.transitive("test") ''; - pythonWithLib = run (python3 { - name = "python-with-lib"; - libraries = _: [ pythonTestLib ]; - } '' + pythonWithLib = run (python3 + { + name = "python-with-lib"; + libraries = _: [ pythonTestLib ]; + } '' import test_lib assert(test_lib.test() == "test 1 2 3") ''); -in depot.nix.readTree.drvTargets { +in +depot.nix.readTree.drvTargets { inherit pythonWithLib ; diff --git a/users/Profpatsch/ytextr/create-symlink-farm.nix b/users/Profpatsch/ytextr/create-symlink-farm.nix index 583a3a90f5c5..7b3a45b91681 100644 --- a/users/Profpatsch/ytextr/create-symlink-farm.nix +++ b/users/Profpatsch/ytextr/create-symlink-farm.nix @@ -1,9 +1,10 @@ { # list of package attribute names to get at run time - packageNamesAtRuntimeJsonPath, + packageNamesAtRuntimeJsonPath +, }: let - pkgs = import <nixpkgs> {}; + pkgs = import <nixpkgs> { }; getPkg = pkgName: pkgs.${pkgName}; @@ -12,7 +13,7 @@ let runtime = map getPkg packageNamesAtRuntime; in - pkgs.symlinkJoin { - name = "symlink-farm"; - paths = runtime; - } +pkgs.symlinkJoin { + name = "symlink-farm"; + paths = runtime; +} diff --git a/users/Profpatsch/ytextr/default.nix b/users/Profpatsch/ytextr/default.nix index dba6bbb8b400..ac630603b90c 100644 --- a/users/Profpatsch/ytextr/default.nix +++ b/users/Profpatsch/ytextr/default.nix @@ -12,48 +12,71 @@ let bins = depot.nix.getBins pkgs.nix [ "nix-build" ] - // depot.nix.getBins pkgs.bubblewrap [ "bwrap" ]; + // depot.nix.getBins pkgs.bubblewrap [ "bwrap" ]; # Run a command, with the given packages in scope, and `packageNamesAtRuntime` being fetched at the start in the given nix `channel`. - nix-run-with-channel = { - # The channel to get `packageNamesAtRuntime` from - channel, - # executable to run with `packageNamesAtRuntime` in PATH - # and the argv - executable, - # A list of nixpkgs package attribute names that should be put into PATH when running `command`. - packageNamesAtRuntime, - }: depot.nix.writeExecline "nix-run-with-channel-${channel}" {} [ - # TODO: prevent race condition by writing a temporary gc root - "backtick" "-iE" "storepath" [ - bins.nix-build - "-I" "nixpkgs=channel:${channel}" + nix-run-with-channel = + { + # The channel to get `packageNamesAtRuntime` from + channel + , # executable to run with `packageNamesAtRuntime` in PATH + # and the argv + executable + , # A list of nixpkgs package attribute names that should be put into PATH when running `command`. + packageNamesAtRuntime + , + }: depot.nix.writeExecline "nix-run-with-channel-${channel}" { } [ + # TODO: prevent race condition by writing a temporary gc root + "backtick" + "-iE" + "storepath" + [ + bins.nix-build + "-I" + "nixpkgs=channel:${channel}" "--arg" - "packageNamesAtRuntimeJsonPath" - (pkgs.writeText "packageNamesAtRuntime.json" (builtins.toJSON packageNamesAtRuntime)) + "packageNamesAtRuntimeJsonPath" + (pkgs.writeText "packageNamesAtRuntime.json" (builtins.toJSON packageNamesAtRuntime)) ./create-symlink-farm.nix - ] - "importas" "-ui" "PATH" "PATH" - "export" "PATH" "\${storepath}/bin:\${PATH}" - executable "$@" - ]; + ] + "importas" + "-ui" + "PATH" + "PATH" + "export" + "PATH" + "\${storepath}/bin:\${PATH}" + executable + "$@" + ]; -in nix-run-with-channel { +in +nix-run-with-channel { channel = "nixos-unstable"; packageNamesAtRuntime = [ "yt-dlp" ]; executable = depot.nix.writeExecline "ytextr" { readNArgs = 1; } [ - "getcwd" "-E" "cwd" + "getcwd" + "-E" + "cwd" bins.bwrap - "--ro-bind" "/nix/store" "/nix/store" - "--ro-bind" "/etc" "/etc" - "--bind" "$cwd" "$cwd" - "yt-dlp" - "--no-playlist" - "--write-sub" - "--all-subs" - "--embed-subs" - "--merge-output-format" "mkv" - "-f" "bestvideo[height<=?1080]+bestaudio/best" - "$1" + "--ro-bind" + "/nix/store" + "/nix/store" + "--ro-bind" + "/etc" + "/etc" + "--bind" + "$cwd" + "$cwd" + "yt-dlp" + "--no-playlist" + "--write-sub" + "--all-subs" + "--embed-subs" + "--merge-output-format" + "mkv" + "-f" + "bestvideo[height<=?1080]+bestaudio/best" + "$1" ]; } diff --git a/users/cynthia/keys.nix b/users/cynthia/keys.nix index bac8dc1c57ae..e2f4ce488c9e 100644 --- a/users/cynthia/keys.nix +++ b/users/cynthia/keys.nix @@ -4,4 +4,4 @@ all = [ "cert-authority ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICsj3W6QczgxE3s5GGT8qg0aLrCM+QeRnSq9RkiZtKvz meow" ]; -} \ No newline at end of file +} diff --git a/users/edef/depot-scan/wrap.nix b/users/edef/depot-scan/wrap.nix index dcb557a24b1e..77362b3f61f9 100644 --- a/users/edef/depot-scan/wrap.nix +++ b/users/edef/depot-scan/wrap.nix @@ -3,13 +3,14 @@ let global = { - import = global.scopedImport {}; + import = global.scopedImport { }; scopedImport = x: builtins.scopedImport (global // x); builtins = builtins // { inherit (global) import scopedImport; readFile = path: builtins.trace "depot-scan '${toString path}'" (builtins.readFile path); - readDir = path: builtins.trace "depot-scan '${toString path}'" (builtins.readDir path); + readDir = path: builtins.trace "depot-scan '${toString path}'" (builtins.readDir path); }; }; -in global.import +in +global.import diff --git a/users/eta/keys.nix b/users/eta/keys.nix index 247a182843f1..ebdc8479a5a8 100644 --- a/users/eta/keys.nix +++ b/users/eta/keys.nix @@ -9,4 +9,4 @@ let whitby = [ keys.yubikey4 keys.yubikey5 ]; }; in - configs +configs diff --git a/users/grfn/achilles/shell.nix b/users/grfn/achilles/shell.nix index f32dce3ba39d..1434cf8a32c2 100644 --- a/users/grfn/achilles/shell.nix +++ b/users/grfn/achilles/shell.nix @@ -1,4 +1,4 @@ -with (import ../../.. {}).third_party.nixpkgs; +with (import ../../.. { }).third_party.nixpkgs; mkShell { buildInputs = [ diff --git a/users/grfn/bbbg/arion-pkgs.nix b/users/grfn/bbbg/arion-pkgs.nix index 66c016c28368..c6d603be2a99 100644 --- a/users/grfn/bbbg/arion-pkgs.nix +++ b/users/grfn/bbbg/arion-pkgs.nix @@ -1,2 +1,2 @@ -let depot = import ../../.. {}; +let depot = import ../../.. { }; in depot.third_party.nixpkgs diff --git a/users/grfn/bbbg/default.nix b/users/grfn/bbbg/default.nix index 5b5b4badbf4b..cca4e68ce6b2 100644 --- a/users/grfn/bbbg/default.nix +++ b/users/grfn/bbbg/default.nix @@ -8,27 +8,28 @@ let deps = import ./deps.nix { inherit (pkgs) fetchMavenArtifact fetchgit lib; }; -in rec { +in +rec { meta.targets = [ "db-util" "server" "tf" ]; - depsPaths = deps.makePaths {}; + depsPaths = deps.makePaths { }; resources = builtins.filterSource (_: type: type != "symlink") ./resources; classpath.dev = concatStringsSep ":" ( - (map gitignoreSource [./src ./test ./env/dev]) ++ [resources] ++ depsPaths + (map gitignoreSource [ ./src ./test ./env/dev ]) ++ [ resources ] ++ depsPaths ); classpath.test = concatStringsSep ":" ( - (map gitignoreSource [./src ./test ./env/test]) ++ [resources] ++ depsPaths + (map gitignoreSource [ ./src ./test ./env/test ]) ++ [ resources ] ++ depsPaths ); classpath.prod = concatStringsSep ":" ( - (map gitignoreSource [./src ./env/prod]) ++ [resources] ++ depsPaths + (map gitignoreSource [ ./src ./env/prod ]) ++ [ resources ] ++ depsPaths ); testClojure = pkgs.writeShellScript "test-clojure" '' diff --git a/users/grfn/bbbg/deps.nix b/users/grfn/bbbg/deps.nix index 0d014cf373bb..02f5ecb4683c 100644 --- a/users/grfn/bbbg/deps.nix +++ b/users/grfn/bbbg/deps.nix @@ -1,16 +1,21 @@ # generated by clj2nix-1.1.0-rc { fetchMavenArtifact, fetchgit, lib }: -let repos = [ - "https://repo1.maven.org/maven2/" - "https://repo.clojars.org/" ]; - - in rec { - makePaths = {extraClasspaths ? []}: - if (builtins.typeOf extraClasspaths != "list") - then builtins.throw "extraClasspaths must be of type 'list'!" - else (lib.concatMap (dep: - builtins.map (path: +let + repos = [ + "https://repo1.maven.org/maven2/" + "https://repo.clojars.org/" + ]; + +in +rec { + makePaths = { extraClasspaths ? [ ] }: + if (builtins.typeOf extraClasspaths != "list") + then builtins.throw "extraClasspaths must be of type 'list'!" + else (lib.concatMap + (dep: + builtins.map + (path: if builtins.isString path then path else if builtins.hasAttr "jar" path then @@ -19,1471 +24,1471 @@ let repos = [ path.outPath else path - ) + ) dep.paths) - packages) ++ extraClasspaths; - makeClasspaths = {extraClasspaths ? []}: - if (builtins.typeOf extraClasspaths != "list") - then builtins.throw "extraClasspaths must be of type 'list'!" - else builtins.concatStringsSep ":" (makePaths {inherit extraClasspaths;}); - packageSources = builtins.map (dep: dep.src) packages; - packages = [ - rec { - name = "cambium.logback.json/cambium"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "cambium.logback.json"; - groupId = "cambium"; - sha512 = "8e3f32bc1e11071ddc8700204333ba653585de7985c03d14c351950a7896975092e9deffd658bfec7b0b8b9cc72dc025d8e5179a185bd25da26e500218ec37a5"; - version = "0.4.5"; - - }; - paths = [ src ]; - } - - rec { - name = "clojure/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "clojure"; - groupId = "org.clojure"; - sha512 = "a242514f623a17601b360886563c4a4fe09335e4e16522ac42bbcacda073ae77651cfed446daae7fe74061bb7dff5adc454769c0edc0ded350136c3c707e75b9"; - version = "1.11.0-alpha3"; - - }; - paths = [ src ]; - } - - rec { - name = "joda-time/joda-time"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "joda-time"; - groupId = "joda-time"; - sha512 = "012fb9aa9b00b456f72a92374855a7f062f8617c026c436eee2cda67dffa2f8622201909c0f4f454bb346ff5a3ed6f60c236fafb19fa66f612d9861f27b38d3a"; - version = "2.10"; - - }; - paths = [ src ]; - } - - rec { - name = "commons-codec/commons-codec"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "commons-codec"; - groupId = "commons-codec"; - sha512 = "da30a716770795fce390e4dd340a8b728f220c6572383ffef55bd5839655d5611fcc06128b2144f6cdcb36f53072a12ec80b04afee787665e7ad0b6e888a6787"; - version = "1.15"; - - }; - paths = [ src ]; - } - - rec { - name = "HikariCP/com.zaxxer"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "HikariCP"; - groupId = "com.zaxxer"; - sha512 = "a41b6d8b1c4656e633459824f10320965976eeead01bd5cb24911040073181730e61feb797aef89d9e01c922e89cb58654f364df0a6b1bf62ab3e6f9cc367d77"; - version = "5.0.0"; - - }; - paths = [ src ]; - } - - rec { - name = "ring-devel/ring"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ring-devel"; - groupId = "ring"; - sha512 = "79a1ec9f9d03aa4fa0426353970b13468ee65ce314b51ab7a2682212a196a9b5c985eacdee5dbc6ff2f1b536a4e06d0e85e9dd7cc9a49958735c9c4e6d427fd5"; - version = "1.9.4"; - - }; - paths = [ src ]; - } - - rec { - name = "simpleclient/io.prometheus"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "simpleclient"; - groupId = "io.prometheus"; - sha512 = "60af1cefff04e7036467eae54f5930d5677e4ab066f8ed38a391b54df17733acfefac45e19ee53cef289347bddce5fc69a2766f4e580d21a22cfd9e2348e2723"; - version = "0.12.0"; - - }; - paths = [ src ]; - } - - rec { - name = "commons-lang3/org.apache.commons"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "commons-lang3"; - groupId = "org.apache.commons"; - sha512 = "fbdbc0943cb3498b0148e86a39b773f97c8e6013740f72dbc727faeabea402073e2cc8c4d68198e5fc6b08a13b7700236292e99d4785f2c9989f2e5fac11fd81"; - version = "3.12.0"; - - }; - paths = [ src ]; - } - - rec { - name = "tools.logging/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "tools.logging"; - groupId = "org.clojure"; - sha512 = "b7a9680f1156fc7c1574a4364ca550d47668ba727fc80110fdd00c159bedb45c5be82f09cdfb8e8e988e3381e2cf8881ea70651e38001e3eaa4ece31ad0bf0c5"; - version = "1.2.2"; - - }; - paths = [ src ]; - } - - rec { - name = "core.specs.alpha/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "core.specs.alpha"; - groupId = "org.clojure"; - sha512 = "f521f95b362a47bb35f7c85528c34537f905fb3dd24f2284201e445635a0df701b35d8419d53c6507cc78d3717c1f83cda35ea4c82abd8943cd2ab3de3fcad70"; - version = "0.2.62"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-common/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-common"; - groupId = "io.netty"; - sha512 = "7efc2f6774a3dbe8408fe182e19830b5b7a994a0d1b0eb50699df691c2450befa05ac205bbf341ad57bef3a04281ce435031e97e725c5c4edfc705a418828ce8"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "jackson-databind/com.fasterxml.jackson.core"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jackson-databind"; - groupId = "com.fasterxml.jackson.core"; - sha512 = "9f771e78af669b1e1683d6c5903bbf4790aaa88b6b420c2018437da318c3fa4220cd7fa726f3e42a1b8075def1fdbd3744937c15f3bcedfca3050199247363e8"; - version = "2.12.4"; - - }; - paths = [ src ]; - } - - rec { - name = "expound/expound"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "expound"; - groupId = "expound"; - sha512 = "ca0a57cfd215cff6be36d1f83461ec2d0559c0eae172c8a8bd6e1676d49933d3c30a71192889bd75d813581707d5eda0ec05de03326396bc0cedebf2d71811e5"; - version = "0.8.10"; - - }; - paths = [ src ]; - } - - rec { - name = "spec.alpha/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "spec.alpha"; - groupId = "org.clojure"; - sha512 = "ddfe4fa84622abd8ac56e2aa565a56e6bdc0bf330f377ff3e269ddc241bb9dbcac332c13502dfd4c09c2c08fe24d8d2e8cf3d04a1bc819ca5657b4e41feaa7c2"; - version = "0.3.218"; - - }; - paths = [ src ]; - } - - rec { - name = "tools.cli/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "tools.cli"; - groupId = "org.clojure"; - sha512 = "1d88aa03eb6a664bf2c0ce22c45e7296d54d716e29b11904115be80ea1661623cf3e81fc222d164047058239010eb678af92ffedc7c3006475cceb59f3b21265"; - version = "1.0.206"; - - }; - paths = [ src ]; - } - - rec { - name = "compojure/compojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "compojure"; - groupId = "compojure"; - sha512 = "1f4ba1354bd95772963a4ef0e129dde59d16f4f9fac0f89f2505a1d5de3b4527e45073219c0478e0b3285da46793e7c145ec5a55a9dae2fca6b77dc8d67b4db6"; - version = "1.6.2"; - - }; - paths = [ src ]; - } - - rec { - name = "commons-fileupload/commons-fileupload"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "commons-fileupload"; - groupId = "commons-fileupload"; - sha512 = "a8780b7dd7ab68f9e1df38e77a5207c45ff50ec53d8b1476570d069edc8f59e52fb1d0fc534d7e513ac5a01b385ba73c320794c82369a72bd6d817a3b3b21f39"; - version = "1.4"; - - }; - paths = [ src ]; - } - - rec { - name = "jetty-http/org.eclipse.jetty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jetty-http"; - groupId = "org.eclipse.jetty"; - sha512 = "60422ff3ef311f1d9d7340c2accdf611d40e738a39e9128967175ede4990439f4725995988849957742d488f749dd2e0740f74dc5bd9b3364e32fbaa66689308"; - version = "9.4.42.v20210604"; - - }; - paths = [ src ]; - } - - rec { - name = "jetty-util/org.eclipse.jetty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jetty-util"; - groupId = "org.eclipse.jetty"; - sha512 = "d69084e2cfe0c3af1dc7ee2745d563549a4068b6e8aed5cd2b9f31167168fb64d418c4134a6dfb811b627ec0051d7ff71e0a02e4e775d18a53543d0871c44730"; - version = "9.4.42.v20210604"; - - }; - paths = [ src ]; - } - - rec { - name = "janino/org.codehaus.janino"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "janino"; - groupId = "org.codehaus.janino"; - sha512 = "6853d7d53d3629df43a3a17ff5c989f59ec14e9030be5f67426deb9d0797fa3996b0609d582c65f22a4f7680c941b39ab6d466c480b2fea4bf92218a9b89651d"; - version = "3.1.2"; - - }; - paths = [ src ]; - } - - rec { - name = "jcl-over-slf4j/org.slf4j"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jcl-over-slf4j"; - groupId = "org.slf4j"; - sha512 = "23662fe407fcdbcba8865a8cd3f8bb09d4eb178a2a6511a32e35b995722b345e73f5dc1dd85d2d0a5c707db05aa57e0b3d0b96b59e55403fc486343d5ca4c0d6"; - version = "2.0.0-alpha4"; - - }; - paths = [ src ]; - } - - (rec { - name = "io.github.cognitect-labs/test-runner"; - src = fetchgit { - name = "test-runner"; - url = "https://github.com/cognitect-labs/test-runner"; - rev = "cc75980b43011773162b485f46f939dc5fba91e4"; - sha256 = "1661ddmmqva1yiz9p09i5l32lfpi0a99h56022zgvz03nca2ksbg"; - }; - paths = map (path: src + path) [ - "/src" - ]; - }) - - rec { - name = "cambium.logback.core/cambium"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "cambium.logback.core"; - groupId = "cambium"; - sha512 = "83ee9a583dd8a7b2e82e0981b4e51b005095a27257eb1b07165d9701645609060c466ae67fb9431f524a544d52b71fa00009b8acf05aadbeb549043515f9b382"; - version = "0.4.5"; - - }; - paths = [ src ]; - } - - rec { - name = "httpasyncclient/org.apache.httpcomponents"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "httpasyncclient"; - groupId = "org.apache.httpcomponents"; - sha512 = "0a80db5dbf772f02d02ba6c7c163e8da9517dd7195714b495acb845c429580c1fc926d3e71c115e75be8c145651dce2fdfa0dc380132f7809c14b3ad95492aee"; - version = "4.1.4"; - - }; - paths = [ src ]; - } - - rec { - name = "logback-jackson/ch.qos.logback.contrib"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "logback-jackson"; - groupId = "ch.qos.logback.contrib"; - sha512 = "d9a3d4cb6cf4eda6fc18e2d374007d27c6ddba98e989a8d8a01b49859b280450113f685df6e16c5fbe0472bc9e26308bc7e8b7e0aedab9404cf0b492d7511685"; - version = "0.1.5"; - - }; - paths = [ src ]; - } - - rec { - name = "simpleclient_tracer_otel/io.prometheus"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "simpleclient_tracer_otel"; - groupId = "io.prometheus"; - sha512 = "bce192e6162cb3ada7dd6c2d10456e78bce71c170faa09bad2896272fa1bd4a036288d707f3d47747991d8946c74fe21c565713fb15c7052305eb753c94dd939"; - version = "0.12.0"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-codec/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-codec"; - groupId = "io.netty"; - sha512 = "f6d9c4a5b508ca0d5f0e213473088f5d7b2e184e447dc092e69227109e28da9b8e68b2238ca6ab4e9915bacacf59cc0dce6ebcbbb05dad34a03b7976d9670c51"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "ring-oauth2/ring-oauth2"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ring-oauth2"; - groupId = "ring-oauth2"; - sha512 = "3ed765b4bbb5749fcdcdb501b93ab656a413ade5af24c7aa34639718ed1fd0a5f325b05bd135540d56e55cbb456a2cb7852ba0e45bc5233e28229986eef75bb9"; - version = "0.2.0"; - - }; - paths = [ src ]; - } - - rec { - name = "tools.macro/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "tools.macro"; - groupId = "org.clojure"; - sha512 = "65ce5e29379620ac458274c53cd9926e4b764fcaebb1a2b3bc8aef86bbe10c79e654b028bc4328905d2495a680fa90f5002cf5c47885f6449fad43a04a594b26"; - version = "0.1.5"; - - }; - paths = [ src ]; - } - - rec { - name = "jackson-dataformat-cbor/com.fasterxml.jackson.dataformat"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jackson-dataformat-cbor"; - groupId = "com.fasterxml.jackson.dataformat"; - sha512 = "ea5d049eac1b94666479c5e36de14d8fa4b7f24cb92f0f310d2ec2b4de66ef9023161060e67228ef2d7420a002ef861db12a29cad0864638c21612da49686f4f"; - version = "2.12.4"; - - }; - paths = [ src ]; - } - - rec { - name = "depstar/seancorfield"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "depstar"; - groupId = "seancorfield"; - sha512 = "0f4458b39b8b1949755bc2fe64b239673a9efa3a0140998464bbbcab216ec847344c1b8920611f7c9ca07261850f3a08144ae221cc2c41813a080189e32f9c10"; - version = "1.0.94"; - - }; - paths = [ src ]; - } - - rec { - name = "logback-core/ch.qos.logback"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "logback-core"; - groupId = "ch.qos.logback"; - sha512 = "fc554548f499e284007eeecf76bf4e1995effb6ac8a6262aa96118f623bf9085a9d5bec3741833dd3cae6a76b2ff78c6d0a1fe68bc01213207c93d8e2da345ca"; - version = "1.3.0-alpha12"; - - }; - paths = [ src ]; - } - - rec { - name = "honeysql/honeysql"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "honeysql"; - groupId = "honeysql"; - sha512 = "74d1d93c968b33686848e3bf8934f3b5f002c2b69b1b55a3a3b172c952e9991324e6e95e3a0ce2fecf1de0d3a036f4dff7286df689f0733f253909464e0269f6"; - version = "1.0.461"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-buffer/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-buffer"; - groupId = "io.netty"; - sha512 = "181b55d99d8d46bbf5f67f05bdccb0381af23a9fca3e6d935e6cde727b132c67133de1c3d81ed19b04c1a5b232be0de16ec1de7e81b532878bc69564237c15dc"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "slingshot/slingshot"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "slingshot"; - groupId = "slingshot"; - sha512 = "ff2b2a27b441d230261c7f3ec8c38aa551865e05ab6438a74bd12bfcbc5f6bdc88199d42aaf5932b47df84f3d2700c8f514b9f4e9b5da28d29da7ff6b09a7fb5"; - version = "0.12.2"; - - }; - paths = [ src ]; - } - - rec { - name = "httpcore-nio/org.apache.httpcomponents"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "httpcore-nio"; - groupId = "org.apache.httpcomponents"; - sha512 = "002af5f72b68a4ff1b1ff46b788013283d195e1d62ee1d7b102aa930b30f77f7e215a6d18edbea0fccd18fb1fa3a66cc4aef6070d72d6d1886f0044dfe0e16c7"; - version = "4.4.10"; - - }; - paths = [ src ]; - } - - rec { - name = "ring-jetty-adapter/ring"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ring-jetty-adapter"; - groupId = "ring"; - sha512 = "93075903ad73a8b73cb77ee9f53ed33594f40a5dafe8129089adb4cfa333e37468764203c00244568f02abf0c0eee9f5d9a9f96c420919027cf2746a41ec38e3"; - version = "1.9.4"; - - }; - paths = [ src ]; - } - - rec { - name = "simpleclient_tracer_common/io.prometheus"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "simpleclient_tracer_common"; - groupId = "io.prometheus"; - sha512 = "6f717af63340efd84c5467ae752be7e66f586f0e8b57adb5b7a8ef99b223203ed829aad6797f6ef1811d6d861b00a621a1288c9271ec2ba77018d6d9eb9e7987"; - version = "0.12.0"; - - }; - paths = [ src ]; - } - - rec { - name = "component/com.stuartsierra"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "component"; - groupId = "com.stuartsierra"; - sha512 = "108b02f51165ad07c2cf5232fbd954d052880c2456e6fb6db3342bda6851c76b73bf9145f03fb0df2b5782fe39f368b2868780c1e8e2dfa2ab2c68dd97f34ab7"; - version = "1.0.0"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-handler/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-handler"; - groupId = "io.netty"; - sha512 = "48874727553dd7084f5c48d90de123704ae334837c3a103f598887bb21405dd62c57603b59300ac2fcdd936f0af99ed0730487fb9fb8917d236b8fe3f78f3c02"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "yuicompressor/com.yahoo.platform.yui"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "yuicompressor"; - groupId = "com.yahoo.platform.yui"; - sha512 = "ba2588bd50eaa3005b1919daad9f9c86a33351ceb9b7b5f0a9a498a548cc523e99f9345917a64303f8e23925feea226386d3eac01f640f788d1be4c7cf0315e0"; - version = "2.4.8"; - - }; - paths = [ src ]; - } - - rec { - name = "commons-io/commons-io"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "commons-io"; - groupId = "commons-io"; - sha512 = "6af22dffaaecd1553147e788b5cf50368582318f396e456fe9ff33f5175836713a5d700e51720465c932c2b1987daa83027358005812d6a95d5755432de3a79d"; - version = "2.10.0"; - - }; - paths = [ src ]; - } - - rec { - name = "tools.namespace/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "tools.namespace"; - groupId = "org.clojure"; - sha512 = "2cdb9c5d9bc4fd01dae182e9ad4b91eeaa2487003a977e7d8d5e66f562a9544b59f558710eccf421ea63cbbfa953ac8944fe9b9a76049fb82a47eb2bdcb3a4d7"; - version = "1.1.1"; - - }; - paths = [ src ]; - } - - rec { - name = "honeysql/com.github.seancorfield"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "honeysql"; - groupId = "com.github.seancorfield"; - sha512 = "a0e5ebbf922aaf170c2d74ec0efc0df7e3bda92d0b8cc5f40ee4c8ddcb8c7e0e46556fac381513e0ac76b10f681c14c2d2569010c2f8eab4ff04f6373c2bf229"; - version = "2.2.840"; - - }; - paths = [ src ]; - } - - rec { - name = "jackson-core/com.fasterxml.jackson.core"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jackson-core"; - groupId = "com.fasterxml.jackson.core"; - sha512 = "428e0ebb16dd4c74ab0adf712058fd0dc0cd788f6e6f90c60c627da6577b345fac60a30694e111f1cd4e3e8bf79a1f1b820d30ada114984b26c28e299e326eaa"; - version = "2.12.4"; - - }; - paths = [ src ]; - } - - rec { - name = "clj-time/clj-time"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "clj-time"; - groupId = "clj-time"; - sha512 = "cfeb46af59fd4112aa5a5d0087a39355f0fc19514b4c02bc6c3d9f81c9bda40491686207836e9a7943aebeb82a3b36f4e8b7407a8908c5ef151122644b278d75"; - version = "0.15.2"; - - }; - paths = [ src ]; - } - - rec { - name = "clj-http/clj-http"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "clj-http"; - groupId = "clj-http"; - sha512 = "9884557d4f38068cb3234aec80acc0de8f9716645529693ffd9bd6db8221f5d1cf9e2d1b8bf7c7df4215d71372b02d83043ebf8fc27dc422552b32c9bdba1602"; - version = "3.12.3"; - - }; - paths = [ src ]; - } - - rec { - name = "jul-to-slf4j/org.slf4j"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jul-to-slf4j"; - groupId = "org.slf4j"; - sha512 = "350cfb889248d724b27dce697f635f12d9db463f107830b9518ce184dc4cc1ab3933eb5bdab08515e69766c3d5be24547dac289d6406c44eca90717230714b91"; - version = "2.0.0-alpha4"; - - }; - paths = [ src ]; - } - - rec { - name = "migratus/migratus"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "migratus"; - groupId = "migratus"; - sha512 = "ee5ce8601930d063e0d9d90fc8e165b78fc1587bfd7e0fc9922735bc2f9fc27f8cf8bf10d49d6fd57b899ac4b250145bd653915ed770424416e026ba37d1b604"; - version = "1.3.5"; - - }; - paths = [ src ]; - } - - rec { - name = "httpcore/org.apache.httpcomponents"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "httpcore"; - groupId = "org.apache.httpcomponents"; - sha512 = "f16a652f4a7b87dbf7cb16f8590d54a3f719c4c7b2f8883ce59db2d73be4701b64f2ca8a2c45aca6a5dbeaddeedff0c280a03722f70c076e239b645faa54eff9"; - version = "4.4.14"; - - }; - paths = [ src ]; - } - - rec { - name = "httpclient-cache/org.apache.httpcomponents"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "httpclient-cache"; - groupId = "org.apache.httpcomponents"; - sha512 = "e150e8dc49c8c9972d8b324b56bb292b15e2f0e686f1292c4edac975615dfb16e5edb8ab325e614732a7d43a03061ca4fe93fe1e1f7487851a4d4d3af50a61f9"; - version = "4.5.13"; - - }; - paths = [ src ]; - } - - rec { - name = "instaparse/instaparse"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "instaparse"; - groupId = "instaparse"; - sha512 = "ec2fcf4a09319a8fa9489b08fd9c9a5fe6e63155dde74d096f947fabc4f68d3d1bf68faf21e175e80eaee785f563a1903d30c550f93fb13a16a240609e3dfa2e"; - version = "1.4.8"; - - }; - paths = [ src ]; - } - - rec { - name = "honeysql-postgres/nilenso"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "honeysql-postgres"; - groupId = "nilenso"; - sha512 = "d4accd3b8819cf715ecdb29496cf5a6a5ad3871fd579e55c7148d4e05774cb896c681b0c6f84df88aa9cd8e6ef9bfd65788ede9a49ba365ad0e32ee350091879"; - version = "0.4.112"; - - }; - paths = [ src ]; - } - - rec { - name = "clj-tuple/clj-tuple"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "clj-tuple"; - groupId = "clj-tuple"; - sha512 = "dd626944d0aba679a21b164ed0c77ea84449359361496cba810f83b9fdeab751e5889963888098ce4bf8afa112dbda0a46ed60348a9c01ad36a2e255deb7ab6d"; - version = "0.2.2"; - - }; - paths = [ src ]; - } - - rec { - name = "jackson-annotations/com.fasterxml.jackson.core"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jackson-annotations"; - groupId = "com.fasterxml.jackson.core"; - sha512 = "6fdad6c5bb71a97331a662fe26265aacab6869f3307a710697d5c2f256fd48935764bfb0b3505a2cbb1605daf0b7350abdf84a1b1cf2bb1e91d9184565243c8e"; - version = "2.12.4"; - - }; - paths = [ src ]; - } - - rec { - name = "hiccup/hiccup"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "hiccup"; - groupId = "hiccup"; - sha512 = "034f15be46c35029f41869c912f82cb2929fbbb0524ea64bd98dcdb9cf09875b28c75e926fa5fff53942b0f9e543e85a73a2d03c3f2112eecae30fcef8b148f4"; - version = "1.0.5"; - - }; - paths = [ src ]; - } - - rec { - name = "riddley/riddley"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "riddley"; - groupId = "riddley"; - sha512 = "b478ecba9d1ab9d38c84a42354586fcece763000907b40c97bc43c0f16dc560b0860144efe410193cb3b7cb0149fbc1724fdd737cc3ba53de23618f5b30e6f9f"; - version = "0.1.12"; - - }; - paths = [ src ]; - } - - rec { - name = "java.classpath/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "java.classpath"; - groupId = "org.clojure"; - sha512 = "90cd8edeaea02bd908d8cfb0cf5b1cf901aeb38ea3f4971c4b813d33210438aae6fff8e724a8272d2ea9441d373e7d936fa5870e309c1e9721299f662dbbdb9a"; - version = "1.0.0"; - - }; - paths = [ src ]; - } - - rec { - name = "simpleclient_pushgateway/io.prometheus"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "simpleclient_pushgateway"; - groupId = "io.prometheus"; - sha512 = "31c8878929f516ba7030cc9ec4ac4cbcb09955a9fdae23c6904bc481e40e70e1b3e05619c49b646119077ef6f57c430cc7944f6bafdbca24c9efa8145474fcf7"; - version = "0.12.0"; - - }; - paths = [ src ]; - } - - rec { - name = "ns-tracker/ns-tracker"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ns-tracker"; - groupId = "ns-tracker"; - sha512 = "cfb6c2c9f899b43d1284acdc572b34b977936c4df734b38137dfea045421b74d529509cde23695f1dc5ee06d046c2f6b61a2cd98058da1c7220c21dd0361964f"; - version = "0.4.0"; - - }; - paths = [ src ]; - } - - rec { - name = "clout/clout"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "clout"; - groupId = "clout"; - sha512 = "99d6e1a8c5726ca4e5d12b280a39e6d1182d734922600f27d588d3d65fbc830c5e03f9e0421ff25c819deee4d1f389fd3906222716ace1eb17ce70ef9c5e8f4b"; - version = "2.2.1"; - - }; - paths = [ src ]; - } - - rec { - name = "commons-logging/commons-logging"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "commons-logging"; - groupId = "commons-logging"; - sha512 = "ed00dbfabd9ae00efa26dd400983601d076fe36408b7d6520084b447e5d1fa527ce65bd6afdcb58506c3a808323d28e88f26cb99c6f5db9ff64f6525ecdfa557"; - version = "1.2"; - - }; - paths = [ src ]; - } - - rec { - name = "clojure.java-time/clojure.java-time"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "clojure.java-time"; - groupId = "clojure.java-time"; - sha512 = "62d8a286ec3393594e7f84eba22dbb02c1305a80a18b2574058ae963d3f3e829ff960c8b66e89069e6c071a11f869203134c6c4cdec6f8e516c9b314796c8108"; - version = "0.3.3"; - - }; - paths = [ src ]; - } - - rec { - name = "data.csv/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "data.csv"; - groupId = "org.clojure"; - sha512 = "b039775a859ed27eca8f8ae74ccb6afde3ad1fe2b3cbe542240c324d60fe1237e495eb1300ee9eb4ff4ef59f01faf7aec6ef1dd6a025ee4fe556c1d91acfcf1b"; - version = "1.0.0"; - - }; - paths = [ src ]; - } - - rec { - name = "simpleclient_tracer_otel_agent/io.prometheus"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "simpleclient_tracer_otel_agent"; - groupId = "io.prometheus"; - sha512 = "97694210d9a5b48a7cb9dda2a187432c4813edb3051edfa5832a0a471e0b2d5988dab92b70c292e78f59b169345deb5c1c706361fd726f3dc2480766dedfdcec"; - version = "0.12.0"; - - }; - paths = [ src ]; - } - - rec { - name = "next.jdbc/com.github.seancorfield"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "next.jdbc"; - groupId = "com.github.seancorfield"; - sha512 = "0b4b01ba126bb8b1e2c14262db9fca75456b274d09535d9a7bb386699bf20dc9ac11590d210769e7429ca59ebfdfbb06916b3ff275cc817d74eac5bbabdab8f2"; - version = "1.2.761"; - - }; - paths = [ src ]; - } - - rec { - name = "java.jdbc/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "java.jdbc"; - groupId = "org.clojure"; - sha512 = "6162b7774dca58b62a94bc5a04ba845e4c7065c9c589cc3bb802becfec0baf0989a338c1bf9a5db7c3128873702840d5f2451628f3aac977245975d65a683b7d"; - version = "0.7.11"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-transport/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-transport"; - groupId = "io.netty"; - sha512 = "c11d690ffeaf3267b2166f73a43108fb89d588fcef3f6d3053bf4b6f6669483baa618fd97438010692a6fa28334372d5a31b7c0996961d4eabb60cbdc358a536"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "crypto-random/crypto-random"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "crypto-random"; - groupId = "crypto-random"; - sha512 = "3520df744f250dbe061d1a5d7a05b7143f3a67a4c3f9ad87b8044ee68a36a702a0bcb3a203e35d380899dd01c28e01988b0a7af914b942ccbe0c35c9bdb22e11"; - version = "1.2.1"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-transport-native-unix-common/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-transport-native-unix-common"; - groupId = "io.netty"; - sha512 = "b63e5f8a44b7f37f3dba378bd06af64dd1d7be3f0b1a7d47ad139ff06e0212b4c7081275b1b5b12183aeb72eb5f9bf9ef03ed8c78bc302aeb4817dca7bd89f3a"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "ring-codec/ring"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ring-codec"; - groupId = "ring"; - sha512 = "38b9775a794831b8afd8d66991a75aa5910cd50952c9035866bf9cc01353810aedafbc3f35d8f9e56981ebf9e5c37c00b968759ed087d2855348b3f46d8d0487"; - version = "1.1.3"; - - }; - paths = [ src ]; - } - - rec { - name = "spy/com.impossibl.pgjdbc-ng"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "spy"; - groupId = "com.impossibl.pgjdbc-ng"; - sha512 = "173615c39aa6015a732e329217b40e3ea1c304c9c168d2764d6ef23ab8775e2f4432339bc22d049662561f09d3fd890b5415738620d64dcedb762d5da26b4ebb"; - version = "0.8.9"; - - }; - paths = [ src ]; - } - - rec { - name = "logback-json-core/ch.qos.logback.contrib"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "logback-json-core"; - groupId = "ch.qos.logback.contrib"; - sha512 = "2a826036f21997e2979fda83ae3e33cf62f3b2b2df15a7b11d1fd8a52163b09f0f2f8d72f5fdcea0ec1289b3d27727ed5e6b0bcdf4c5d741f4bac07b7b6139e8"; - version = "0.1.5"; - - }; - paths = [ src ]; - } - - rec { - name = "httpclient/org.apache.httpcomponents"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "httpclient"; - groupId = "org.apache.httpcomponents"; - sha512 = "3567739186e551f84cad3e4b6b270c5b8b19aba297675a96bcdff3663ff7d20d188611d21f675fe5ff1bfd7d8ca31362070910d7b92ab1b699872a120aa6f089"; - version = "4.5.13"; - - }; - paths = [ src ]; - } - - rec { - name = "crypto-equality/crypto-equality"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "crypto-equality"; - groupId = "crypto-equality"; - sha512 = "54cf3bd28f633665962bf6b41f5ccbf2634d0db210a739e10a7b12f635e13c7ef532efe1d5d8c0120bb46478bbd08000b179f4c2dd52123242dab79fea97d6a6"; - version = "1.0.0"; - - }; - paths = [ src ]; - } - - rec { - name = "cheshire/cheshire"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "cheshire"; - groupId = "cheshire"; - sha512 = "855e9c42a8d1c64f4db5cda45e31e914eb5ed99a715e8d7a5759a9c4ab6c69a82353635ca7b0837880c6cf9b41b11184ae11e09cbf2c07aa13db32c539e5dfd4"; - version = "5.10.1"; - - }; - paths = [ src ]; - } - - rec { - name = "tigris/tigris"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "tigris"; - groupId = "tigris"; - sha512 = "fdff4ef5e7175a973aaef98de4f37dee8e125fc711c495382e280aaf3e11341fe8925d52567ca60f3f1795511ade11bc23461c88959632dfae3cf50374d02bf6"; - version = "0.1.2"; - - }; - paths = [ src ]; - } - - rec { - name = "config/yogthos"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "config"; - groupId = "yogthos"; - sha512 = "3437992d192465edc74aec5259d5e0c0ad7e631dff860b2ee14cef27f13cee7c60487202cf00fc160a95fb0b85ce1ddf56cbdd0c008b47ac598061bf115f6a23"; - version = "1.1.9"; - - }; - paths = [ src ]; - } - - rec { - name = "jetty-io/org.eclipse.jetty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jetty-io"; - groupId = "org.eclipse.jetty"; - sha512 = "a8c5f73089daa0c8b27f836acddf40bcbf07bbb2571a4d73653be8aac3fb339022f546326722f216bad78a68886934d24db9bec54235124592dd29dbeab69051"; - version = "9.4.42.v20210604"; - - }; - paths = [ src ]; - } - - rec { - name = "logback-json-classic/ch.qos.logback.contrib"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "logback-json-classic"; - groupId = "ch.qos.logback.contrib"; - sha512 = "d30bf70217d316914d83d46cc15783f656354084087d59cbc0620a746f10b4a42e56d33b3e50a8b3596a64ec8314730bf5ff9a3f7dc3417bdd0582665be009ec"; - version = "0.1.5"; - - }; - paths = [ src ]; - } - - rec { - name = "tools.reader/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "tools.reader"; - groupId = "org.clojure"; - sha512 = "3481259c7a1eac719db2921e60173686726a0c2b65879d51a64d516a37f6120db8ffbb74b8bd273404285d7b25143ab5c7ced37e7c0eaf4ab1e44586ccd3c651"; - version = "1.3.6"; - - }; - paths = [ src ]; - } - - rec { - name = "simpleclient_common/io.prometheus"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "simpleclient_common"; - groupId = "io.prometheus"; - sha512 = "dedd003638eb3651c112e2d697ac94eb4e3b3e32c94fa41bb1efe2c889a347cdc7bd13256e05423f3370592d4fd65faf8db57f0387ab75814d7fa77b14cbbadf"; - version = "0.12.0"; - - }; - paths = [ src ]; - } - - rec { - name = "commons-compiler/org.codehaus.janino"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "commons-compiler"; - groupId = "org.codehaus.janino"; - sha512 = "f0778b891ef14d8ee6776747eab0b25da716cdc530752a81aedec2a77570e2f66402179b9408a6efde8125c808eb060a720d2f4977c1f1d022bdaae7eac8d011"; - version = "3.1.2"; - - }; - paths = [ src ]; - } - - rec { - name = "servlet-api/javax.servlet"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "servlet-api"; - groupId = "javax.servlet"; - sha512 = "363ba5590436ab82067b7a2e14b481aeb2b12ca4048d7a1519a2e549b2d3c09ddf718ac64dc2be6c2fc24c51fdc9c8160261329403113369588ce27d87771db6"; - version = "2.5"; - - }; - paths = [ src ]; - } - - rec { - name = "iapetos/clj-commons"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "iapetos"; - groupId = "clj-commons"; - sha512 = "d17f36c0cf0ec78db5e893e5c033f8562b31650bda6f5ee582e68f84a07a3631d04d6f69e4e18b1ca64e732c180fa669dfb69a78849e13f601cd563a7a8aab94"; - version = "0.1.12"; - - }; - paths = [ src ]; - } - - rec { - name = "javax.servlet-api/javax.servlet"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "javax.servlet-api"; - groupId = "javax.servlet"; - sha512 = "32f7e3565c6cdf3d9a562f8fd597fe5059af0cf6b05b772a144a74bbc95927ac275eb38374538ec1c72adcce4c8e1e2c9f774a7b545db56b8085af0065e4a1e5"; - version = "3.1.0"; - - }; - paths = [ src ]; - } - - rec { - name = "potemkin/potemkin"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "potemkin"; - groupId = "potemkin"; - sha512 = "5abc050bf7ff0b27d8c45aaa5e378201980815b711b2db99735db73304576c17e285026ea48a714bf0b0df7ad7a008de38b7d182cdc0e8989f4be1e6b3afa8aa"; - version = "0.4.5"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-resolver/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-resolver"; - groupId = "io.netty"; - sha512 = "fabf893de74264caa1799c15d184ed8f20b7bf9b1c41abb29f29adf728a934951f97892a4924634f9efbda17c8cf74ea3ff97bafca616711e3c5f79b8ed9ef3e"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-transport-native-epoll/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-transport-native-epoll"; - groupId = "io.netty"; - sha512 = "6fbc2dd2622699f3fc1f329acbd94baf7f1d8923c5cfcae262e6f2d64b4fd71b606561bce5e2b511dff8e052cdade930091fab683fd98713f6b62a622a2c6254"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "clj-stacktrace/clj-stacktrace"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "clj-stacktrace"; - groupId = "clj-stacktrace"; - sha512 = "993f8a544203801fc074eefacee8e553e426422b3492d47b857d87ac73cde72c91e29f629382b9eae8cf9600bc2c4c29d2e7169e509c46302ab973c86e73af0c"; - version = "0.2.8"; - - }; - paths = [ src ]; - } - - rec { - name = "cambium.codec-cheshire/cambium"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "cambium.codec-cheshire"; - groupId = "cambium"; - sha512 = "614491cf752a597f29ae29885db6c1ed191341303d89183bee52e4e2c76eb8eb14693562ad09484f379a074b36d97085e848ec3845e069440e6422506c1636f1"; - version = "1.0.0"; - - }; - paths = [ src ]; - } - - rec { - name = "slf4j-api/org.slf4j"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "slf4j-api"; - groupId = "org.slf4j"; - sha512 = "ad705ab6fd5cd904ef6861c0adf08af19593cf6a486b18de548fe3d68e57b1baa7e02947584fd4dcc350ddcddcf906c01e8d9ba7943a202690d0d788627696b5"; - version = "2.0.0-alpha4"; - - }; - paths = [ src ]; - } - - rec { - name = "test.check/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "test.check"; - groupId = "org.clojure"; - sha512 = "b8d7a330b0b5514cd6a00c4382052fab51c3c9d3bc53133f8506791fa670e7c5ecd65094977ea5ced91f59623b0abd1ab8feeec96d63c5c6e459b265a655c577"; - version = "1.1.1"; - - }; - paths = [ src ]; - } - - rec { - name = "ring-logger/ring-logger"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ring-logger"; - groupId = "ring-logger"; - sha512 = "b675a61c173289fc610d84920ba40178bf62b3bc680923cb66866d78ee2a508296b27a1ab14b66bfbe0304a64166a7e3c3ddee36564dd4a2f988861bce455a3a"; - version = "1.0.1"; - - }; - paths = [ src ]; - } - - rec { - name = "ring-servlet/ring"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ring-servlet"; - groupId = "ring"; - sha512 = "3d8e6ec224e13d54810a945c0b6c0d2d863736a48d8c4bfc8fadb96b6b0fa9baa638644d0d92d8a53650b188e6e75d391731b08b26eb0f551e90a7504e7f4267"; - version = "1.9.4"; - - }; - paths = [ src ]; - } - - rec { - name = "logback-classic/ch.qos.logback"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "logback-classic"; - groupId = "ch.qos.logback"; - sha512 = "f9fe0f126061f4abe3973b631b8d8244ba9e9d77783479a6500d629d772050dee508a001fc14d2131407fbdd0d33dd6b8aeb9b1ea9125b471bb8412e8de659e6"; - version = "1.3.0-alpha12"; - - }; - paths = [ src ]; - } - - rec { - name = "dependency/com.stuartsierra"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "dependency"; - groupId = "com.stuartsierra"; - sha512 = "d32fbc4813bd16f2ed8c82e2915e1fb564e88422159bd3580a85c8cd969d1bbbe315bdc13d29c2f0eaceeeafcf649ee712c8df4532464d560aaeae4ae5953866"; - version = "1.0.0"; - - }; - paths = [ src ]; - } - - rec { - name = "camel-snake-kebab/camel-snake-kebab"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "camel-snake-kebab"; - groupId = "camel-snake-kebab"; - sha512 = "589d34b500560b7113760a16bfb6f0ccd8f162a1ce8c9bc829495432159ba9c95aebf6bc43aa126237a0525806a205a05f9910122074902b659e7fd151d176b1"; - version = "0.4.2"; - - }; - paths = [ src ]; - } - - rec { - name = "ring/ring"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ring"; - groupId = "ring"; - sha512 = "93c48fb670736b91fb41d8076e1e9c4f53c67693d15e75290da319e7d7881b829a24180029b3a0fa051473c6c77ac3c97b519254ebf2b2c9538b185e79b69162"; - version = "1.9.4"; - - }; - paths = [ src ]; - } - - rec { - name = "netty-transport-native-kqueue/io.netty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "netty-transport-native-kqueue"; - groupId = "io.netty"; - sha512 = "87e10c06e394a1698d65381d3be8336f753c55e3e899e297510161d0c72540023f30f9032322957e035ead793204a084b988bc21a2bc312fcf7567a22d02a3c4"; - version = "4.1.63.Final"; - - }; - paths = [ src ]; - } - - rec { - name = "java.data/org.clojure"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "java.data"; - groupId = "org.clojure"; - sha512 = "225e1eafd1a659278212d831f7cd8609359f8c880ef3d69b4ade6301ce3c511307ce31d94cb82d5407314b990bd04714ec26273bb3036b248116a7a75fa75e1f"; - version = "1.0.95"; - - }; - paths = [ src ]; - } - - rec { - name = "jetty-server/org.eclipse.jetty"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jetty-server"; - groupId = "org.eclipse.jetty"; - sha512 = "b347f8a6e5b84e0f460037027e238a61edec710ade768c95e7be13dcea498abe43d5e622ee69ac7494138d1a8fcf92e07b7deab569c554831c57baad71c53b9b"; - version = "9.4.42.v20210604"; - - }; - paths = [ src ]; - } - - rec { - name = "httpmime/org.apache.httpcomponents"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "httpmime"; - groupId = "org.apache.httpcomponents"; - sha512 = "e1b0ee84bce78576074dc1b6836a69d8f5518eade38562e6890e3ddaa72b7f54bf735c8e2286142c58cddf45f745da31261e5d73b7d8092eb6ecfb20946eb36c"; - version = "4.5.13"; - - }; - paths = [ src ]; - } - - rec { - name = "log4j-over-slf4j/org.slf4j"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "log4j-over-slf4j"; - groupId = "org.slf4j"; - sha512 = "48fa023c57294b73b9bd2f53e3dd3169e03426e5b3aa9d80e1bb1a9abf927fc26ef9f64d02b9769d5577d83094d0f41f044d35bb3b4f6037d66d6b2f19b484a1"; - version = "2.0.0-alpha4"; - - }; - paths = [ src ]; - } - - rec { - name = "ring-core/ring"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "ring-core"; - groupId = "ring"; - sha512 = "38d7214a3fc1b80ab55999036638dd1971272e01bec4cb8e0ee0a4aa83f51b8c41ba8a5850b0660227f067d2f9c6d75c0c0737725ea02762bbf8d192dc72febe"; - version = "1.9.4"; - - }; - paths = [ src ]; - } - - rec { - name = "cambium.core/cambium"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "cambium.core"; - groupId = "cambium"; - sha512 = "0e1fe626c6d0b31aad84ea2e4466273065925548ee5915f442b7997ebfe795faea36dbeac50a0f8c16bbd20d877511e3f8c4ff4f2b916a4538513aaa5cc20112"; - version = "1.1.1"; - - }; - paths = [ src ]; - } - - rec { - name = "medley/medley"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "medley"; - groupId = "medley"; - sha512 = "749ef43b5ea2cae7dc96db871cdd15c7b3c9cfbd96828c20ab08e67d39a5e938357d15994d8d413bc68678285d6c666f2a7296fbf305706d03b3007254e3c55c"; - version = "1.3.0"; - - }; - paths = [ src ]; - } - - rec { - name = "garden/garden"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "garden"; - groupId = "garden"; - sha512 = "2cc29f071b68bf451835f76de351ac2efb930b5df9ca7237fdca439d3c4d797d7fa207a147886efe1738ab1c50b76c1e366bf9ffcd6f286b0b211260aedd0b25"; - version = "1.3.10"; - - }; - paths = [ src ]; - } - - rec { - name = "jackson-dataformat-smile/com.fasterxml.jackson.dataformat"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jackson-dataformat-smile"; - groupId = "com.fasterxml.jackson.dataformat"; - sha512 = "69676964a2b09516b8ffd0d847b6f9a9b843424185453731b548c25e7e9ce30e808c56d66923f9183e2b5c1ba007421b146a6806e768b8e6b07470d60227f1dd"; - version = "2.12.4"; - - }; - paths = [ src ]; - } - - rec { - name = "jaxb-api/javax.xml.bind"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "jaxb-api"; - groupId = "javax.xml.bind"; - sha512 = "0c5bfc2c9f655bf5e6d596e0c196dcb9344d6dc78bf774207c8f8b6be59f69addf2b3121e81491983eff648dfbd55002b9878132de190825dad3ef3a1265b367"; - version = "2.3.0"; - - }; - paths = [ src ]; - } - - rec { - name = "pgjdbc-ng/com.impossibl.pgjdbc-ng"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "pgjdbc-ng"; - groupId = "com.impossibl.pgjdbc-ng"; - sha512 = "a34ac9146257329f6e9b354f13f564c65dbea6463addae383e3918d3a64c90c67f5f7fda6b5c3866de991a568d6690edb3fb09f2507593390a6e30ec0c79e02c"; - version = "0.8.9"; - - }; - paths = [ src ]; - } - - rec { - name = "http-kit/http-kit"; - src = fetchMavenArtifact { - inherit repos; - artifactId = "http-kit"; - groupId = "http-kit"; - sha512 = "4186a2429984745e18730aa8fd545f1fc1812083819ebf77aecfc04e0d31585358a5e25a308c7f21d81359418bbc72390c281f5ed91ae116cf1af79860ba22c3"; - version = "2.5.3"; - - }; - paths = [ src ]; - } + packages) ++ extraClasspaths; + makeClasspaths = { extraClasspaths ? [ ] }: + if (builtins.typeOf extraClasspaths != "list") + then builtins.throw "extraClasspaths must be of type 'list'!" + else builtins.concatStringsSep ":" (makePaths { inherit extraClasspaths; }); + packageSources = builtins.map (dep: dep.src) packages; + packages = [ + rec { + name = "cambium.logback.json/cambium"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "cambium.logback.json"; + groupId = "cambium"; + sha512 = "8e3f32bc1e11071ddc8700204333ba653585de7985c03d14c351950a7896975092e9deffd658bfec7b0b8b9cc72dc025d8e5179a185bd25da26e500218ec37a5"; + version = "0.4.5"; + + }; + paths = [ src ]; + } + + rec { + name = "clojure/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "clojure"; + groupId = "org.clojure"; + sha512 = "a242514f623a17601b360886563c4a4fe09335e4e16522ac42bbcacda073ae77651cfed446daae7fe74061bb7dff5adc454769c0edc0ded350136c3c707e75b9"; + version = "1.11.0-alpha3"; + + }; + paths = [ src ]; + } + + rec { + name = "joda-time/joda-time"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "joda-time"; + groupId = "joda-time"; + sha512 = "012fb9aa9b00b456f72a92374855a7f062f8617c026c436eee2cda67dffa2f8622201909c0f4f454bb346ff5a3ed6f60c236fafb19fa66f612d9861f27b38d3a"; + version = "2.10"; + + }; + paths = [ src ]; + } + + rec { + name = "commons-codec/commons-codec"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "commons-codec"; + groupId = "commons-codec"; + sha512 = "da30a716770795fce390e4dd340a8b728f220c6572383ffef55bd5839655d5611fcc06128b2144f6cdcb36f53072a12ec80b04afee787665e7ad0b6e888a6787"; + version = "1.15"; + + }; + paths = [ src ]; + } + + rec { + name = "HikariCP/com.zaxxer"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "HikariCP"; + groupId = "com.zaxxer"; + sha512 = "a41b6d8b1c4656e633459824f10320965976eeead01bd5cb24911040073181730e61feb797aef89d9e01c922e89cb58654f364df0a6b1bf62ab3e6f9cc367d77"; + version = "5.0.0"; + + }; + paths = [ src ]; + } + + rec { + name = "ring-devel/ring"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ring-devel"; + groupId = "ring"; + sha512 = "79a1ec9f9d03aa4fa0426353970b13468ee65ce314b51ab7a2682212a196a9b5c985eacdee5dbc6ff2f1b536a4e06d0e85e9dd7cc9a49958735c9c4e6d427fd5"; + version = "1.9.4"; + + }; + paths = [ src ]; + } + + rec { + name = "simpleclient/io.prometheus"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "simpleclient"; + groupId = "io.prometheus"; + sha512 = "60af1cefff04e7036467eae54f5930d5677e4ab066f8ed38a391b54df17733acfefac45e19ee53cef289347bddce5fc69a2766f4e580d21a22cfd9e2348e2723"; + version = "0.12.0"; + + }; + paths = [ src ]; + } + + rec { + name = "commons-lang3/org.apache.commons"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "commons-lang3"; + groupId = "org.apache.commons"; + sha512 = "fbdbc0943cb3498b0148e86a39b773f97c8e6013740f72dbc727faeabea402073e2cc8c4d68198e5fc6b08a13b7700236292e99d4785f2c9989f2e5fac11fd81"; + version = "3.12.0"; + + }; + paths = [ src ]; + } + + rec { + name = "tools.logging/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "tools.logging"; + groupId = "org.clojure"; + sha512 = "b7a9680f1156fc7c1574a4364ca550d47668ba727fc80110fdd00c159bedb45c5be82f09cdfb8e8e988e3381e2cf8881ea70651e38001e3eaa4ece31ad0bf0c5"; + version = "1.2.2"; + + }; + paths = [ src ]; + } + + rec { + name = "core.specs.alpha/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "core.specs.alpha"; + groupId = "org.clojure"; + sha512 = "f521f95b362a47bb35f7c85528c34537f905fb3dd24f2284201e445635a0df701b35d8419d53c6507cc78d3717c1f83cda35ea4c82abd8943cd2ab3de3fcad70"; + version = "0.2.62"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-common/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-common"; + groupId = "io.netty"; + sha512 = "7efc2f6774a3dbe8408fe182e19830b5b7a994a0d1b0eb50699df691c2450befa05ac205bbf341ad57bef3a04281ce435031e97e725c5c4edfc705a418828ce8"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "jackson-databind/com.fasterxml.jackson.core"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jackson-databind"; + groupId = "com.fasterxml.jackson.core"; + sha512 = "9f771e78af669b1e1683d6c5903bbf4790aaa88b6b420c2018437da318c3fa4220cd7fa726f3e42a1b8075def1fdbd3744937c15f3bcedfca3050199247363e8"; + version = "2.12.4"; + + }; + paths = [ src ]; + } + + rec { + name = "expound/expound"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "expound"; + groupId = "expound"; + sha512 = "ca0a57cfd215cff6be36d1f83461ec2d0559c0eae172c8a8bd6e1676d49933d3c30a71192889bd75d813581707d5eda0ec05de03326396bc0cedebf2d71811e5"; + version = "0.8.10"; + + }; + paths = [ src ]; + } + + rec { + name = "spec.alpha/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "spec.alpha"; + groupId = "org.clojure"; + sha512 = "ddfe4fa84622abd8ac56e2aa565a56e6bdc0bf330f377ff3e269ddc241bb9dbcac332c13502dfd4c09c2c08fe24d8d2e8cf3d04a1bc819ca5657b4e41feaa7c2"; + version = "0.3.218"; + + }; + paths = [ src ]; + } + + rec { + name = "tools.cli/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "tools.cli"; + groupId = "org.clojure"; + sha512 = "1d88aa03eb6a664bf2c0ce22c45e7296d54d716e29b11904115be80ea1661623cf3e81fc222d164047058239010eb678af92ffedc7c3006475cceb59f3b21265"; + version = "1.0.206"; + + }; + paths = [ src ]; + } + + rec { + name = "compojure/compojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "compojure"; + groupId = "compojure"; + sha512 = "1f4ba1354bd95772963a4ef0e129dde59d16f4f9fac0f89f2505a1d5de3b4527e45073219c0478e0b3285da46793e7c145ec5a55a9dae2fca6b77dc8d67b4db6"; + version = "1.6.2"; + + }; + paths = [ src ]; + } + + rec { + name = "commons-fileupload/commons-fileupload"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "commons-fileupload"; + groupId = "commons-fileupload"; + sha512 = "a8780b7dd7ab68f9e1df38e77a5207c45ff50ec53d8b1476570d069edc8f59e52fb1d0fc534d7e513ac5a01b385ba73c320794c82369a72bd6d817a3b3b21f39"; + version = "1.4"; + + }; + paths = [ src ]; + } + + rec { + name = "jetty-http/org.eclipse.jetty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jetty-http"; + groupId = "org.eclipse.jetty"; + sha512 = "60422ff3ef311f1d9d7340c2accdf611d40e738a39e9128967175ede4990439f4725995988849957742d488f749dd2e0740f74dc5bd9b3364e32fbaa66689308"; + version = "9.4.42.v20210604"; + + }; + paths = [ src ]; + } + + rec { + name = "jetty-util/org.eclipse.jetty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jetty-util"; + groupId = "org.eclipse.jetty"; + sha512 = "d69084e2cfe0c3af1dc7ee2745d563549a4068b6e8aed5cd2b9f31167168fb64d418c4134a6dfb811b627ec0051d7ff71e0a02e4e775d18a53543d0871c44730"; + version = "9.4.42.v20210604"; + + }; + paths = [ src ]; + } + + rec { + name = "janino/org.codehaus.janino"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "janino"; + groupId = "org.codehaus.janino"; + sha512 = "6853d7d53d3629df43a3a17ff5c989f59ec14e9030be5f67426deb9d0797fa3996b0609d582c65f22a4f7680c941b39ab6d466c480b2fea4bf92218a9b89651d"; + version = "3.1.2"; + + }; + paths = [ src ]; + } + + rec { + name = "jcl-over-slf4j/org.slf4j"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jcl-over-slf4j"; + groupId = "org.slf4j"; + sha512 = "23662fe407fcdbcba8865a8cd3f8bb09d4eb178a2a6511a32e35b995722b345e73f5dc1dd85d2d0a5c707db05aa57e0b3d0b96b59e55403fc486343d5ca4c0d6"; + version = "2.0.0-alpha4"; + + }; + paths = [ src ]; + } + + (rec { + name = "io.github.cognitect-labs/test-runner"; + src = fetchgit { + name = "test-runner"; + url = "https://github.com/cognitect-labs/test-runner"; + rev = "cc75980b43011773162b485f46f939dc5fba91e4"; + sha256 = "1661ddmmqva1yiz9p09i5l32lfpi0a99h56022zgvz03nca2ksbg"; + }; + paths = map (path: src + path) [ + "/src" + ]; + }) + + rec { + name = "cambium.logback.core/cambium"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "cambium.logback.core"; + groupId = "cambium"; + sha512 = "83ee9a583dd8a7b2e82e0981b4e51b005095a27257eb1b07165d9701645609060c466ae67fb9431f524a544d52b71fa00009b8acf05aadbeb549043515f9b382"; + version = "0.4.5"; + + }; + paths = [ src ]; + } + + rec { + name = "httpasyncclient/org.apache.httpcomponents"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "httpasyncclient"; + groupId = "org.apache.httpcomponents"; + sha512 = "0a80db5dbf772f02d02ba6c7c163e8da9517dd7195714b495acb845c429580c1fc926d3e71c115e75be8c145651dce2fdfa0dc380132f7809c14b3ad95492aee"; + version = "4.1.4"; + + }; + paths = [ src ]; + } + + rec { + name = "logback-jackson/ch.qos.logback.contrib"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "logback-jackson"; + groupId = "ch.qos.logback.contrib"; + sha512 = "d9a3d4cb6cf4eda6fc18e2d374007d27c6ddba98e989a8d8a01b49859b280450113f685df6e16c5fbe0472bc9e26308bc7e8b7e0aedab9404cf0b492d7511685"; + version = "0.1.5"; + + }; + paths = [ src ]; + } + + rec { + name = "simpleclient_tracer_otel/io.prometheus"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "simpleclient_tracer_otel"; + groupId = "io.prometheus"; + sha512 = "bce192e6162cb3ada7dd6c2d10456e78bce71c170faa09bad2896272fa1bd4a036288d707f3d47747991d8946c74fe21c565713fb15c7052305eb753c94dd939"; + version = "0.12.0"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-codec/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-codec"; + groupId = "io.netty"; + sha512 = "f6d9c4a5b508ca0d5f0e213473088f5d7b2e184e447dc092e69227109e28da9b8e68b2238ca6ab4e9915bacacf59cc0dce6ebcbbb05dad34a03b7976d9670c51"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "ring-oauth2/ring-oauth2"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ring-oauth2"; + groupId = "ring-oauth2"; + sha512 = "3ed765b4bbb5749fcdcdb501b93ab656a413ade5af24c7aa34639718ed1fd0a5f325b05bd135540d56e55cbb456a2cb7852ba0e45bc5233e28229986eef75bb9"; + version = "0.2.0"; + + }; + paths = [ src ]; + } + + rec { + name = "tools.macro/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "tools.macro"; + groupId = "org.clojure"; + sha512 = "65ce5e29379620ac458274c53cd9926e4b764fcaebb1a2b3bc8aef86bbe10c79e654b028bc4328905d2495a680fa90f5002cf5c47885f6449fad43a04a594b26"; + version = "0.1.5"; + + }; + paths = [ src ]; + } + + rec { + name = "jackson-dataformat-cbor/com.fasterxml.jackson.dataformat"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jackson-dataformat-cbor"; + groupId = "com.fasterxml.jackson.dataformat"; + sha512 = "ea5d049eac1b94666479c5e36de14d8fa4b7f24cb92f0f310d2ec2b4de66ef9023161060e67228ef2d7420a002ef861db12a29cad0864638c21612da49686f4f"; + version = "2.12.4"; + + }; + paths = [ src ]; + } + + rec { + name = "depstar/seancorfield"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "depstar"; + groupId = "seancorfield"; + sha512 = "0f4458b39b8b1949755bc2fe64b239673a9efa3a0140998464bbbcab216ec847344c1b8920611f7c9ca07261850f3a08144ae221cc2c41813a080189e32f9c10"; + version = "1.0.94"; + + }; + paths = [ src ]; + } + + rec { + name = "logback-core/ch.qos.logback"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "logback-core"; + groupId = "ch.qos.logback"; + sha512 = "fc554548f499e284007eeecf76bf4e1995effb6ac8a6262aa96118f623bf9085a9d5bec3741833dd3cae6a76b2ff78c6d0a1fe68bc01213207c93d8e2da345ca"; + version = "1.3.0-alpha12"; + + }; + paths = [ src ]; + } + + rec { + name = "honeysql/honeysql"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "honeysql"; + groupId = "honeysql"; + sha512 = "74d1d93c968b33686848e3bf8934f3b5f002c2b69b1b55a3a3b172c952e9991324e6e95e3a0ce2fecf1de0d3a036f4dff7286df689f0733f253909464e0269f6"; + version = "1.0.461"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-buffer/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-buffer"; + groupId = "io.netty"; + sha512 = "181b55d99d8d46bbf5f67f05bdccb0381af23a9fca3e6d935e6cde727b132c67133de1c3d81ed19b04c1a5b232be0de16ec1de7e81b532878bc69564237c15dc"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "slingshot/slingshot"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "slingshot"; + groupId = "slingshot"; + sha512 = "ff2b2a27b441d230261c7f3ec8c38aa551865e05ab6438a74bd12bfcbc5f6bdc88199d42aaf5932b47df84f3d2700c8f514b9f4e9b5da28d29da7ff6b09a7fb5"; + version = "0.12.2"; + + }; + paths = [ src ]; + } + + rec { + name = "httpcore-nio/org.apache.httpcomponents"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "httpcore-nio"; + groupId = "org.apache.httpcomponents"; + sha512 = "002af5f72b68a4ff1b1ff46b788013283d195e1d62ee1d7b102aa930b30f77f7e215a6d18edbea0fccd18fb1fa3a66cc4aef6070d72d6d1886f0044dfe0e16c7"; + version = "4.4.10"; + + }; + paths = [ src ]; + } + + rec { + name = "ring-jetty-adapter/ring"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ring-jetty-adapter"; + groupId = "ring"; + sha512 = "93075903ad73a8b73cb77ee9f53ed33594f40a5dafe8129089adb4cfa333e37468764203c00244568f02abf0c0eee9f5d9a9f96c420919027cf2746a41ec38e3"; + version = "1.9.4"; + + }; + paths = [ src ]; + } + + rec { + name = "simpleclient_tracer_common/io.prometheus"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "simpleclient_tracer_common"; + groupId = "io.prometheus"; + sha512 = "6f717af63340efd84c5467ae752be7e66f586f0e8b57adb5b7a8ef99b223203ed829aad6797f6ef1811d6d861b00a621a1288c9271ec2ba77018d6d9eb9e7987"; + version = "0.12.0"; + + }; + paths = [ src ]; + } + + rec { + name = "component/com.stuartsierra"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "component"; + groupId = "com.stuartsierra"; + sha512 = "108b02f51165ad07c2cf5232fbd954d052880c2456e6fb6db3342bda6851c76b73bf9145f03fb0df2b5782fe39f368b2868780c1e8e2dfa2ab2c68dd97f34ab7"; + version = "1.0.0"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-handler/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-handler"; + groupId = "io.netty"; + sha512 = "48874727553dd7084f5c48d90de123704ae334837c3a103f598887bb21405dd62c57603b59300ac2fcdd936f0af99ed0730487fb9fb8917d236b8fe3f78f3c02"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "yuicompressor/com.yahoo.platform.yui"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "yuicompressor"; + groupId = "com.yahoo.platform.yui"; + sha512 = "ba2588bd50eaa3005b1919daad9f9c86a33351ceb9b7b5f0a9a498a548cc523e99f9345917a64303f8e23925feea226386d3eac01f640f788d1be4c7cf0315e0"; + version = "2.4.8"; + + }; + paths = [ src ]; + } + + rec { + name = "commons-io/commons-io"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "commons-io"; + groupId = "commons-io"; + sha512 = "6af22dffaaecd1553147e788b5cf50368582318f396e456fe9ff33f5175836713a5d700e51720465c932c2b1987daa83027358005812d6a95d5755432de3a79d"; + version = "2.10.0"; + + }; + paths = [ src ]; + } + + rec { + name = "tools.namespace/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "tools.namespace"; + groupId = "org.clojure"; + sha512 = "2cdb9c5d9bc4fd01dae182e9ad4b91eeaa2487003a977e7d8d5e66f562a9544b59f558710eccf421ea63cbbfa953ac8944fe9b9a76049fb82a47eb2bdcb3a4d7"; + version = "1.1.1"; + + }; + paths = [ src ]; + } + + rec { + name = "honeysql/com.github.seancorfield"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "honeysql"; + groupId = "com.github.seancorfield"; + sha512 = "a0e5ebbf922aaf170c2d74ec0efc0df7e3bda92d0b8cc5f40ee4c8ddcb8c7e0e46556fac381513e0ac76b10f681c14c2d2569010c2f8eab4ff04f6373c2bf229"; + version = "2.2.840"; + + }; + paths = [ src ]; + } + + rec { + name = "jackson-core/com.fasterxml.jackson.core"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jackson-core"; + groupId = "com.fasterxml.jackson.core"; + sha512 = "428e0ebb16dd4c74ab0adf712058fd0dc0cd788f6e6f90c60c627da6577b345fac60a30694e111f1cd4e3e8bf79a1f1b820d30ada114984b26c28e299e326eaa"; + version = "2.12.4"; + + }; + paths = [ src ]; + } + + rec { + name = "clj-time/clj-time"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "clj-time"; + groupId = "clj-time"; + sha512 = "cfeb46af59fd4112aa5a5d0087a39355f0fc19514b4c02bc6c3d9f81c9bda40491686207836e9a7943aebeb82a3b36f4e8b7407a8908c5ef151122644b278d75"; + version = "0.15.2"; + + }; + paths = [ src ]; + } + + rec { + name = "clj-http/clj-http"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "clj-http"; + groupId = "clj-http"; + sha512 = "9884557d4f38068cb3234aec80acc0de8f9716645529693ffd9bd6db8221f5d1cf9e2d1b8bf7c7df4215d71372b02d83043ebf8fc27dc422552b32c9bdba1602"; + version = "3.12.3"; + + }; + paths = [ src ]; + } + + rec { + name = "jul-to-slf4j/org.slf4j"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jul-to-slf4j"; + groupId = "org.slf4j"; + sha512 = "350cfb889248d724b27dce697f635f12d9db463f107830b9518ce184dc4cc1ab3933eb5bdab08515e69766c3d5be24547dac289d6406c44eca90717230714b91"; + version = "2.0.0-alpha4"; + + }; + paths = [ src ]; + } + + rec { + name = "migratus/migratus"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "migratus"; + groupId = "migratus"; + sha512 = "ee5ce8601930d063e0d9d90fc8e165b78fc1587bfd7e0fc9922735bc2f9fc27f8cf8bf10d49d6fd57b899ac4b250145bd653915ed770424416e026ba37d1b604"; + version = "1.3.5"; + + }; + paths = [ src ]; + } + + rec { + name = "httpcore/org.apache.httpcomponents"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "httpcore"; + groupId = "org.apache.httpcomponents"; + sha512 = "f16a652f4a7b87dbf7cb16f8590d54a3f719c4c7b2f8883ce59db2d73be4701b64f2ca8a2c45aca6a5dbeaddeedff0c280a03722f70c076e239b645faa54eff9"; + version = "4.4.14"; + + }; + paths = [ src ]; + } + + rec { + name = "httpclient-cache/org.apache.httpcomponents"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "httpclient-cache"; + groupId = "org.apache.httpcomponents"; + sha512 = "e150e8dc49c8c9972d8b324b56bb292b15e2f0e686f1292c4edac975615dfb16e5edb8ab325e614732a7d43a03061ca4fe93fe1e1f7487851a4d4d3af50a61f9"; + version = "4.5.13"; + + }; + paths = [ src ]; + } + + rec { + name = "instaparse/instaparse"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "instaparse"; + groupId = "instaparse"; + sha512 = "ec2fcf4a09319a8fa9489b08fd9c9a5fe6e63155dde74d096f947fabc4f68d3d1bf68faf21e175e80eaee785f563a1903d30c550f93fb13a16a240609e3dfa2e"; + version = "1.4.8"; + + }; + paths = [ src ]; + } + + rec { + name = "honeysql-postgres/nilenso"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "honeysql-postgres"; + groupId = "nilenso"; + sha512 = "d4accd3b8819cf715ecdb29496cf5a6a5ad3871fd579e55c7148d4e05774cb896c681b0c6f84df88aa9cd8e6ef9bfd65788ede9a49ba365ad0e32ee350091879"; + version = "0.4.112"; + + }; + paths = [ src ]; + } + + rec { + name = "clj-tuple/clj-tuple"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "clj-tuple"; + groupId = "clj-tuple"; + sha512 = "dd626944d0aba679a21b164ed0c77ea84449359361496cba810f83b9fdeab751e5889963888098ce4bf8afa112dbda0a46ed60348a9c01ad36a2e255deb7ab6d"; + version = "0.2.2"; + + }; + paths = [ src ]; + } + + rec { + name = "jackson-annotations/com.fasterxml.jackson.core"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jackson-annotations"; + groupId = "com.fasterxml.jackson.core"; + sha512 = "6fdad6c5bb71a97331a662fe26265aacab6869f3307a710697d5c2f256fd48935764bfb0b3505a2cbb1605daf0b7350abdf84a1b1cf2bb1e91d9184565243c8e"; + version = "2.12.4"; + + }; + paths = [ src ]; + } + + rec { + name = "hiccup/hiccup"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "hiccup"; + groupId = "hiccup"; + sha512 = "034f15be46c35029f41869c912f82cb2929fbbb0524ea64bd98dcdb9cf09875b28c75e926fa5fff53942b0f9e543e85a73a2d03c3f2112eecae30fcef8b148f4"; + version = "1.0.5"; + + }; + paths = [ src ]; + } + + rec { + name = "riddley/riddley"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "riddley"; + groupId = "riddley"; + sha512 = "b478ecba9d1ab9d38c84a42354586fcece763000907b40c97bc43c0f16dc560b0860144efe410193cb3b7cb0149fbc1724fdd737cc3ba53de23618f5b30e6f9f"; + version = "0.1.12"; + + }; + paths = [ src ]; + } + + rec { + name = "java.classpath/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "java.classpath"; + groupId = "org.clojure"; + sha512 = "90cd8edeaea02bd908d8cfb0cf5b1cf901aeb38ea3f4971c4b813d33210438aae6fff8e724a8272d2ea9441d373e7d936fa5870e309c1e9721299f662dbbdb9a"; + version = "1.0.0"; + + }; + paths = [ src ]; + } + + rec { + name = "simpleclient_pushgateway/io.prometheus"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "simpleclient_pushgateway"; + groupId = "io.prometheus"; + sha512 = "31c8878929f516ba7030cc9ec4ac4cbcb09955a9fdae23c6904bc481e40e70e1b3e05619c49b646119077ef6f57c430cc7944f6bafdbca24c9efa8145474fcf7"; + version = "0.12.0"; + + }; + paths = [ src ]; + } + + rec { + name = "ns-tracker/ns-tracker"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ns-tracker"; + groupId = "ns-tracker"; + sha512 = "cfb6c2c9f899b43d1284acdc572b34b977936c4df734b38137dfea045421b74d529509cde23695f1dc5ee06d046c2f6b61a2cd98058da1c7220c21dd0361964f"; + version = "0.4.0"; + + }; + paths = [ src ]; + } + + rec { + name = "clout/clout"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "clout"; + groupId = "clout"; + sha512 = "99d6e1a8c5726ca4e5d12b280a39e6d1182d734922600f27d588d3d65fbc830c5e03f9e0421ff25c819deee4d1f389fd3906222716ace1eb17ce70ef9c5e8f4b"; + version = "2.2.1"; + + }; + paths = [ src ]; + } + + rec { + name = "commons-logging/commons-logging"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "commons-logging"; + groupId = "commons-logging"; + sha512 = "ed00dbfabd9ae00efa26dd400983601d076fe36408b7d6520084b447e5d1fa527ce65bd6afdcb58506c3a808323d28e88f26cb99c6f5db9ff64f6525ecdfa557"; + version = "1.2"; + + }; + paths = [ src ]; + } + + rec { + name = "clojure.java-time/clojure.java-time"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "clojure.java-time"; + groupId = "clojure.java-time"; + sha512 = "62d8a286ec3393594e7f84eba22dbb02c1305a80a18b2574058ae963d3f3e829ff960c8b66e89069e6c071a11f869203134c6c4cdec6f8e516c9b314796c8108"; + version = "0.3.3"; + + }; + paths = [ src ]; + } + + rec { + name = "data.csv/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "data.csv"; + groupId = "org.clojure"; + sha512 = "b039775a859ed27eca8f8ae74ccb6afde3ad1fe2b3cbe542240c324d60fe1237e495eb1300ee9eb4ff4ef59f01faf7aec6ef1dd6a025ee4fe556c1d91acfcf1b"; + version = "1.0.0"; + + }; + paths = [ src ]; + } + + rec { + name = "simpleclient_tracer_otel_agent/io.prometheus"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "simpleclient_tracer_otel_agent"; + groupId = "io.prometheus"; + sha512 = "97694210d9a5b48a7cb9dda2a187432c4813edb3051edfa5832a0a471e0b2d5988dab92b70c292e78f59b169345deb5c1c706361fd726f3dc2480766dedfdcec"; + version = "0.12.0"; + + }; + paths = [ src ]; + } + + rec { + name = "next.jdbc/com.github.seancorfield"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "next.jdbc"; + groupId = "com.github.seancorfield"; + sha512 = "0b4b01ba126bb8b1e2c14262db9fca75456b274d09535d9a7bb386699bf20dc9ac11590d210769e7429ca59ebfdfbb06916b3ff275cc817d74eac5bbabdab8f2"; + version = "1.2.761"; + + }; + paths = [ src ]; + } + + rec { + name = "java.jdbc/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "java.jdbc"; + groupId = "org.clojure"; + sha512 = "6162b7774dca58b62a94bc5a04ba845e4c7065c9c589cc3bb802becfec0baf0989a338c1bf9a5db7c3128873702840d5f2451628f3aac977245975d65a683b7d"; + version = "0.7.11"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-transport/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-transport"; + groupId = "io.netty"; + sha512 = "c11d690ffeaf3267b2166f73a43108fb89d588fcef3f6d3053bf4b6f6669483baa618fd97438010692a6fa28334372d5a31b7c0996961d4eabb60cbdc358a536"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "crypto-random/crypto-random"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "crypto-random"; + groupId = "crypto-random"; + sha512 = "3520df744f250dbe061d1a5d7a05b7143f3a67a4c3f9ad87b8044ee68a36a702a0bcb3a203e35d380899dd01c28e01988b0a7af914b942ccbe0c35c9bdb22e11"; + version = "1.2.1"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-transport-native-unix-common/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-transport-native-unix-common"; + groupId = "io.netty"; + sha512 = "b63e5f8a44b7f37f3dba378bd06af64dd1d7be3f0b1a7d47ad139ff06e0212b4c7081275b1b5b12183aeb72eb5f9bf9ef03ed8c78bc302aeb4817dca7bd89f3a"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "ring-codec/ring"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ring-codec"; + groupId = "ring"; + sha512 = "38b9775a794831b8afd8d66991a75aa5910cd50952c9035866bf9cc01353810aedafbc3f35d8f9e56981ebf9e5c37c00b968759ed087d2855348b3f46d8d0487"; + version = "1.1.3"; + + }; + paths = [ src ]; + } + + rec { + name = "spy/com.impossibl.pgjdbc-ng"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "spy"; + groupId = "com.impossibl.pgjdbc-ng"; + sha512 = "173615c39aa6015a732e329217b40e3ea1c304c9c168d2764d6ef23ab8775e2f4432339bc22d049662561f09d3fd890b5415738620d64dcedb762d5da26b4ebb"; + version = "0.8.9"; + + }; + paths = [ src ]; + } + + rec { + name = "logback-json-core/ch.qos.logback.contrib"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "logback-json-core"; + groupId = "ch.qos.logback.contrib"; + sha512 = "2a826036f21997e2979fda83ae3e33cf62f3b2b2df15a7b11d1fd8a52163b09f0f2f8d72f5fdcea0ec1289b3d27727ed5e6b0bcdf4c5d741f4bac07b7b6139e8"; + version = "0.1.5"; + + }; + paths = [ src ]; + } + + rec { + name = "httpclient/org.apache.httpcomponents"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "httpclient"; + groupId = "org.apache.httpcomponents"; + sha512 = "3567739186e551f84cad3e4b6b270c5b8b19aba297675a96bcdff3663ff7d20d188611d21f675fe5ff1bfd7d8ca31362070910d7b92ab1b699872a120aa6f089"; + version = "4.5.13"; + + }; + paths = [ src ]; + } + + rec { + name = "crypto-equality/crypto-equality"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "crypto-equality"; + groupId = "crypto-equality"; + sha512 = "54cf3bd28f633665962bf6b41f5ccbf2634d0db210a739e10a7b12f635e13c7ef532efe1d5d8c0120bb46478bbd08000b179f4c2dd52123242dab79fea97d6a6"; + version = "1.0.0"; + + }; + paths = [ src ]; + } + + rec { + name = "cheshire/cheshire"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "cheshire"; + groupId = "cheshire"; + sha512 = "855e9c42a8d1c64f4db5cda45e31e914eb5ed99a715e8d7a5759a9c4ab6c69a82353635ca7b0837880c6cf9b41b11184ae11e09cbf2c07aa13db32c539e5dfd4"; + version = "5.10.1"; + + }; + paths = [ src ]; + } + + rec { + name = "tigris/tigris"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "tigris"; + groupId = "tigris"; + sha512 = "fdff4ef5e7175a973aaef98de4f37dee8e125fc711c495382e280aaf3e11341fe8925d52567ca60f3f1795511ade11bc23461c88959632dfae3cf50374d02bf6"; + version = "0.1.2"; + + }; + paths = [ src ]; + } + + rec { + name = "config/yogthos"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "config"; + groupId = "yogthos"; + sha512 = "3437992d192465edc74aec5259d5e0c0ad7e631dff860b2ee14cef27f13cee7c60487202cf00fc160a95fb0b85ce1ddf56cbdd0c008b47ac598061bf115f6a23"; + version = "1.1.9"; + + }; + paths = [ src ]; + } + + rec { + name = "jetty-io/org.eclipse.jetty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jetty-io"; + groupId = "org.eclipse.jetty"; + sha512 = "a8c5f73089daa0c8b27f836acddf40bcbf07bbb2571a4d73653be8aac3fb339022f546326722f216bad78a68886934d24db9bec54235124592dd29dbeab69051"; + version = "9.4.42.v20210604"; + + }; + paths = [ src ]; + } + + rec { + name = "logback-json-classic/ch.qos.logback.contrib"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "logback-json-classic"; + groupId = "ch.qos.logback.contrib"; + sha512 = "d30bf70217d316914d83d46cc15783f656354084087d59cbc0620a746f10b4a42e56d33b3e50a8b3596a64ec8314730bf5ff9a3f7dc3417bdd0582665be009ec"; + version = "0.1.5"; + + }; + paths = [ src ]; + } + + rec { + name = "tools.reader/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "tools.reader"; + groupId = "org.clojure"; + sha512 = "3481259c7a1eac719db2921e60173686726a0c2b65879d51a64d516a37f6120db8ffbb74b8bd273404285d7b25143ab5c7ced37e7c0eaf4ab1e44586ccd3c651"; + version = "1.3.6"; + + }; + paths = [ src ]; + } + + rec { + name = "simpleclient_common/io.prometheus"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "simpleclient_common"; + groupId = "io.prometheus"; + sha512 = "dedd003638eb3651c112e2d697ac94eb4e3b3e32c94fa41bb1efe2c889a347cdc7bd13256e05423f3370592d4fd65faf8db57f0387ab75814d7fa77b14cbbadf"; + version = "0.12.0"; + + }; + paths = [ src ]; + } + + rec { + name = "commons-compiler/org.codehaus.janino"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "commons-compiler"; + groupId = "org.codehaus.janino"; + sha512 = "f0778b891ef14d8ee6776747eab0b25da716cdc530752a81aedec2a77570e2f66402179b9408a6efde8125c808eb060a720d2f4977c1f1d022bdaae7eac8d011"; + version = "3.1.2"; + + }; + paths = [ src ]; + } + + rec { + name = "servlet-api/javax.servlet"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "servlet-api"; + groupId = "javax.servlet"; + sha512 = "363ba5590436ab82067b7a2e14b481aeb2b12ca4048d7a1519a2e549b2d3c09ddf718ac64dc2be6c2fc24c51fdc9c8160261329403113369588ce27d87771db6"; + version = "2.5"; + + }; + paths = [ src ]; + } + + rec { + name = "iapetos/clj-commons"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "iapetos"; + groupId = "clj-commons"; + sha512 = "d17f36c0cf0ec78db5e893e5c033f8562b31650bda6f5ee582e68f84a07a3631d04d6f69e4e18b1ca64e732c180fa669dfb69a78849e13f601cd563a7a8aab94"; + version = "0.1.12"; + + }; + paths = [ src ]; + } + + rec { + name = "javax.servlet-api/javax.servlet"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "javax.servlet-api"; + groupId = "javax.servlet"; + sha512 = "32f7e3565c6cdf3d9a562f8fd597fe5059af0cf6b05b772a144a74bbc95927ac275eb38374538ec1c72adcce4c8e1e2c9f774a7b545db56b8085af0065e4a1e5"; + version = "3.1.0"; + + }; + paths = [ src ]; + } + + rec { + name = "potemkin/potemkin"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "potemkin"; + groupId = "potemkin"; + sha512 = "5abc050bf7ff0b27d8c45aaa5e378201980815b711b2db99735db73304576c17e285026ea48a714bf0b0df7ad7a008de38b7d182cdc0e8989f4be1e6b3afa8aa"; + version = "0.4.5"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-resolver/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-resolver"; + groupId = "io.netty"; + sha512 = "fabf893de74264caa1799c15d184ed8f20b7bf9b1c41abb29f29adf728a934951f97892a4924634f9efbda17c8cf74ea3ff97bafca616711e3c5f79b8ed9ef3e"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-transport-native-epoll/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-transport-native-epoll"; + groupId = "io.netty"; + sha512 = "6fbc2dd2622699f3fc1f329acbd94baf7f1d8923c5cfcae262e6f2d64b4fd71b606561bce5e2b511dff8e052cdade930091fab683fd98713f6b62a622a2c6254"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "clj-stacktrace/clj-stacktrace"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "clj-stacktrace"; + groupId = "clj-stacktrace"; + sha512 = "993f8a544203801fc074eefacee8e553e426422b3492d47b857d87ac73cde72c91e29f629382b9eae8cf9600bc2c4c29d2e7169e509c46302ab973c86e73af0c"; + version = "0.2.8"; + + }; + paths = [ src ]; + } + + rec { + name = "cambium.codec-cheshire/cambium"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "cambium.codec-cheshire"; + groupId = "cambium"; + sha512 = "614491cf752a597f29ae29885db6c1ed191341303d89183bee52e4e2c76eb8eb14693562ad09484f379a074b36d97085e848ec3845e069440e6422506c1636f1"; + version = "1.0.0"; + + }; + paths = [ src ]; + } + + rec { + name = "slf4j-api/org.slf4j"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "slf4j-api"; + groupId = "org.slf4j"; + sha512 = "ad705ab6fd5cd904ef6861c0adf08af19593cf6a486b18de548fe3d68e57b1baa7e02947584fd4dcc350ddcddcf906c01e8d9ba7943a202690d0d788627696b5"; + version = "2.0.0-alpha4"; + + }; + paths = [ src ]; + } + + rec { + name = "test.check/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "test.check"; + groupId = "org.clojure"; + sha512 = "b8d7a330b0b5514cd6a00c4382052fab51c3c9d3bc53133f8506791fa670e7c5ecd65094977ea5ced91f59623b0abd1ab8feeec96d63c5c6e459b265a655c577"; + version = "1.1.1"; + + }; + paths = [ src ]; + } + + rec { + name = "ring-logger/ring-logger"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ring-logger"; + groupId = "ring-logger"; + sha512 = "b675a61c173289fc610d84920ba40178bf62b3bc680923cb66866d78ee2a508296b27a1ab14b66bfbe0304a64166a7e3c3ddee36564dd4a2f988861bce455a3a"; + version = "1.0.1"; + + }; + paths = [ src ]; + } + + rec { + name = "ring-servlet/ring"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ring-servlet"; + groupId = "ring"; + sha512 = "3d8e6ec224e13d54810a945c0b6c0d2d863736a48d8c4bfc8fadb96b6b0fa9baa638644d0d92d8a53650b188e6e75d391731b08b26eb0f551e90a7504e7f4267"; + version = "1.9.4"; + + }; + paths = [ src ]; + } + + rec { + name = "logback-classic/ch.qos.logback"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "logback-classic"; + groupId = "ch.qos.logback"; + sha512 = "f9fe0f126061f4abe3973b631b8d8244ba9e9d77783479a6500d629d772050dee508a001fc14d2131407fbdd0d33dd6b8aeb9b1ea9125b471bb8412e8de659e6"; + version = "1.3.0-alpha12"; + + }; + paths = [ src ]; + } + + rec { + name = "dependency/com.stuartsierra"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "dependency"; + groupId = "com.stuartsierra"; + sha512 = "d32fbc4813bd16f2ed8c82e2915e1fb564e88422159bd3580a85c8cd969d1bbbe315bdc13d29c2f0eaceeeafcf649ee712c8df4532464d560aaeae4ae5953866"; + version = "1.0.0"; + + }; + paths = [ src ]; + } + + rec { + name = "camel-snake-kebab/camel-snake-kebab"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "camel-snake-kebab"; + groupId = "camel-snake-kebab"; + sha512 = "589d34b500560b7113760a16bfb6f0ccd8f162a1ce8c9bc829495432159ba9c95aebf6bc43aa126237a0525806a205a05f9910122074902b659e7fd151d176b1"; + version = "0.4.2"; + + }; + paths = [ src ]; + } + + rec { + name = "ring/ring"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ring"; + groupId = "ring"; + sha512 = "93c48fb670736b91fb41d8076e1e9c4f53c67693d15e75290da319e7d7881b829a24180029b3a0fa051473c6c77ac3c97b519254ebf2b2c9538b185e79b69162"; + version = "1.9.4"; + + }; + paths = [ src ]; + } + + rec { + name = "netty-transport-native-kqueue/io.netty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "netty-transport-native-kqueue"; + groupId = "io.netty"; + sha512 = "87e10c06e394a1698d65381d3be8336f753c55e3e899e297510161d0c72540023f30f9032322957e035ead793204a084b988bc21a2bc312fcf7567a22d02a3c4"; + version = "4.1.63.Final"; + + }; + paths = [ src ]; + } + + rec { + name = "java.data/org.clojure"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "java.data"; + groupId = "org.clojure"; + sha512 = "225e1eafd1a659278212d831f7cd8609359f8c880ef3d69b4ade6301ce3c511307ce31d94cb82d5407314b990bd04714ec26273bb3036b248116a7a75fa75e1f"; + version = "1.0.95"; + + }; + paths = [ src ]; + } + + rec { + name = "jetty-server/org.eclipse.jetty"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jetty-server"; + groupId = "org.eclipse.jetty"; + sha512 = "b347f8a6e5b84e0f460037027e238a61edec710ade768c95e7be13dcea498abe43d5e622ee69ac7494138d1a8fcf92e07b7deab569c554831c57baad71c53b9b"; + version = "9.4.42.v20210604"; + + }; + paths = [ src ]; + } + + rec { + name = "httpmime/org.apache.httpcomponents"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "httpmime"; + groupId = "org.apache.httpcomponents"; + sha512 = "e1b0ee84bce78576074dc1b6836a69d8f5518eade38562e6890e3ddaa72b7f54bf735c8e2286142c58cddf45f745da31261e5d73b7d8092eb6ecfb20946eb36c"; + version = "4.5.13"; + + }; + paths = [ src ]; + } + + rec { + name = "log4j-over-slf4j/org.slf4j"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "log4j-over-slf4j"; + groupId = "org.slf4j"; + sha512 = "48fa023c57294b73b9bd2f53e3dd3169e03426e5b3aa9d80e1bb1a9abf927fc26ef9f64d02b9769d5577d83094d0f41f044d35bb3b4f6037d66d6b2f19b484a1"; + version = "2.0.0-alpha4"; + + }; + paths = [ src ]; + } + + rec { + name = "ring-core/ring"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "ring-core"; + groupId = "ring"; + sha512 = "38d7214a3fc1b80ab55999036638dd1971272e01bec4cb8e0ee0a4aa83f51b8c41ba8a5850b0660227f067d2f9c6d75c0c0737725ea02762bbf8d192dc72febe"; + version = "1.9.4"; + + }; + paths = [ src ]; + } + + rec { + name = "cambium.core/cambium"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "cambium.core"; + groupId = "cambium"; + sha512 = "0e1fe626c6d0b31aad84ea2e4466273065925548ee5915f442b7997ebfe795faea36dbeac50a0f8c16bbd20d877511e3f8c4ff4f2b916a4538513aaa5cc20112"; + version = "1.1.1"; + + }; + paths = [ src ]; + } + + rec { + name = "medley/medley"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "medley"; + groupId = "medley"; + sha512 = "749ef43b5ea2cae7dc96db871cdd15c7b3c9cfbd96828c20ab08e67d39a5e938357d15994d8d413bc68678285d6c666f2a7296fbf305706d03b3007254e3c55c"; + version = "1.3.0"; + + }; + paths = [ src ]; + } + + rec { + name = "garden/garden"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "garden"; + groupId = "garden"; + sha512 = "2cc29f071b68bf451835f76de351ac2efb930b5df9ca7237fdca439d3c4d797d7fa207a147886efe1738ab1c50b76c1e366bf9ffcd6f286b0b211260aedd0b25"; + version = "1.3.10"; + + }; + paths = [ src ]; + } + + rec { + name = "jackson-dataformat-smile/com.fasterxml.jackson.dataformat"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jackson-dataformat-smile"; + groupId = "com.fasterxml.jackson.dataformat"; + sha512 = "69676964a2b09516b8ffd0d847b6f9a9b843424185453731b548c25e7e9ce30e808c56d66923f9183e2b5c1ba007421b146a6806e768b8e6b07470d60227f1dd"; + version = "2.12.4"; + + }; + paths = [ src ]; + } + + rec { + name = "jaxb-api/javax.xml.bind"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "jaxb-api"; + groupId = "javax.xml.bind"; + sha512 = "0c5bfc2c9f655bf5e6d596e0c196dcb9344d6dc78bf774207c8f8b6be59f69addf2b3121e81491983eff648dfbd55002b9878132de190825dad3ef3a1265b367"; + version = "2.3.0"; + + }; + paths = [ src ]; + } + + rec { + name = "pgjdbc-ng/com.impossibl.pgjdbc-ng"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "pgjdbc-ng"; + groupId = "com.impossibl.pgjdbc-ng"; + sha512 = "a34ac9146257329f6e9b354f13f564c65dbea6463addae383e3918d3a64c90c67f5f7fda6b5c3866de991a568d6690edb3fb09f2507593390a6e30ec0c79e02c"; + version = "0.8.9"; + + }; + paths = [ src ]; + } + + rec { + name = "http-kit/http-kit"; + src = fetchMavenArtifact { + inherit repos; + artifactId = "http-kit"; + groupId = "http-kit"; + sha512 = "4186a2429984745e18730aa8fd545f1fc1812083819ebf77aecfc04e0d31585358a5e25a308c7f21d81359418bbc72390c281f5ed91ae116cf1af79860ba22c3"; + version = "2.5.3"; + + }; + paths = [ src ]; + } ]; - } +} \ No newline at end of file diff --git a/users/grfn/bbbg/module.nix b/users/grfn/bbbg/module.nix index 297d846f22b6..7a49f7934a37 100644 --- a/users/grfn/bbbg/module.nix +++ b/users/grfn/bbbg/module.nix @@ -3,7 +3,8 @@ let bbbg = depot.users.grfn.bbbg; cfg = config.services.bbbg; -in { +in +{ options = with lib; { services.bbbg = { enable = mkEnableOption "BBBG Server"; @@ -81,9 +82,9 @@ in { description = "Run database migrations for BBBG"; wantedBy = [ "bbbg-server.service" ]; after = ([ "network.target" ] - ++ (if cfg.database.enable - then ["postgresql.service"] - else [])); + ++ (if cfg.database.enable + then [ "postgresql.service" ] + else [ ])); serviceConfig = { Type = "oneshot"; diff --git a/users/grfn/bbbg/shell.nix b/users/grfn/bbbg/shell.nix index 48bcd73759d0..e26569657f07 100644 --- a/users/grfn/bbbg/shell.nix +++ b/users/grfn/bbbg/shell.nix @@ -1,5 +1,5 @@ let - depot = import ../../.. {}; + depot = import ../../.. { }; in with depot.third_party.nixpkgs; diff --git a/users/grfn/bbbg/tf.nix b/users/grfn/bbbg/tf.nix index 097ad595797b..d5b19d9ebc88 100644 --- a/users/grfn/bbbg/tf.nix +++ b/users/grfn/bbbg/tf.nix @@ -3,14 +3,17 @@ let inherit (depot.users.grfn) terraform - ; + ; -in terraform.workspace "bbbg" { +in +terraform.workspace "bbbg" +{ plugins = (p: with p; [ aws cloudflare ]); -} { +} +{ machine = terraform.nixosMachine { name = "bbbg"; instanceType = "t3a.small"; @@ -52,8 +55,8 @@ in terraform.workspace "bbbg" { }; security.sudo.extraRules = [{ - groups = ["wheel"]; - commands = [{ command = "ALL"; options = ["NOPASSWD"]; }]; + groups = [ "wheel" ]; + commands = [{ command = "ALL"; options = [ "NOPASSWD" ]; }]; }]; nix.gc = { diff --git a/users/grfn/gws.fyi/default.nix b/users/grfn/gws.fyi/default.nix index 5b7d8fc0e19a..5ab3614d7902 100644 --- a/users/grfn/gws.fyi/default.nix +++ b/users/grfn/gws.fyi/default.nix @@ -6,13 +6,14 @@ let bucket = "s3://gws.fyi"; distributionID = "E2ST43JNBH8C64"; - css = runCommand "main.css" { - buildInputs = [ pkgs.minify ]; - } '' + css = runCommand "main.css" + { + buildInputs = [ pkgs.minify ]; + } '' minify --type css < ${./main.css} > $out ''; - keys = runCommand "ssh-keys" {} '' + keys = runCommand "ssh-keys" { } '' touch $out echo "${depot.users.grfn.keys.main}" >> $out ''; @@ -27,7 +28,8 @@ let cp ${keys} $out/keys ''; -in (writeShellScript "deploy.sh" '' +in +(writeShellScript "deploy.sh" '' ${awscli2}/bin/aws --profile personal s3 sync ${website}/ ${bucket} echo "Deployed to http://gws.fyi" '') // { diff --git a/users/grfn/gws.fyi/orgExportHTML.nix b/users/grfn/gws.fyi/orgExportHTML.nix index ac28580a5926..f9cb8d38fb77 100644 --- a/users/grfn/gws.fyi/orgExportHTML.nix +++ b/users/grfn/gws.fyi/orgExportHTML.nix @@ -25,15 +25,16 @@ let outName = if isNull headline then - let bn = builtins.baseNameOf src; - filename = elemAt (splitString "." bn) 0; + let + bn = builtins.baseNameOf src; + filename = elemAt (splitString "." bn) 0; in - if depot.nix.utils.isDirectory src - then filename - else filename + ".html" + if depot.nix.utils.isDirectory src + then filename + else filename + ".html" else "${filename}-${replaceStrings [" "] ["-"] filename}.html"; - escapeDoubleQuotes = replaceStrings ["\""] ["\\\""]; + escapeDoubleQuotes = replaceStrings [ "\"" ] [ "\\\"" ]; navToHeadline = optionalString (! isNull headline) '' (search-forward "${escapeDoubleQuotes headline}") diff --git a/users/grfn/gws.fyi/site.nix b/users/grfn/gws.fyi/site.nix index 33d4a71e7b1f..057c4d3ee698 100644 --- a/users/grfn/gws.fyi/site.nix +++ b/users/grfn/gws.fyi/site.nix @@ -1,4 +1,4 @@ -args@{ pkgs ? import <nixpkgs> {}, ... }: +args@{ pkgs ? import <nixpkgs> { }, ... }: let diff --git a/users/grfn/resume/default.nix b/users/grfn/resume/default.nix index 2db6a650bc6e..21801ad9e7a8 100644 --- a/users/grfn/resume/default.nix +++ b/users/grfn/resume/default.nix @@ -2,31 +2,34 @@ with pkgs.lib; -pkgs.runCommandNoCC "resume.pdf" { - buildInputs = [(pkgs.texlive.combine { - inherit (pkgs.texlive) - capt-of - collection-fontsrecommended - enumitem - etoolbox - fancyvrb - float - fncychap - framed - l3packages - microtype - needspace - parskip - scheme-basic - tabulary - titlesec - ulem - upquote - varwidth - wrapfig - xcolor - ; - })]; +pkgs.runCommandNoCC "resume.pdf" +{ + buildInputs = [ + (pkgs.texlive.combine { + inherit (pkgs.texlive) + capt-of + collection-fontsrecommended + enumitem + etoolbox + fancyvrb + float + fncychap + framed + l3packages + microtype + needspace + parskip + scheme-basic + tabulary + titlesec + ulem + upquote + varwidth + wrapfig + xcolor + ; + }) + ]; } '' cp ${builtins.filterSource (path: type: type == "regular" && diff --git a/users/grfn/secrets/shell.nix b/users/grfn/secrets/shell.nix index fe912fe791ea..6e70458d1972 100644 --- a/users/grfn/secrets/shell.nix +++ b/users/grfn/secrets/shell.nix @@ -1,5 +1,5 @@ let - depot = import ../../.. {}; + depot = import ../../.. { }; in depot.third_party.nixpkgs.mkShell { buildInputs = [ diff --git a/users/grfn/system/home/common/solarized.nix b/users/grfn/system/home/common/solarized.nix index e94693edc566..554ee0523e46 100644 --- a/users/grfn/system/home/common/solarized.nix +++ b/users/grfn/system/home/common/solarized.nix @@ -1,18 +1,18 @@ rec { - base03 = "#002B36"; - base02 = "#073642"; - base01 = "#586e75"; - base00 = "#657b83"; - base0 = "#839496"; - base1 = "#93a1a1"; - base2 = "#eee8d5"; - base3 = "#fdf6e3"; - yellow = "#b58900"; - orange = "#cb4b16"; - red = "#dc322f"; + base03 = "#002B36"; + base02 = "#073642"; + base01 = "#586e75"; + base00 = "#657b83"; + base0 = "#839496"; + base1 = "#93a1a1"; + base2 = "#eee8d5"; + base3 = "#fdf6e3"; + yellow = "#b58900"; + orange = "#cb4b16"; + red = "#dc322f"; magenta = "#d33682"; - violet = "#6c71c4"; - blue = "#268bd2"; - cyan = "#2aa198"; - green = "#859900"; + violet = "#6c71c4"; + blue = "#268bd2"; + cyan = "#2aa198"; + green = "#859900"; } diff --git a/users/grfn/system/home/machines/roswell.nix b/users/grfn/system/home/machines/roswell.nix index f68f3a7be36f..2e86eda4992d 100644 --- a/users/grfn/system/home/machines/roswell.nix +++ b/users/grfn/system/home/machines/roswell.nix @@ -19,7 +19,8 @@ in htop killall bind - zip unzip + zip + unzip tree ncat bc diff --git a/users/grfn/system/home/machines/yeren.nix b/users/grfn/system/home/machines/yeren.nix index 0c89e9d12393..343ebf2c9a09 100644 --- a/users/grfn/system/home/machines/yeren.nix +++ b/users/grfn/system/home/machines/yeren.nix @@ -58,10 +58,10 @@ in RemainAfterExit = true; ExecStart = ( "${pkgs.xorg.setxkbmap}/bin/setxkbmap " - + "-device ${laptopKeyboardId} " - + "-option caps:swapescape " - + "-option compose:ralt " - + "-option altwin:swap_alt_win" + + "-device ${laptopKeyboardId} " + + "-option caps:swapescape " + + "-option compose:ralt " + + "-option altwin:swap_alt_win" ); }; }; diff --git a/users/grfn/system/home/modules/alsi.nix b/users/grfn/system/home/modules/alsi.nix index c4a14e683c39..204f9c8e1428 100644 --- a/users/grfn/system/home/modules/alsi.nix +++ b/users/grfn/system/home/modules/alsi.nix @@ -10,30 +10,30 @@ xdg.configFile."alsi/alsi.conf" = { force = true; text = '' - #!${pkgs.perl}/bin/perl + #!${pkgs.perl}/bin/perl - scalar { - ALSI_VERSION => "0.4.8", - COLORS_FILE => "/home/grfn/.config/alsi/alsi.colors", - DE_FILE => "/home/grfn/.config/alsi/alsi.de", - DEFAULT_COLOR_BOLD => "blue", - DEFAULT_COLOR_NORMAL => "blue", - DF_COMMAND => "df -Th -x sys -x tmpfs -x devtmpfs &>/dev/stdout", - GTK2_RC_FILE => "/home/grfn/.gtkrc-2.0", - GTK3_RC_FILE => "/home/grfn/.config/gtk-3.0/settings.ini", - LOGO_FILE => "/home/grfn/.config/alsi/alsi.logo", - OUTPUT_FILE => "/home/grfn/.config/alsi/alsi.output", - # PACKAGES_PATH => "/var/lib/pacman/local/", - PS_COMMAND => "ps -A", - USAGE_COLORS => 0, - USAGE_COLORS_BOLD => 0, - USAGE_PRECENT_GREEN => 50, - USAGE_PRECENT_RED => 100, - USAGE_PRECENT_YELLOW => 85, - USE_LOGO_FROM_FILE => 1, - USE_VALUES_COLOR => 0, - WM_FILE => "/home/grfn/.config/alsi/alsi.wm", - } + scalar { + ALSI_VERSION => "0.4.8", + COLORS_FILE => "/home/grfn/.config/alsi/alsi.colors", + DE_FILE => "/home/grfn/.config/alsi/alsi.de", + DEFAULT_COLOR_BOLD => "blue", + DEFAULT_COLOR_NORMAL => "blue", + DF_COMMAND => "df -Th -x sys -x tmpfs -x devtmpfs &>/dev/stdout", + GTK2_RC_FILE => "/home/grfn/.gtkrc-2.0", + GTK3_RC_FILE => "/home/grfn/.config/gtk-3.0/settings.ini", + LOGO_FILE => "/home/grfn/.config/alsi/alsi.logo", + OUTPUT_FILE => "/home/grfn/.config/alsi/alsi.output", + # PACKAGES_PATH => "/var/lib/pacman/local/", + PS_COMMAND => "ps -A", + USAGE_COLORS => 0, + USAGE_COLORS_BOLD => 0, + USAGE_PRECENT_GREEN => 50, + USAGE_PRECENT_RED => 100, + USAGE_PRECENT_YELLOW => 85, + USE_LOGO_FROM_FILE => 1, + USE_VALUES_COLOR => 0, + WM_FILE => "/home/grfn/.config/alsi/alsi.wm", + } ''; }; diff --git a/users/grfn/system/home/modules/common.nix b/users/grfn/system/home/modules/common.nix index 6871cadda1cf..a31e1718192e 100644 --- a/users/grfn/system/home/modules/common.nix +++ b/users/grfn/system/home/modules/common.nix @@ -28,7 +28,8 @@ htop killall bind - zip unzip + zip + unzip tree ncat bc diff --git a/users/grfn/system/home/modules/development.nix b/users/grfn/system/home/modules/development.nix index 653ce5d83ae1..d60e6ba60759 100644 --- a/users/grfn/system/home/modules/development.nix +++ b/users/grfn/system/home/modules/development.nix @@ -2,12 +2,14 @@ let - clj2nix = pkgs.callPackage (pkgs.fetchFromGitHub { - owner = "hlolli"; - repo = "clj2nix"; - rev = "3ab3480a25e850b35d1f532a5e4e7b3202232383"; - sha256 = "1lry026mlpxp1j563qs13nhxf37i2zpl7lh0lgfdwc44afybqka6"; - }) {}; + clj2nix = pkgs.callPackage + (pkgs.fetchFromGitHub { + owner = "hlolli"; + repo = "clj2nix"; + rev = "3ab3480a25e850b35d1f532a5e4e7b3202232383"; + sha256 = "1lry026mlpxp1j563qs13nhxf37i2zpl7lh0lgfdwc44afybqka6"; + }) + { }; pg-dump-upsert = pkgs.buildGoModule rec { pname = "pg-dump-upsert"; @@ -87,7 +89,7 @@ with lib; enable = true; package = pkgs.gitFull; userEmail = "root@gws.fyi"; - userName = "Griffin Smith"; + userName = "Griffin Smith"; ignores = [ "*.sw*" ".classpath" @@ -206,7 +208,7 @@ with lib; functions = { gdelmerged = '' - git branch --merged | egrep -v 'master' | tr -d '+ ' | xargs git branch -d + git branch --merged | egrep -v 'master' | tr -d '+ ' | xargs git branch -d ''; }; }; diff --git a/users/grfn/system/home/modules/development/kube.nix b/users/grfn/system/home/modules/development/kube.nix index 97ae4760d43b..876b0c08df1d 100644 --- a/users/grfn/system/home/modules/development/kube.nix +++ b/users/grfn/system/home/modules/development/kube.nix @@ -16,7 +16,7 @@ "kpa" = "kubectl get pods --all-namespaces"; "klf" = "kubectl logs -f"; "kdep" = "kubectl get deployments"; - "ked" = "kubectl edit deployment"; + "ked" = "kubectl edit deployment"; "kpw" = "kubectl get pods -w"; "kew" = "kubectl get events -w"; "kdel" = "kubectl delete"; diff --git a/users/grfn/system/home/modules/emacs.nix b/users/grfn/system/home/modules/emacs.nix index 6cc38bc7ab05..c65d88aacf6f 100644 --- a/users/grfn/system/home/modules/emacs.nix +++ b/users/grfn/system/home/modules/emacs.nix @@ -3,16 +3,17 @@ with lib; let - # doom-emacs = pkgs.callPackage (builtins.fetchTarball { - # url = https://github.com/vlaci/nix-doom-emacs/archive/master.tar.gz; - # }) { - # doomPrivateDir = ./doom.d; # Directory containing your config.el init.el - # # and packages.el files - # }; + # doom-emacs = pkgs.callPackage (builtins.fetchTarball { + # url = https://github.com/vlaci/nix-doom-emacs/archive/master.tar.gz; + # }) { + # doomPrivateDir = ./doom.d; # Directory containing your config.el init.el + # # and packages.el files + # }; depot = config.lib.depot; -in { +in +{ imports = [ ./lib/cloneRepo.nix ]; @@ -47,7 +48,7 @@ in { upquote varwidth wrapfig - ; + ; }) ispell @@ -82,14 +83,14 @@ in { doomEmacs = { github = "hlissner/doom-emacs"; path = ".emacs.d"; - after = ["emacs.d"]; + after = [ "emacs.d" ]; onClone = "bin/doom install"; }; "emacs.d" = { github = "glittershark/emacs.d"; path = ".doom.d"; - after = ["orgClubhouse"]; + after = [ "orgClubhouse" ]; }; }; diff --git a/users/grfn/system/home/modules/email.nix b/users/grfn/system/home/modules/email.nix index 0a3e58205ba6..63dfeeb6f480 100644 --- a/users/grfn/system/home/modules/email.nix +++ b/users/grfn/system/home/modules/email.nix @@ -9,7 +9,8 @@ let let good = upperChars ++ lowerChars ++ stringToCharacters "0123456789-_"; subst = c: if any (x: x == c) good then c else "-"; - in stringAsChars subst name; + in + stringAsChars subst name; accounts = { personal = { @@ -26,7 +27,8 @@ let }; -in { +in +{ programs.lieer.enable = true; programs.notmuch.enable = true; services.lieer.enable = true; @@ -37,16 +39,18 @@ in { msmtp ]; - systemd.user.services = mapAttrs' (name: account: { - name = escapeUnitName "lieer-${name}"; - value.Service = { - ExecStart = mkForce "${pkgs.writeShellScript "sync-${name}" '' + systemd.user.services = mapAttrs' + (name: account: { + name = escapeUnitName "lieer-${name}"; + value.Service = { + ExecStart = mkForce "${pkgs.writeShellScript "sync-${name}" '' ${pkgs.gmailieer}/bin/gmi sync --path ~/mail/${name} ''}"; - Environment = "NOTMUCH_CONFIG=${config.home.sessionVariables.NOTMUCH_CONFIG}"; - }; + Environment = "NOTMUCH_CONFIG=${config.home.sessionVariables.NOTMUCH_CONFIG}"; + }; - }) accounts; + }) + accounts; # xdg.configFile."notifymuch/notifymuch.cfg".text = generators.toINI {} { # notifymuch = { @@ -58,30 +62,32 @@ in { # }; accounts.email.maildirBasePath = "mail"; - accounts.email.accounts = mapAttrs (_: params@{ passEntry, ... }: { - realName = "Griffin Smith"; - passwordCommand = "pass ${passEntry}"; + accounts.email.accounts = mapAttrs + (_: params@{ passEntry, ... }: { + realName = "Griffin Smith"; + passwordCommand = "pass ${passEntry}"; - flavor = "gmail.com"; + flavor = "gmail.com"; - imapnotify = { - enable = true; - boxes = [ "Inbox" ]; - }; + imapnotify = { + enable = true; + boxes = [ "Inbox" ]; + }; - gpg = { - key = "0F11A989879E8BBBFDC1E23644EF5B5E861C09A7"; - signByDefault = true; - }; + gpg = { + key = "0F11A989879E8BBBFDC1E23644EF5B5E861C09A7"; + signByDefault = true; + }; - notmuch.enable = true; - lieer = { - enable = true; - sync = { + notmuch.enable = true; + lieer = { enable = true; - frequency = "*:*"; + sync = { + enable = true; + frequency = "*:*"; + }; }; - }; - msmtp.enable = true; - } // builtins.removeAttrs params ["passEntry"]) accounts; + msmtp.enable = true; + } // builtins.removeAttrs params [ "passEntry" ]) + accounts; } diff --git a/users/grfn/system/home/modules/games.nix b/users/grfn/system/home/modules/games.nix index 26dc9d31f37a..8067caf65fb1 100644 --- a/users/grfn/system/home/modules/games.nix +++ b/users/grfn/system/home/modules/games.nix @@ -13,14 +13,14 @@ let enableFPS = true; }); - init = runCommand "init.txt" {} '' + init = runCommand "init.txt" { } '' substitute "${df-orig}/data/init/init.txt" $out \ --replace "[INTRO:YES]" "[INTRO:NO]" \ --replace "[VOLUME:255]" "[VOLUME:0]" \ --replace "[FPS:NO]" "[FPS:YES]" ''; - d_init = runCommand "d_init.txt" {} '' + d_init = runCommand "d_init.txt" { } '' substitute "${df-orig}/data/init/d_init.txt" $out \ --replace "[AUTOSAVE:NONE]" "[AUTOSAVE:SEASONAL]" \ --replace "[AUTOSAVE_PAUSE:NO]" "[AUTOSAVE_PAUSE:YES]" \ @@ -30,7 +30,7 @@ let --replace "[SHOW_FLOW_AMOUNTS:NO]" "[SHOW_FLOW_AMOUNTS:YES]" ''; - df = runCommand "dwarf-fortress" {} '' + df = runCommand "dwarf-fortress" { } '' mkdir -p $out/bin sed \ -e '4icp -f ${init} "$DF_DIR/data/init/init.txt"' \ @@ -43,7 +43,8 @@ let chmod +x $out/bin/dwarf-fortress ''; -in mkMerge [ +in +mkMerge [ { home.packages = [ crawl diff --git a/users/grfn/system/home/modules/i3.nix b/users/grfn/system/home/modules/i3.nix index 111f2a08c225..7bd371e117d1 100644 --- a/users/grfn/system/home/modules/i3.nix +++ b/users/grfn/system/home/modules/i3.nix @@ -20,7 +20,8 @@ let inherit (builtins) map; inherit (lib) mkMerge range; -in { +in +{ options = with lib; { system.machine.wirelessInterface = mkOption { description = '' @@ -77,50 +78,51 @@ in { "move container to workspace ${toString n}"; }) (range 0 9)) - ++ [(rec { - "${mod}+h" = "focus left"; - "${mod}+j" = "focus down"; - "${mod}+k" = "focus up"; - "${mod}+l" = "focus right"; - "${mod}+semicolon" = "focus parent"; + ++ [ + (rec { + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; + "${mod}+semicolon" = "focus parent"; - "${mod}+Shift+h" = "move left"; - "${mod}+Shift+j" = "move down"; - "${mod}+Shift+k" = "move up"; - "${mod}+Shift+l" = "move right"; + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+j" = "move down"; + "${mod}+Shift+k" = "move up"; + "${mod}+Shift+l" = "move right"; - "${mod}+Shift+x" = "kill"; + "${mod}+Shift+x" = "kill"; - "${mod}+Return" = "exec alacritty"; + "${mod}+Return" = "exec alacritty"; - "${mod}+Shift+s" = "split h"; - "${mod}+Shift+v" = "split v"; - "${mod}+e" = "layout toggle split"; - "${mod}+w" = "layout tabbed"; - "${mod}+s" = "layout stacking"; + "${mod}+Shift+s" = "split h"; + "${mod}+Shift+v" = "split v"; + "${mod}+e" = "layout toggle split"; + "${mod}+w" = "layout tabbed"; + "${mod}+s" = "layout stacking"; - "${mod}+f" = "fullscreen"; + "${mod}+f" = "fullscreen"; - "${mod}+Shift+r" = "restart"; + "${mod}+Shift+r" = "restart"; - "${mod}+r" = "mode resize"; + "${mod}+r" = "mode resize"; - # Marks - "${mod}+Shift+m" = ''exec i3-input -F "mark %s" -l 1 -P 'Mark: ' ''; - "${mod}+m" = ''exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Go to: ' ''; + # Marks + "${mod}+Shift+m" = ''exec i3-input -F "mark %s" -l 1 -P 'Mark: ' ''; + "${mod}+m" = ''exec i3-input -F '[con_mark="%s"] focus' -l 1 -P 'Go to: ' ''; - # Screenshots - "${mod}+q" = "exec \"maim | xclip -selection clipboard -t image/png\""; - "${mod}+Shift+q" = "exec \"maim -s | xclip -selection clipboard -t image/png\""; - "${mod}+Ctrl+q" = "exec ${pkgs.writeShellScript "peek.sh" '' + # Screenshots + "${mod}+q" = "exec \"maim | xclip -selection clipboard -t image/png\""; + "${mod}+Shift+q" = "exec \"maim -s | xclip -selection clipboard -t image/png\""; + "${mod}+Ctrl+q" = "exec ${pkgs.writeShellScript "peek.sh" '' ${pkgs.picom}/bin/picom & picom_pid=$! ${pkgs.peek}/bin/peek || true kill -SIGINT $picom_pid ''}"; - # Launching applications - "${mod}+u" = "exec ${pkgs.writeShellScript "rofi" '' + # Launching applications + "${mod}+u" = "exec ${pkgs.writeShellScript "rofi" '' rofi \ -modi 'combi' \ -combi-modi "window,drun,ssh,run" \ @@ -128,49 +130,51 @@ in { -show combi ''}"; - # Passwords - "${mod}+p" = "exec rofi-pass -font '${decorationFont}'"; - - # Media - "XF86AudioPlay" = "exec playerctl play-pause"; - "XF86AudioNext" = "exec playerctl next"; - "XF86AudioPrev" = "exec playerctl previous"; - "XF86AudioRaiseVolume" = "exec pulseaudio-ctl up"; - "XF86AudioLowerVolume" = "exec pulseaudio-ctl down"; - "XF86AudioMute" = "exec pulseaudio-ctl mute"; - - # Lock - Pause = "exec lock"; - - # Brightness - "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl -q s 5%-"; - "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl -q s 5%+"; - - # Sleep/hibernate - # "${mod}+Escape" = "exec systemctl suspend"; - # "${mod}+Shift+Escape" = "exec systemctl hibernate"; - - # Scratch buffer - "${mod}+minus" = "scratchpad show"; - "${mod}+Shift+minus" = "move scratchpad"; - "${mod}+space" = "focus mode_toggle"; - "${mod}+Shift+space" = "floating toggle"; - - # Screen Layout - "${mod}+Shift+t" = "exec xrandr --auto"; - "${mod}+t" = "exec ${screenlayout.home}"; - "${mod}+Ctrl+t" = "exec ${pkgs.writeShellScript "fix_term.sh" '' + # Passwords + "${mod}+p" = "exec rofi-pass -font '${decorationFont}'"; + + # Media + "XF86AudioPlay" = "exec playerctl play-pause"; + "XF86AudioNext" = "exec playerctl next"; + "XF86AudioPrev" = "exec playerctl previous"; + "XF86AudioRaiseVolume" = "exec pulseaudio-ctl up"; + "XF86AudioLowerVolume" = "exec pulseaudio-ctl down"; + "XF86AudioMute" = "exec pulseaudio-ctl mute"; + + # Lock + Pause = "exec lock"; + + # Brightness + "XF86MonBrightnessDown" = "exec ${pkgs.brightnessctl}/bin/brightnessctl -q s 5%-"; + "XF86MonBrightnessUp" = "exec ${pkgs.brightnessctl}/bin/brightnessctl -q s 5%+"; + + # Sleep/hibernate + # "${mod}+Escape" = "exec systemctl suspend"; + # "${mod}+Shift+Escape" = "exec systemctl hibernate"; + + # Scratch buffer + "${mod}+minus" = "scratchpad show"; + "${mod}+Shift+minus" = "move scratchpad"; + "${mod}+space" = "focus mode_toggle"; + "${mod}+Shift+space" = "floating toggle"; + + # Screen Layout + "${mod}+Shift+t" = "exec xrandr --auto"; + "${mod}+t" = "exec ${screenlayout.home}"; + "${mod}+Ctrl+t" = "exec ${pkgs.writeShellScript "fix_term.sh" '' xrandr --output eDP-1 --off && ${screenlayout.home} ''}"; - # Notifications - "${mod}+Shift+n" = "exec killall -SIGUSR1 .dunst-wrapped"; - "${mod}+n" = "exec killall -SIGUSR2 .dunst-wrapped"; - "Control+space" = "exec ${pkgs.dunst}/bin/dunstctl close"; - "Control+Shift+space" = "exec ${pkgs.dunst}/bin/dunstctl close-all"; - "Control+grave" = "exec ${pkgs.dunst}/bin/dunstctl history-pop"; - "Control+Shift+period" = "exec ${pkgs.dunst}/bin/dunstctl action"; - })]); + # Notifications + "${mod}+Shift+n" = "exec killall -SIGUSR1 .dunst-wrapped"; + "${mod}+n" = "exec killall -SIGUSR2 .dunst-wrapped"; + "Control+space" = "exec ${pkgs.dunst}/bin/dunstctl close"; + "Control+Shift+space" = "exec ${pkgs.dunst}/bin/dunstctl close-all"; + "Control+grave" = "exec ${pkgs.dunst}/bin/dunstctl history-pop"; + "Control+Shift+period" = "exec ${pkgs.dunst}/bin/dunstctl action"; + }) + ] + ); fonts = [ decorationFont ]; @@ -202,94 +206,96 @@ in { bars = [{ statusCommand = - let i3status-conf = pkgs.writeText "i3status.conf" '' - general { - output_format = i3bar - colors = true - color_good = "#859900" - - interval = 1 - } - - order += "external_script current_task" - order += "external_script inbox" - order += "spotify" - order += "volume_status" - order += "wireless ${config.system.machine.wirelessInterface}" - # order += "ethernet enp3s0f0" - order += "cpu_usage" - order += "battery 0" - # order += "volume master" - order += "time" - order += "tztime utc" - - mpd { - format = "%artist - %album - %title" - } - - wireless ${config.system.machine.wirelessInterface} { - format_up = "W: (%quality - %essid - %bitrate) %ip" - format_down = "W: -" - } - - ethernet enp3s0f0 { - format_up = "E: %ip" - format_down = "E: -" - } - - battery 0 { - format = "%status %percentage" - path = "/sys/class/power_supply/BAT%d/uevent" - low_threshold = 10 - } - - cpu_usage { - format = "CPU: %usage" - } - - load { - format = "%5min" - } - - time { - format = " %a %h %d ⌚ %I:%M " - } - - spotify { - color_playing = "#fdf6e3" - color_paused = "#93a1a1" - format_stopped = "" - format_down = "" - format = "{title} - {artist} ({album})" - } - - external_script inbox { - script_path = '${emacsclient "(grfn/num-inbox-items-message)"}' - format = 'Inbox: {output}' - cache_timeout = 120 - color = "#93a1a1" - } - - external_script current_task { - script_path = '${emacsclient "(grfn/org-current-clocked-in-task-message)"}' - # format = '{output}' - cache_timeout = 60 - color = "#93a1a1" - } - - tztime utc { - timezone = "UTC" - format = " %H·%M " - } - - volume_status { - format = "☊ {percentage}" - format_muted = "☊ X" - # device = "default" - # mixer_idx = 0 - } - ''; - in "py3status -c ${i3status-conf}"; + let + i3status-conf = pkgs.writeText "i3status.conf" '' + general { + output_format = i3bar + colors = true + color_good = "#859900" + + interval = 1 + } + + order += "external_script current_task" + order += "external_script inbox" + order += "spotify" + order += "volume_status" + order += "wireless ${config.system.machine.wirelessInterface}" + # order += "ethernet enp3s0f0" + order += "cpu_usage" + order += "battery 0" + # order += "volume master" + order += "time" + order += "tztime utc" + + mpd { + format = "%artist - %album - %title" + } + + wireless ${config.system.machine.wirelessInterface} { + format_up = "W: (%quality - %essid - %bitrate) %ip" + format_down = "W: -" + } + + ethernet enp3s0f0 { + format_up = "E: %ip" + format_down = "E: -" + } + + battery 0 { + format = "%status %percentage" + path = "/sys/class/power_supply/BAT%d/uevent" + low_threshold = 10 + } + + cpu_usage { + format = "CPU: %usage" + } + + load { + format = "%5min" + } + + time { + format = " %a %h %d ⌚ %I:%M " + } + + spotify { + color_playing = "#fdf6e3" + color_paused = "#93a1a1" + format_stopped = "" + format_down = "" + format = "{title} - {artist} ({album})" + } + + external_script inbox { + script_path = '${emacsclient "(grfn/num-inbox-items-message)"}' + format = 'Inbox: {output}' + cache_timeout = 120 + color = "#93a1a1" + } + + external_script current_task { + script_path = '${emacsclient "(grfn/org-current-clocked-in-task-message)"}' + # format = '{output}' + cache_timeout = 60 + color = "#93a1a1" + } + + tztime utc { + timezone = "UTC" + format = " %H·%M " + } + + volume_status { + format = "☊ {percentage}" + format_muted = "☊ X" + # device = "default" + # mixer_idx = 0 + } + ''; + in + "py3status -c ${i3status-conf}"; fonts = [ decorationFont ]; position = "top"; colors = with solarized; rec { @@ -362,5 +368,5 @@ in { iconTheme.name = "Adwaita"; theme.name = "Adwaita"; }; - }; + }; } diff --git a/users/grfn/system/home/modules/lib/cloneRepo.nix b/users/grfn/system/home/modules/lib/cloneRepo.nix index dc487dc6bd05..54992bd69bae 100644 --- a/users/grfn/system/home/modules/lib/cloneRepo.nix +++ b/users/grfn/system/home/modules/lib/cloneRepo.nix @@ -4,44 +4,46 @@ with lib; options = { grfn.impure.clonedRepos = mkOption { description = "Repositories to clone"; - default = {}; + default = { }; type = with types; loaOf ( - let sm = submodule { - options = { - url = mkOption { - type = nullOr str; - description = "URL of repository to clone"; - default = null; - }; + let + sm = submodule { + options = { + url = mkOption { + type = nullOr str; + description = "URL of repository to clone"; + default = null; + }; - github = mkOption { - type = nullOr str; - description = "Github owner/repo of repository to clone"; - default = null; - }; + github = mkOption { + type = nullOr str; + description = "Github owner/repo of repository to clone"; + default = null; + }; - path = mkOption { - type = str; - description = "Path to clone to"; - }; + path = mkOption { + type = str; + description = "Path to clone to"; + }; - onClone = mkOption { - type = str; - description = '' - Shell command to run after cloning the repo for the first time. - Runs inside the repo itself. - ''; - default = ""; - }; + onClone = mkOption { + type = str; + description = '' + Shell command to run after cloning the repo for the first time. + Runs inside the repo itself. + ''; + default = ""; + }; - after = mkOption { - type = listOf str; - description = "Activation hooks that this repository must be cloned after"; - default = []; + after = mkOption { + type = listOf str; + description = "Activation hooks that this repository must be cloned after"; + default = [ ]; + }; }; }; - }; - in addCheck sm (cr: (! isNull cr.url || ! isNull cr.github)) + in + addCheck sm (cr: (! isNull cr.url || ! isNull cr.github)) ); }; }; @@ -49,19 +51,23 @@ with lib; config = { home.activation = mapAttrs - (_: { - url, path, github, onClone, after, ... - }: - let repoURL = if isNull url then "git@github.com:${github}" else url; - in hm.dag.entryAfter (["writeBoundary"] ++ after) '' - $DRY_RUN_CMD mkdir -p $(dirname "${path}") - if [[ ! -d ${path} ]]; then - $DRY_RUN_CMD git clone "${repoURL}" "${path}" - pushd ${path} - $DRY_RUN_CMD ${onClone} - popd - fi - '') - config.grfn.impure.clonedRepos; + (_: { url + , path + , github + , onClone + , after + , ... + }: + let repoURL = if isNull url then "git@github.com:${github}" else url; + in hm.dag.entryAfter ([ "writeBoundary" ] ++ after) '' + $DRY_RUN_CMD mkdir -p $(dirname "${path}") + if [[ ! -d ${path} ]]; then + $DRY_RUN_CMD git clone "${repoURL}" "${path}" + pushd ${path} + $DRY_RUN_CMD ${onClone} + popd + fi + '') + config.grfn.impure.clonedRepos; }; } diff --git a/users/grfn/system/home/modules/lib/zshFunctions.nix b/users/grfn/system/home/modules/lib/zshFunctions.nix index 7c39b3478cfd..228dc6379fd6 100644 --- a/users/grfn/system/home/modules/lib/zshFunctions.nix +++ b/users/grfn/system/home/modules/lib/zshFunctions.nix @@ -6,16 +6,18 @@ with lib; options = { programs.zsh.functions = mkOption { description = "An attribute set that maps function names to their source"; - default = {}; + default = { }; type = with types; attrsOf (either str path); }; }; config.programs.zsh.initExtra = concatStringsSep "\n" ( - mapAttrsToList (name: funSrc: '' - function ${name}() { - ${funSrc} - } - '') config.programs.zsh.functions + mapAttrsToList + (name: funSrc: '' + function ${name}() { + ${funSrc} + } + '') + config.programs.zsh.functions ); } diff --git a/users/grfn/system/home/modules/obs.nix b/users/grfn/system/home/modules/obs.nix index d1dade477ccc..39d57d712a46 100644 --- a/users/grfn/system/home/modules/obs.nix +++ b/users/grfn/system/home/modules/obs.nix @@ -19,7 +19,9 @@ let nativeBuildInputs = [ pkg-config ]; buildInputs = [ - libtool autoconf automake + libtool + autoconf + automake x11 xorg.libXtst xorg.libXinerama diff --git a/users/grfn/system/home/modules/rtlsdr.nix b/users/grfn/system/home/modules/rtlsdr.nix index a1c717617a62..c8a404a1f49e 100644 --- a/users/grfn/system/home/modules/rtlsdr.nix +++ b/users/grfn/system/home/modules/rtlsdr.nix @@ -2,12 +2,14 @@ let - nixpkgs-gnuradio = import (pkgs.fetchFromGitHub { - owner = "doronbehar"; - repo = "nixpkgs"; - rev = "712561aa5f10bfe6112a1726a912585612a70d1f"; - sha256 = "04yqflbwjcfl9vlplphpj82csqqz9k6m3nj1ybhwgmsc4by7vivl"; - }) {}; + nixpkgs-gnuradio = import + (pkgs.fetchFromGitHub { + owner = "doronbehar"; + repo = "nixpkgs"; + rev = "712561aa5f10bfe6112a1726a912585612a70d1f"; + sha256 = "04yqflbwjcfl9vlplphpj82csqqz9k6m3nj1ybhwgmsc4by7vivl"; + }) + { }; in diff --git a/users/grfn/system/home/modules/shell.nix b/users/grfn/system/home/modules/shell.nix index 088fe9238c69..ed82292b0aab 100644 --- a/users/grfn/system/home/modules/shell.nix +++ b/users/grfn/system/home/modules/shell.nix @@ -30,7 +30,7 @@ let # Directories stck = "dirs -v"; - b= "cd ~1"; + b = "cd ~1"; ".." = "cd .."; "..." = "cd ../.."; "...." = "cd ../../.."; @@ -63,7 +63,8 @@ let "ll" = "ls -al"; "la" = "ls -a"; }; -in { +in +{ home.packages = with pkgs; [ zsh autojump diff --git a/users/grfn/system/home/modules/tarsnap.nix b/users/grfn/system/home/modules/tarsnap.nix index 4bff19910f05..87002610cbcf 100644 --- a/users/grfn/system/home/modules/tarsnap.nix +++ b/users/grfn/system/home/modules/tarsnap.nix @@ -6,59 +6,59 @@ ]; home.file.".tarsnaprc".text = '' - ### Recommended options + ### Recommended options - # Tarsnap cache directory - cachedir /home/grfn/.cache/tarsnap + # Tarsnap cache directory + cachedir /home/grfn/.cache/tarsnap - # Tarsnap key file - keyfile /home/grfn/.private/tarsnap.key + # Tarsnap key file + keyfile /home/grfn/.private/tarsnap.key - # Don't archive files which have the nodump flag set. - nodump + # Don't archive files which have the nodump flag set. + nodump - # Print statistics when creating or deleting archives. - print-stats + # Print statistics when creating or deleting archives. + print-stats - # Create a checkpoint once per GB of uploaded data. - checkpoint-bytes 1G + # Create a checkpoint once per GB of uploaded data. + checkpoint-bytes 1G - ### Commonly useful options + ### Commonly useful options - # Use SI prefixes to make numbers printed by --print-stats more readable. - humanize-numbers + # Use SI prefixes to make numbers printed by --print-stats more readable. + humanize-numbers - ### Other options, not applicable to most systems + ### Other options, not applicable to most systems - # Aggressive network behaviour: Use multiple TCP connections when - # writing archives. Use of this option is recommended only in - # cases where TCP congestion control is known to be the limiting - # factor in upload performance. - #aggressive-networking + # Aggressive network behaviour: Use multiple TCP connections when + # writing archives. Use of this option is recommended only in + # cases where TCP congestion control is known to be the limiting + # factor in upload performance. + #aggressive-networking - # Exclude files and directories matching specified patterns. - # Only one file or directory per command; multiple "exclude" - # commands may be given. - #exclude + # Exclude files and directories matching specified patterns. + # Only one file or directory per command; multiple "exclude" + # commands may be given. + #exclude - # Include only files and directories matching specified patterns. - # Only one file or directory per command; multiple "include" - # commands may be given. - #include + # Include only files and directories matching specified patterns. + # Only one file or directory per command; multiple "include" + # commands may be given. + #include - # Attempt to reduce tarsnap memory consumption. This option - # will slow down the process of creating archives, but may help - # on systems where the average size of files being backed up is - # less than 1 MB. - #lowmem + # Attempt to reduce tarsnap memory consumption. This option + # will slow down the process of creating archives, but may help + # on systems where the average size of files being backed up is + # less than 1 MB. + #lowmem - # Try even harder to reduce tarsnap memory consumption. This can - # significantly slow down tarsnap, but reduces its memory usage - # by an additional factor of 2 beyond what the lowmem option does. - #verylowmem + # Try even harder to reduce tarsnap memory consumption. This can + # significantly slow down tarsnap, but reduces its memory usage + # by an additional factor of 2 beyond what the lowmem option does. + #verylowmem - # Snapshot time. Use this option if you are backing up files - # from a filesystem snapshot rather than from a "live" filesystem. - #snaptime <file> + # Snapshot time. Use this option if you are backing up files + # from a filesystem snapshot rather than from a "live" filesystem. + #snaptime <file> ''; } diff --git a/users/grfn/system/home/platforms/darwin.nix b/users/grfn/system/home/platforms/darwin.nix index cf0375e94162..f98b80f26915 100644 --- a/users/grfn/system/home/platforms/darwin.nix +++ b/users/grfn/system/home/platforms/darwin.nix @@ -10,7 +10,7 @@ with lib; pinentry_mac ]; - home.activation.linkApplications = lib.hm.dag.entryAfter ["writeBoundary"] '' + home.activation.linkApplications = lib.hm.dag.entryAfter [ "writeBoundary" ] '' $DRY_RUN_CMD ln -sf $VERBOSE_ARG \ ~/.nix-profile/Applications/* ~/Applications/ ''; diff --git a/users/grfn/system/system/iso.nix b/users/grfn/system/system/iso.nix index 4adccebfb8a2..92a13f655214 100644 --- a/users/grfn/system/system/iso.nix +++ b/users/grfn/system/system/iso.nix @@ -12,6 +12,7 @@ let networking.firewall.enable = false; networking.wireless.enable = lib.mkForce false; }; -in (depot.third_party.nixos { +in +(depot.third_party.nixos { inherit configuration; }).config.system.build.isoImage diff --git a/users/grfn/system/system/machines/mugwump.nix b/users/grfn/system/system/machines/mugwump.nix index 7de6555878d9..a8bf91caacc0 100644 --- a/users/grfn/system/system/machines/mugwump.nix +++ b/users/grfn/system/system/machines/mugwump.nix @@ -23,7 +23,12 @@ with lib; initrd = { availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; kernelModules = [ - "uas" "usbcore" "usb_storage" "vfat" "nls_cp437" "nls_iso8859_1" + "uas" + "usbcore" + "usb_storage" + "vfat" + "nls_cp437" + "nls_iso8859_1" ]; postDeviceCommands = pkgs.lib.mkBefore '' @@ -60,31 +65,33 @@ with lib; networking.firewall.allowedTCPPorts = [ 22 80 443 ]; security.sudo.extraRules = [{ - groups = ["wheel"]; - commands = [{ command = "ALL"; options = ["NOPASSWD"]; }]; + groups = [ "wheel" ]; + commands = [{ command = "ALL"; options = [ "NOPASSWD" ]; }]; }]; nix.gc.dates = "monthly"; - age.secrets = let - secret = name: depot.users.grfn.secrets."${name}.age"; - in { - bbbg.file = secret "bbbg"; - cloudflare.file = secret "cloudflare"; - ddclient-password.file = secret "ddclient-password"; - - buildkite-ssh-key = { - file = secret "buildkite-ssh-key"; - group = "keys"; - mode = "0440"; - }; + age.secrets = + let + secret = name: depot.users.grfn.secrets."${name}.age"; + in + { + bbbg.file = secret "bbbg"; + cloudflare.file = secret "cloudflare"; + ddclient-password.file = secret "ddclient-password"; + + buildkite-ssh-key = { + file = secret "buildkite-ssh-key"; + group = "keys"; + mode = "0440"; + }; - buildkite-token = { - file = secret "buildkite-token"; - group = "keys"; - mode = "0440"; + buildkite-token = { + file = secret "buildkite-token"; + group = "keys"; + mode = "0440"; + }; }; - }; services.depot.auto-deploy = { enable = true; @@ -207,44 +214,49 @@ with lib; job_name = "node"; scrape_interval = "5s"; static_configs = [{ - targets = ["localhost:${toString config.services.prometheus.exporters.node.port}"]; - }]; - } { - job_name = "nginx"; - scrape_interval = "5s"; - static_configs = [{ - targets = ["localhost:${toString config.services.prometheus.exporters.nginx.port}"]; + targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }]; - } { - job_name = "xanthous_server"; - scrape_interval = "1s"; - static_configs = [{ - targets = ["localhost:${toString config.services.xanthous-server.metricsPort}"]; + } + { + job_name = "nginx"; + scrape_interval = "5s"; + static_configs = [{ + targets = [ "localhost:${toString config.services.prometheus.exporters.nginx.port}" ]; + }]; + } + { + job_name = "xanthous_server"; + scrape_interval = "1s"; + static_configs = [{ + targets = [ "localhost:${toString config.services.xanthous-server.metricsPort}" ]; + }]; + } + { + job_name = "blackbox"; + metrics_path = "/probe"; + params.module = [ "https_2xx" ]; + scrape_interval = "5s"; + static_configs = [{ + targets = [ + "https://gws.fyi" + "https://windtunnel.ci" + "https://app.windtunnel.ci" + "https://metrics.gws.fyi" + ]; + }]; + relabel_configs = [{ + source_labels = [ "__address__" ]; + target_label = "__param_target"; + } + { + source_labels = [ "__param_target" ]; + target_label = "instance"; + } + { + target_label = "__address__"; + replacement = "localhost:${toString config.services.prometheus.exporters.blackbox.port}"; + }]; }]; - } { - job_name = "blackbox"; - metrics_path = "/probe"; - params.module = ["https_2xx"]; - scrape_interval = "5s"; - static_configs = [{ - targets = [ - "https://gws.fyi" - "https://windtunnel.ci" - "https://app.windtunnel.ci" - "https://metrics.gws.fyi" - ]; - }]; - relabel_configs = [{ - source_labels = ["__address__"]; - target_label = "__param_target"; - } { - source_labels = ["__param_target"]; - target_label = "instance"; - } { - target_label = "__address__"; - replacement = "localhost:${toString config.services.prometheus.exporters.blackbox.port}"; - }]; - }]; }; services.xanthous-server.enable = true; @@ -256,21 +268,23 @@ with lib; virtualisation.docker.enable = true; - services.buildkite-agents = listToAttrs (map (n: rec { - name = "mugwump-${toString n}"; - value = { - inherit name; - enable = true; - tokenPath = "/run/agenix/buildkite-agent-token"; - privateSshKeyPath = "/run/agenix/buildkite-ssh-key"; - runtimePackages = with pkgs; [ - docker - nix - gnutar - gzip - ]; - }; - }) (range 1 1)); + services.buildkite-agents = listToAttrs (map + (n: rec { + name = "mugwump-${toString n}"; + value = { + inherit name; + enable = true; + tokenPath = "/run/agenix/buildkite-agent-token"; + privateSshKeyPath = "/run/agenix/buildkite-ssh-key"; + runtimePackages = with pkgs; [ + docker + nix + gnutar + gzip + ]; + }; + }) + (range 1 1)); users.users."buildkite-agent-mugwump-1" = { isSystemUser = true; diff --git a/users/grfn/system/system/modules/common.nix b/users/grfn/system/system/modules/common.nix index 91723973f5cd..635747d118ff 100644 --- a/users/grfn/system/system/modules/common.nix +++ b/users/grfn/system/system/modules/common.nix @@ -2,7 +2,7 @@ let - depot = import ../../../../.. {}; + depot = import ../../../../.. { }; in diff --git a/users/grfn/system/system/modules/fonts.nix b/users/grfn/system/system/modules/fonts.nix index babe30d4271f..f30600b28b39 100644 --- a/users/grfn/system/system/modules/fonts.nix +++ b/users/grfn/system/system/modules/fonts.nix @@ -7,6 +7,6 @@ twitter-color-emoji ]; - fontconfig.defaultFonts.emoji = ["Twitter Color Emoji"]; + fontconfig.defaultFonts.emoji = [ "Twitter Color Emoji" ]; }; } diff --git a/users/grfn/system/system/modules/reusable/battery.nix b/users/grfn/system/system/modules/reusable/battery.nix index ca92e0c3f61c..151c2a246f32 100644 --- a/users/grfn/system/system/modules/reusable/battery.nix +++ b/users/grfn/system/system/modules/reusable/battery.nix @@ -22,11 +22,11 @@ with lib; config = let cfg = config.laptop.onLowBattery; in mkIf cfg.enable { - services.udev.extraRules = concatStrings [ - ''SUBSYSTEM=="power_supply", '' - ''ATTR{status}=="Discharging", '' - ''ATTR{capacity}=="[0-${toString cfg.thresholdPercentage}]", '' - ''RUN+="${pkgs.systemd}/bin/systemctl ${cfg.action}"'' - ]; - }; + services.udev.extraRules = concatStrings [ + ''SUBSYSTEM=="power_supply", '' + ''ATTR{status}=="Discharging", '' + ''ATTR{capacity}=="[0-${toString cfg.thresholdPercentage}]", '' + ''RUN+="${pkgs.systemd}/bin/systemctl ${cfg.action}"'' + ]; + }; } diff --git a/users/grfn/system/system/modules/tvl.nix b/users/grfn/system/system/modules/tvl.nix index 905ec8ced537..959f8449f659 100644 --- a/users/grfn/system/system/modules/tvl.nix +++ b/users/grfn/system/system/modules/tvl.nix @@ -8,7 +8,7 @@ sshKey = "/root/.ssh/id_rsa"; system = "x86_64-linux"; maxJobs = 64; - supportedFeatures = ["big-parallel" "kvm" "nixos-test" "benchmark"]; + supportedFeatures = [ "big-parallel" "kvm" "nixos-test" "benchmark" ]; }]; extraOptions = '' @@ -29,7 +29,7 @@ }; programs.ssh.knownHosts.whitby = { - hostNames = [ "whitby" "whitby.tvl.fyi" "49.12.129.211"]; + hostNames = [ "whitby" "whitby.tvl.fyi" "49.12.129.211" ]; publicKeyFile = pkgs.writeText "whitby.pub" '' ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNh/w4BSKov0jdz3gKBc98tpoLta5bb87fQXWBhAl2I ''; diff --git a/users/grfn/system/system/modules/work/kolide.nix b/users/grfn/system/system/modules/work/kolide.nix index 29ee0a0d7ce4..e4ee786f0cbe 100644 --- a/users/grfn/system/system/modules/work/kolide.nix +++ b/users/grfn/system/system/modules/work/kolide.nix @@ -3,9 +3,10 @@ let deb = ./kolide.deb; - kolide = pkgs.runCommand "kolide-data" { - buildInputs = [ pkgs.binutils-unwrapped ]; - } '' + kolide = pkgs.runCommand "kolide-data" + { + buildInputs = [ pkgs.binutils-unwrapped ]; + } '' cp ${deb} ./kolide.deb ar x kolide.deb mkdir result @@ -19,7 +20,8 @@ let mv result $out ''; -in { +in +{ systemd.services."launcher.kolide-k2" = { wantedBy = [ "multi-user.target" ]; after = [ "network.target" "syslog.service" ]; diff --git a/users/grfn/terraform/globals.nix b/users/grfn/terraform/globals.nix index 5f373c664604..c6bc24c22b65 100644 --- a/users/grfn/terraform/globals.nix +++ b/users/grfn/terraform/globals.nix @@ -1,20 +1,23 @@ { pkgs, ... }: { - provider.aws = map (region: { - inherit region; - alias = region; - profile = "personal"; - }) [ + provider.aws = map + (region: { + inherit region; + alias = region; + profile = "personal"; + }) [ "us-east-1" "us-east-2" "us-west-2" ]; data.external.cloudflare_api_key = { - program = [(pkgs.writeShellScript "cloudflare_api_key" '' - jq -n --arg api_key "$(pass cloudflare-api-key)" '{"api_key":$api_key}' - '')]; + program = [ + (pkgs.writeShellScript "cloudflare_api_key" '' + jq -n --arg api_key "$(pass cloudflare-api-key)" '{"api_key":$api_key}' + '') + ]; }; provider.cloudflare = { diff --git a/users/grfn/terraform/nixosMachine.nix b/users/grfn/terraform/nixosMachine.nix index ef8830d66c21..dfecbff60a3e 100644 --- a/users/grfn/terraform/nixosMachine.nix +++ b/users/grfn/terraform/nixosMachine.nix @@ -9,7 +9,7 @@ , region ? "us-east-2" , rootVolumeSizeGb ? 50 , securityGroupId ? null -, extraIngressPorts ? [] +, extraIngressPorts ? [ ] }: let @@ -40,13 +40,14 @@ let machineResource = "aws_instance.${prefix}machine"; - recursiveMerge = builtins.foldl' lib.recursiveUpdate {}; + recursiveMerge = builtins.foldl' lib.recursiveUpdate { }; securityGroupId' = if isNull securityGroupId then "\${aws_security_group.${prefix}group.id}" else securityGroupId; -in recursiveMerge [ +in +recursiveMerge [ (lib.optionalAttrs (isNull securityGroupId) { resource.aws_security_group."${prefix}group" = { provider = "aws.${region}"; @@ -60,12 +61,12 @@ in recursiveMerge [ resource.aws_security_group_rule.all_egress = { provider = "aws.${region}"; security_group_id = securityGroupId'; - type = "egress"; - protocol = "-1"; - from_port = 0; - to_port = 0; - cidr_blocks = ["0.0.0.0/0"]; - ipv6_cidr_blocks = ["::/0"]; + type = "egress"; + protocol = "-1"; + from_port = 0; + to_port = 0; + cidr_blocks = [ "0.0.0.0/0" ]; + ipv6_cidr_blocks = [ "::/0" ]; description = null; prefix_list_ids = null; @@ -74,12 +75,14 @@ in recursiveMerge [ }) rec { data.external.my_ip = { - program = [(pkgs.writeShellScript "my_ip" '' - ${pkgs.jq}/bin/jq \ - -n \ - --arg ip "$(curl ifconfig.me)" \ - '{"ip":$ip}' - '')]; + program = [ + (pkgs.writeShellScript "my_ip" '' + ${pkgs.jq}/bin/jq \ + -n \ + --arg ip "$(curl ifconfig.me)" \ + '{"ip":$ip}' + '') + ]; }; resource.aws_security_group_rule.provision_ssh_access = { @@ -89,8 +92,8 @@ in recursiveMerge [ protocol = "TCP"; from_port = 22; to_port = 22; - cidr_blocks = ["\${data.external.my_ip.result.ip}/32"]; - ipv6_cidr_blocks = []; + cidr_blocks = [ "\${data.external.my_ip.result.ip}/32" ]; + ipv6_cidr_blocks = [ ]; description = null; prefix_list_ids = null; self = null; @@ -183,21 +186,23 @@ in recursiveMerge [ } { - resource.aws_security_group_rule = builtins.listToAttrs (map (port: { - name = "ingress_${toString port}"; - value = { - provider = "aws.${region}"; - security_group_id = securityGroupId'; - type = "ingress"; - protocol = "TCP"; - from_port = port; - to_port = port; - cidr_blocks = ["0.0.0.0/0"]; - ipv6_cidr_blocks = []; - description = null; - prefix_list_ids = null; - self = null; - }; - }) extraIngressPorts); + resource.aws_security_group_rule = builtins.listToAttrs (map + (port: { + name = "ingress_${toString port}"; + value = { + provider = "aws.${region}"; + security_group_id = securityGroupId'; + type = "ingress"; + protocol = "TCP"; + from_port = port; + to_port = port; + cidr_blocks = [ "0.0.0.0/0" ]; + ipv6_cidr_blocks = [ ]; + description = null; + prefix_list_ids = null; + self = null; + }; + }) + extraIngressPorts); } ] diff --git a/users/grfn/terraform/workspace.nix b/users/grfn/terraform/workspace.nix index c2a0fdb97793..92bf6e4ec1c5 100644 --- a/users/grfn/terraform/workspace.nix +++ b/users/grfn/terraform/workspace.nix @@ -21,13 +21,15 @@ let ])); plugins_tf = { - terraform.required_providers = (builtins.listToAttrs (map (p: { - name = lib.last (lib.splitString "/" p.provider-source-address); - value = { - source = p.provider-source-address; - version = p.version; - }; - }) (allPlugins pkgs.terraform.plugins))); + terraform.required_providers = (builtins.listToAttrs (map + (p: { + name = lib.last (lib.splitString "/" p.provider-source-address); + value = { + source = p.provider-source-address; + version = p.version; + }; + }) + (allPlugins pkgs.terraform.plugins))); }; @@ -36,7 +38,7 @@ let plugins = plugins_tf; }; - module = runCommandNoCC "module" {} '' + module = runCommandNoCC "module" { } '' mkdir $out ${lib.concatStrings (lib.mapAttrsToList (k: config_tf: (let @@ -70,7 +72,7 @@ let ''; # TODO: import (-config) - tfcmds = runCommandNoCC "${name}-tfcmds" {} '' + tfcmds = runCommandNoCC "${name}-tfcmds" { } '' mkdir -p $out/bin ln -s ${init} $out/bin/init ln -s ${tfcmd} $out/bin/validate @@ -79,7 +81,8 @@ let ln -s ${tfcmd} $out/bin/destroy ''; -in { +in +{ inherit name module; terraform = tf; cmds = tfcmds; @@ -92,7 +95,7 @@ in { # destroy = depot.nix.nixRunWrapper "destroy" tfcmds; # }; - test = runCommandNoCC "${name}-test" {} '' + test = runCommandNoCC "${name}-test" { } '' set -e export TF_STATE_ROOT=$(pwd) ${tfcmds}/bin/init diff --git a/users/grfn/xanthous/default.nix b/users/grfn/xanthous/default.nix index c0eca446c9ed..e8a1eb14eb1a 100644 --- a/users/grfn/xanthous/default.nix +++ b/users/grfn/xanthous/default.nix @@ -1,6 +1,7 @@ -{ depot ? (import ../../../. {}) +{ depot ? (import ../../../. { }) , pkgs ? depot.third_party.nixpkgs -, ... }: +, ... +}: let ignore = depot.third_party.gitignoreSource.gitignoreFilter ./.; @@ -11,7 +12,7 @@ let !(type == "directory" && builtins.baseNameOf path == "server") && !(type == "directory" && builtins.baseNameOf path == "docs") && (ignore path type - || builtins.baseNameOf path == "package.yaml"); + || builtins.baseNameOf path == "package.yaml"); }; # generated by cabal2nix basePkg = pkgs.haskellPackages.callPackage ./pkg.nix { }; @@ -22,5 +23,5 @@ pkgs.haskell.lib.overrideCabal basePkg (default: { version = "canon"; configureFlags = [ "--ghc-option=-Wall --ghc-option=-Werror" - ] ++ (default.configureFlags or []); + ] ++ (default.configureFlags or [ ]); }) diff --git a/users/grfn/xanthous/pkg.nix b/users/grfn/xanthous/pkg.nix index 0f0dbfc9822d..f8364c467abe 100644 --- a/users/grfn/xanthous/pkg.nix +++ b/users/grfn/xanthous/pkg.nix @@ -1,17 +1,74 @@ -{ mkDerivation, aeson, array, async, base, bifunctors, brick -, checkers, classy-prelude, comonad, comonad-extras, constraints -, containers, criterion, data-default, data-interval, deepseq -, directory, fgl, fgl-arbitrary, file-embed, filepath -, generic-arbitrary, generic-lens, groups, hgeometry -, hgeometry-combinatorial, hpack, JuicyPixels, lens -, lens-properties, lib, lifted-async, linear, megaparsec, mmorph -, monad-control, MonadRandom, mtl, optparse-applicative, parallel -, parser-combinators, pointed, QuickCheck, quickcheck-instances -, quickcheck-text, random, random-extras, random-fu, random-source -, Rasterific, raw-strings-qq, reflection, semigroupoids, semigroups -, splitmix, stache, streams, tasty, tasty-hunit, tasty-quickcheck -, tasty-rerun, text, text-zipper, tomland, transformers, vector -, vty, witherable, yaml, zlib +{ mkDerivation +, aeson +, array +, async +, base +, bifunctors +, brick +, checkers +, classy-prelude +, comonad +, comonad-extras +, constraints +, containers +, criterion +, data-default +, data-interval +, deepseq +, directory +, fgl +, fgl-arbitrary +, file-embed +, filepath +, generic-arbitrary +, generic-lens +, groups +, hgeometry +, hgeometry-combinatorial +, hpack +, JuicyPixels +, lens +, lens-properties +, lib +, lifted-async +, linear +, megaparsec +, mmorph +, monad-control +, MonadRandom +, mtl +, optparse-applicative +, parallel +, parser-combinators +, pointed +, QuickCheck +, quickcheck-instances +, quickcheck-text +, random +, random-extras +, random-fu +, random-source +, Rasterific +, raw-strings-qq +, reflection +, semigroupoids +, semigroups +, splitmix +, stache +, streams +, tasty +, tasty-hunit +, tasty-quickcheck +, tasty-rerun +, text +, text-zipper +, tomland +, transformers +, vector +, vty +, witherable +, yaml +, zlib }: mkDerivation { pname = "xanthous"; @@ -20,58 +77,270 @@ mkDerivation { isLibrary = true; isExecutable = true; libraryHaskellDepends = [ - aeson array async base bifunctors brick checkers classy-prelude - comonad comonad-extras constraints containers criterion - data-default data-interval deepseq directory fgl fgl-arbitrary - file-embed filepath generic-arbitrary generic-lens groups hgeometry - hgeometry-combinatorial JuicyPixels lens lifted-async linear - megaparsec mmorph monad-control MonadRandom mtl - optparse-applicative parallel parser-combinators pointed QuickCheck - quickcheck-instances quickcheck-text random random-extras random-fu - random-source Rasterific raw-strings-qq reflection semigroupoids - semigroups splitmix stache streams text text-zipper tomland - transformers vector vty witherable yaml zlib + aeson + array + async + base + bifunctors + brick + checkers + classy-prelude + comonad + comonad-extras + constraints + containers + criterion + data-default + data-interval + deepseq + directory + fgl + fgl-arbitrary + file-embed + filepath + generic-arbitrary + generic-lens + groups + hgeometry + hgeometry-combinatorial + JuicyPixels + lens + lifted-async + linear + megaparsec + mmorph + monad-control + MonadRandom + mtl + optparse-applicative + parallel + parser-combinators + pointed + QuickCheck + quickcheck-instances + quickcheck-text + random + random-extras + random-fu + random-source + Rasterific + raw-strings-qq + reflection + semigroupoids + semigroups + splitmix + stache + streams + text + text-zipper + tomland + transformers + vector + vty + witherable + yaml + zlib ]; libraryToolDepends = [ hpack ]; executableHaskellDepends = [ - aeson array async base bifunctors brick checkers classy-prelude - comonad comonad-extras constraints containers criterion - data-default data-interval deepseq directory fgl fgl-arbitrary - file-embed filepath generic-arbitrary generic-lens groups hgeometry - hgeometry-combinatorial JuicyPixels lens lifted-async linear - megaparsec mmorph monad-control MonadRandom mtl - optparse-applicative parallel parser-combinators pointed QuickCheck - quickcheck-instances quickcheck-text random random-extras random-fu - random-source Rasterific raw-strings-qq reflection semigroupoids - semigroups splitmix stache streams text text-zipper tomland - transformers vector vty witherable yaml zlib + aeson + array + async + base + bifunctors + brick + checkers + classy-prelude + comonad + comonad-extras + constraints + containers + criterion + data-default + data-interval + deepseq + directory + fgl + fgl-arbitrary + file-embed + filepath + generic-arbitrary + generic-lens + groups + hgeometry + hgeometry-combinatorial + JuicyPixels + lens + lifted-async + linear + megaparsec + mmorph + monad-control + MonadRandom + mtl + optparse-applicative + parallel + parser-combinators + pointed + QuickCheck + quickcheck-instances + quickcheck-text + random + random-extras + random-fu + random-source + Rasterific + raw-strings-qq + reflection + semigroupoids + semigroups + splitmix + stache + streams + text + text-zipper + tomland + transformers + vector + vty + witherable + yaml + zlib ]; testHaskellDepends = [ - aeson array async base bifunctors brick checkers classy-prelude - comonad comonad-extras constraints containers criterion - data-default data-interval deepseq directory fgl fgl-arbitrary - file-embed filepath generic-arbitrary generic-lens groups hgeometry - hgeometry-combinatorial JuicyPixels lens lens-properties - lifted-async linear megaparsec mmorph monad-control MonadRandom mtl - optparse-applicative parallel parser-combinators pointed QuickCheck - quickcheck-instances quickcheck-text random random-extras random-fu - random-source Rasterific raw-strings-qq reflection semigroupoids - semigroups splitmix stache streams tasty tasty-hunit - tasty-quickcheck tasty-rerun text text-zipper tomland transformers - vector vty witherable yaml zlib + aeson + array + async + base + bifunctors + brick + checkers + classy-prelude + comonad + comonad-extras + constraints + containers + criterion + data-default + data-interval + deepseq + directory + fgl + fgl-arbitrary + file-embed + filepath + generic-arbitrary + generic-lens + groups + hgeometry + hgeometry-combinatorial + JuicyPixels + lens + lens-properties + lifted-async + linear + megaparsec + mmorph + monad-control + MonadRandom + mtl + optparse-applicative + parallel + parser-combinators + pointed + QuickCheck + quickcheck-instances + quickcheck-text + random + random-extras + random-fu + random-source + Rasterific + raw-strings-qq + reflection + semigroupoids + semigroups + splitmix + stache + streams + tasty + tasty-hunit + tasty-quickcheck + tasty-rerun + text + text-zipper + tomland + transformers + vector + vty + witherable + yaml + zlib ]; benchmarkHaskellDepends = [ - aeson array async base bifunctors brick checkers classy-prelude - comonad comonad-extras constraints containers criterion - data-default data-interval deepseq directory fgl fgl-arbitrary - file-embed filepath generic-arbitrary generic-lens groups hgeometry - hgeometry-combinatorial JuicyPixels lens lifted-async linear - megaparsec mmorph monad-control MonadRandom mtl - optparse-applicative parallel parser-combinators pointed QuickCheck - quickcheck-instances quickcheck-text random random-extras random-fu - random-source Rasterific raw-strings-qq reflection semigroupoids - semigroups splitmix stache streams text text-zipper tomland - transformers vector vty witherable yaml zlib + aeson + array + async + base + bifunctors + brick + checkers + classy-prelude + comonad + comonad-extras + constraints + containers + criterion + data-default + data-interval + deepseq + directory + fgl + fgl-arbitrary + file-embed + filepath + generic-arbitrary + generic-lens + groups + hgeometry + hgeometry-combinatorial + JuicyPixels + lens + lifted-async + linear + megaparsec + mmorph + monad-control + MonadRandom + mtl + optparse-applicative + parallel + parser-combinators + pointed + QuickCheck + quickcheck-instances + quickcheck-text + random + random-extras + random-fu + random-source + Rasterific + raw-strings-qq + reflection + semigroupoids + semigroups + splitmix + stache + streams + text + text-zipper + tomland + transformers + vector + vty + witherable + yaml + zlib ]; prePatch = "hpack"; homepage = "https://github.com/glittershark/xanthous#readme"; diff --git a/users/grfn/xanthous/server/default.nix b/users/grfn/xanthous/server/default.nix index 0b3900e4d5fe..95c2b15ec95f 100644 --- a/users/grfn/xanthous/server/default.nix +++ b/users/grfn/xanthous/server/default.nix @@ -1,5 +1,4 @@ -args@{ - depot ? import ../../../.. {} +args@{ depot ? import ../../../.. { } , pkgs ? depot.third_party.nixpkgs , ... }: diff --git a/users/grfn/xanthous/server/docker.nix b/users/grfn/xanthous/server/docker.nix index a62943c2b077..09054cb00fcf 100644 --- a/users/grfn/xanthous/server/docker.nix +++ b/users/grfn/xanthous/server/docker.nix @@ -1,4 +1,4 @@ -{ depot ? import ../../../.. {} +{ depot ? import ../../../.. { } , pkgs ? depot.third_party.nixpkgs , ... }: @@ -6,14 +6,16 @@ let inherit (depot.users.grfn) xanthous; xanthous-server = xanthous.server; -in pkgs.dockerTools.buildLayeredImage { +in +pkgs.dockerTools.buildLayeredImage { name = "xanthous-server"; tag = "latest"; contents = [ xanthous xanthous-server ]; config = { Cmd = [ "${xanthous-server}/bin/xanthous-server" - "--xanthous-binary-path" "${xanthous}/bin/xanthous" + "--xanthous-binary-path" + "${xanthous}/bin/xanthous" ]; }; } diff --git a/users/grfn/xanthous/server/module.nix b/users/grfn/xanthous/server/module.nix index 73ac276caf4a..82de6e38e1af 100644 --- a/users/grfn/xanthous/server/module.nix +++ b/users/grfn/xanthous/server/module.nix @@ -2,7 +2,8 @@ let cfg = config.services.xanthous-server; -in { +in +{ options = with lib; { services.xanthous-server = { enable = mkEnableOption "xanthous server"; diff --git a/users/grfn/xanthous/server/shell.nix b/users/grfn/xanthous/server/shell.nix index a6747175f105..e01c0316a6b2 100644 --- a/users/grfn/xanthous/server/shell.nix +++ b/users/grfn/xanthous/server/shell.nix @@ -1,5 +1,5 @@ let - depot = import ../../../.. {}; + depot = import ../../../.. { }; pkgs = depot.third_party.nixpkgs; in diff --git a/users/grfn/xanthous/shell.nix b/users/grfn/xanthous/shell.nix index 572ed211bcf4..53fbd7a7c14a 100644 --- a/users/grfn/xanthous/shell.nix +++ b/users/grfn/xanthous/shell.nix @@ -1,5 +1,5 @@ let - depot = import ../../../. {}; + depot = import ../../../. { }; inherit (depot) third_party; pkgs = third_party.nixpkgs; in @@ -7,7 +7,7 @@ in (pkgs.haskellPackages.extend (pkgs.haskell.lib.packageSourceOverrides { xanthous = third_party.gitignoreSource ./.; })).shellFor { - packages = p: [p.xanthous]; + packages = p: [ p.xanthous ]; withHoogle = true; doBenchmark = true; buildInputs = (with pkgs.haskellPackages; [ diff --git a/users/riking/adventofcode-2020/day01/default.nix b/users/riking/adventofcode-2020/day01/default.nix index 0648a05af683..946069e3a68e 100644 --- a/users/riking/adventofcode-2020/day01/default.nix +++ b/users/riking/adventofcode-2020/day01/default.nix @@ -5,6 +5,6 @@ with depot.third_party; naersk.buildPackage { src = ./.; - buildInputs = []; + buildInputs = [ ]; doCheck = true; } diff --git a/users/riking/keys.nix b/users/riking/keys.nix index 6dd2ff18a30f..50287098244a 100644 --- a/users/riking/keys.nix +++ b/users/riking/keys.nix @@ -7,14 +7,14 @@ rec { sk-portable2 = "sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBEX3DXreQR93SR68QZHTdaVd5RjlRM8C0jcZ4kI4OZwqk7xuk68w3g22q2OM7O+chj+n1N3u0hLxi82QfRnwyasAAAAEc3NoOg== riking@sk-portable2"; sk-desktop = "sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBB+JvN8nAxD+yo49Ohf/UDq7Z049yvkURJIA1XNbvKaAkvfWnCN5m9vTC1FyGxTyCwy4QpD1pFP5fIn0X/kvvfgAAAAEc3NoOg== riking@sk-kane-DAN-A4"; - u2f = [sk-ecljg09 sk-portable1 sk-portable2 sk-desktop]; + u2f = [ sk-ecljg09 sk-portable1 sk-portable2 sk-desktop ]; ed1 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAjWIfFH2bAWMZG+HudV1MVHWUl83M/ZgEu6S3SLatYN riking@kane-DAN-A4"; ed2 = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICBblB4C9IgAijv+qN6Zs8TM2Sz7phQvVmRrcDn4VYNo riking@ECLJG09"; - passworded = [ed1 ed2]; + passworded = [ ed1 ed2 ]; - unprotected = []; + unprotected = [ ]; all = u2f ++ passworded ++ unprotected; } diff --git a/users/sterni/clhs-lookup/default.nix b/users/sterni/clhs-lookup/default.nix index b6a0bd06790f..1cde38e8ce3b 100644 --- a/users/sterni/clhs-lookup/default.nix +++ b/users/sterni/clhs-lookup/default.nix @@ -36,4 +36,4 @@ let ]; }; in - clhs-lookup +clhs-lookup diff --git a/users/sterni/dot-time-man-pages/default.nix b/users/sterni/dot-time-man-pages/default.nix index bf7d63dbd797..c449cde613f9 100644 --- a/users/sterni/dot-time-man-pages/default.nix +++ b/users/sterni/dot-time-man-pages/default.nix @@ -9,9 +9,9 @@ let res = builtins.filter ({ username, ... }: username == user) depot.ops.users; len = builtins.length res; in - if len == 1 - then (builtins.head res).email - else builtins.throw "findEmail: got ${toString len} results instead of 1"; + if len == 1 + then (builtins.head res).email + else builtins.throw "findEmail: got ${toString len} results instead of 1"; # dot-time(7) man page, ported from dotti.me dot-time = rec { @@ -65,6 +65,6 @@ let }; in - depot.nix.buildManPages "dot-time" {} [ - dot-time - ] +depot.nix.buildManPages "dot-time" { } [ + dot-time +] diff --git a/users/sterni/exercises/aoc/2021/default.nix b/users/sterni/exercises/aoc/2021/default.nix index 33d3a92ac7bd..d3ed563ec6f8 100644 --- a/users/sterni/exercises/aoc/2021/default.nix +++ b/users/sterni/exercises/aoc/2021/default.nix @@ -1,4 +1,4 @@ -{ depot ? import ../../../../.. {} +{ depot ? import ../../../../.. { } , pkgs ? depot.third_party.nixpkgs , ... }: diff --git a/users/sterni/htmlman/default.nix b/users/sterni/htmlman/default.nix index b88bc264103b..6bf21ce2dbfd 100644 --- a/users/sterni/htmlman/default.nix +++ b/users/sterni/htmlman/default.nix @@ -19,9 +19,9 @@ let ; bins = getBins cheddar [ "cheddar" ] - // getBins mandoc [ "mandoc" ] - // getBins coreutils [ "cat" "mv" "mkdir" ] - ; + // getBins mandoc [ "mandoc" ] + // getBins coreutils [ "cat" "mv" "mkdir" ] + ; normalizeDrv = fetchurl { url = "https://necolas.github.io/normalize.css/8.0.1/normalize.css"; @@ -29,7 +29,10 @@ let }; execlineStdoutInto = target: line: [ - "redirfd" "-w" "1" target + "redirfd" + "-w" + "1" + target ] ++ line; # I will not write a pure nix markdown renderer @@ -39,16 +42,24 @@ let # I will not write a pure nix markdown renderer markdown = md: let - html = runExecline.local "rendered-markdown" { - stdin = md; - } ([ - "importas" "-iu" "out" "out" - ] ++ execlineStdoutInto "$out" [ - bins.cheddar "--about-filter" "description.md" - ]); - in builtins.readFile html; - - indexTemplate = { title, description, pages ? [] }: '' + html = runExecline.local "rendered-markdown" + { + stdin = md; + } + ([ + "importas" + "-iu" + "out" + "out" + ] ++ execlineStdoutInto "$out" [ + bins.cheddar + "--about-filter" + "description.md" + ]); + in + builtins.readFile html; + + indexTemplate = { title, description, pages ? [ ] }: '' <!doctype html> <html> <head> @@ -137,40 +148,40 @@ let htmlman = { title - # title of the index page + # title of the index page , description ? "" - # description which is displayed after - # the main heading on the index page - , pages ? [] - # man pages of the following structure: - # { - # name : string; - # section : int; - # path : either path string; - # } - # path is optional, if it is not given, - # the man page source must be located at - # "${manDir}/${name}.${toString section}" + # description which is displayed after + # the main heading on the index page + , pages ? [ ] + # man pages of the following structure: + # { + # name : string; + # section : int; + # path : either path string; + # } + # path is optional, if it is not given, + # the man page source must be located at + # "${manDir}/${name}.${toString section}" , manDir ? null - # directory in which man page sources are located + # directory in which man page sources are located , style ? defaultStyle - # CSS to use as a string + # CSS to use as a string , normalizeCss ? true - # whether to include normalize.css before the custom CSS + # whether to include normalize.css before the custom CSS , linkXr ? "all" - # How to handle cross references in the html output: - # - # * none: don't convert cross references into hyperlinks - # * all: link all cross references as if they were - # rendered into $out by htmlman - # * inManDir: link to all man pages which have their source - # in `manDir` and use the format string defined - # in linkXrFallback for all other cross references. + # How to handle cross references in the html output: + # + # * none: don't convert cross references into hyperlinks + # * all: link all cross references as if they were + # rendered into $out by htmlman + # * inManDir: link to all man pages which have their source + # in `manDir` and use the format string defined + # in linkXrFallback for all other cross references. , linkXrFallback ? "https://manpages.debian.org/unstable/%N.%S.en.html" - # fallback link to use if linkXr == "inManDir" and the man - # page is not in ${manDir}. Placeholders %N (name of page) - # and %S (section of page) can be used. See mandoc(1) for - # more information. + # fallback link to use if linkXr == "inManDir" and the man + # page is not in ${manDir}. Placeholders %N (name of page) + # and %S (section of page) can be used. See mandoc(1) for + # more information. }: let @@ -188,47 +199,70 @@ let mandocOpts = lib.concatStringsSep "," ([ "style=style.css" ] ++ linkXrEnum.match linkXr { - all = [ "man=./%N.%S.html" ]; + all = [ "man=./%N.%S.html" ]; inManDir = [ "man=./%N.%S.html;${linkXrFallback}" ]; - none = [ ]; + none = [ ]; }); html = - runExecline.local "htmlman-${title}" { - derivationArgs = { - inherit index style; - passAsFile = [ "index" "style" ]; - }; - } ([ - "multisubstitute" [ - "importas" "-iu" "out" "out" - "importas" "-iu" "index" "indexPath" - "importas" "-iu" "style" "stylePath" - ] - "if" [ bins.mkdir "-p" "$out" ] - "if" [ bins.mv "$index" "\${out}/index.html" ] - "if" (execlineStdoutInto "\${out}/style.css" [ - "if" ([ - bins.cat - ] ++ lib.optional normalizeCss normalizeDrv + runExecline.local "htmlman-${title}" + { + derivationArgs = { + inherit index style; + passAsFile = [ "index" "style" ]; + }; + } + ([ + "multisubstitute" + [ + "importas" + "-iu" + "out" + "out" + "importas" + "-iu" + "index" + "indexPath" + "importas" + "-iu" + "style" + "stylePath" + ] + "if" + [ bins.mkdir "-p" "$out" ] + "if" + [ bins.mv "$index" "\${out}/index.html" ] + "if" + (execlineStdoutInto "\${out}/style.css" [ + "if" + ([ + bins.cat + ] ++ lib.optional normalizeCss normalizeDrv ++ [ - "$style" + "$style" + ]) ]) - ]) - # let mandoc check for available man pages - "execline-cd" "${manDir}" - ] ++ lib.concatMap ({ name, section, ... }@p: - execlineStdoutInto "\${out}/${name}.${toString section}.html" [ - "if" [ - bins.mandoc - "-mdoc" - "-T" "html" - "-O" mandocOpts - (resolvePath p) - ] - ]) pages); - in html // { + # let mandoc check for available man pages + "execline-cd" + "${manDir}" + ] ++ lib.concatMap + ({ name, section, ... }@p: + execlineStdoutInto "\${out}/${name}.${toString section}.html" [ + "if" + [ + bins.mandoc + "-mdoc" + "-T" + "html" + "-O" + mandocOpts + (resolvePath p) + ] + ]) + pages); + in + html // { deploy = deployScript title html; }; in - htmlman +htmlman diff --git a/users/sterni/nix/char/default.nix b/users/sterni/nix/char/default.nix index aacfc9dcbe4d..9c6ce2fb250b 100644 --- a/users/sterni/nix/char/default.nix +++ b/users/sterni/nix/char/default.nix @@ -53,17 +53,20 @@ let asciiAlpha = c: let v = ord c; - in (v >= 65 && v <= 90) + in + (v >= 65 && v <= 90) || (v >= 97 && v <= 122); asciiNum = c: let v = ord c; - in v >= 48 && v <= 57; + in + v >= 48 && v <= 57; asciiAlphaNum = c: asciiAlpha c || asciiNum c; -in { +in +{ inherit allChars char @@ -78,18 +81,19 @@ in { # originally I generated a nix file containing a list of # characters, but infinisil uses a better way which I adapt # which is using builtins.readFile instead of import. - __generateAllChars = pkgs.runCommandCC "generate-all-chars" { - source = '' - #include <stdio.h> - - int main(void) { - for(int i = 1; i <= 0xff; i++) { - putchar(i); + __generateAllChars = pkgs.runCommandCC "generate-all-chars" + { + source = '' + #include <stdio.h> + + int main(void) { + for(int i = 1; i <= 0xff; i++) { + putchar(i); + } } - } - ''; - passAsFile = [ "source" ]; - } '' + ''; + passAsFile = [ "source" ]; + } '' $CC -o "$out" -x c "$sourcePath" ''; } diff --git a/users/sterni/nix/char/tests/default.nix b/users/sterni/nix/char/tests/default.nix index 49b439adbb84..313df474514c 100644 --- a/users/sterni/nix/char/tests/default.nix +++ b/users/sterni/nix/char/tests/default.nix @@ -26,6 +26,6 @@ let ]; in - runTestsuite "char" [ - testAllCharConversion - ] +runTestsuite "char" [ + testAllCharConversion +] diff --git a/users/sterni/nix/flow/default.nix b/users/sterni/nix/flow/default.nix index b5783bd86deb..4bef0abb91e9 100644 --- a/users/sterni/nix/flow/default.nix +++ b/users/sterni/nix/flow/default.nix @@ -68,13 +68,14 @@ let then s x else x == s; in - if b - then builtins.elemAt c 1 - else switch x (builtins.tail conds); + if b + then builtins.elemAt c 1 + else switch x (builtins.tail conds); -in { +in +{ inherit cond switch diff --git a/users/sterni/nix/flow/tests/default.nix b/users/sterni/nix/flow/tests/default.nix index 54cea01858e7..9f974a61c7b2 100644 --- a/users/sterni/nix/flow/tests/default.nix +++ b/users/sterni/nix/flow/tests/default.nix @@ -21,7 +21,7 @@ let (cond [ [ true 1 2 ] [ false 1 ] ])) (assertEq "last is true" "last" (cond [ - [ false dontEval] + [ false dontEval ] [ false dontEval ] [ true "last" ] ])) @@ -34,6 +34,6 @@ let ]; in - runTestsuite "nix.flow" [ - testCond - ] +runTestsuite "nix.flow" [ + testCond +] diff --git a/users/sterni/nix/fun/tests/default.nix b/users/sterni/nix/fun/tests/default.nix index 6492554306e1..f02f19943373 100644 --- a/users/sterni/nix/fun/tests/default.nix +++ b/users/sterni/nix/fun/tests/default.nix @@ -24,6 +24,6 @@ let (fun.hasEllipsis ({ depot, pkgs, ... }: 42))) ]; in - runTestsuite "nix.fun" [ - hasEllipsisTests - ] +runTestsuite "nix.fun" [ + hasEllipsisTests +] diff --git a/users/sterni/nix/html/default.nix b/users/sterni/nix/html/default.nix index 2498d832aadf..d25a7ab8dac0 100644 --- a/users/sterni/nix/html/default.nix +++ b/users/sterni/nix/html/default.nix @@ -20,7 +20,7 @@ let => "<hello>" */ escapeMinimal = builtins.replaceStrings - [ "<" ">" "&" "\"" "'" ] + [ "<" ">" "&" "\"" "'" ] [ "<" ">" "&" """ "'" ]; /* Return a string with a correctly rendered tag of the given name, @@ -87,18 +87,20 @@ let renderTag = tag: attrs: content: let attrs' = builtins.concatStringsSep "" ( - builtins.map (n: - " ${escapeMinimal n}=\"${escapeMinimal (toString attrs.${n})}\"" - ) (builtins.attrNames attrs) + builtins.map + (n: + " ${escapeMinimal n}=\"${escapeMinimal (toString attrs.${n})}\"" + ) + (builtins.attrNames attrs) ); content' = if builtins.isList content then builtins.concatStringsSep "" content else content; in - if content == null - then "<${tag}${attrs'}/>" - else "<${tag}${attrs'}>${content'}</${tag}>"; + if content == null + then "<${tag}${attrs'}/>" + else "<${tag}${attrs'}>${content'}</${tag}>"; /* Prepend "<!DOCTYPE html>" to a string. @@ -111,7 +113,8 @@ let */ withDoctype = doc: "<!DOCTYPE html>" + doc; -in { +in +{ inherit escapeMinimal renderTag withDoctype; __findFile = _: renderTag; diff --git a/users/sterni/nix/html/tests/default.nix b/users/sterni/nix/html/tests/default.nix index 8688b6937130..0d80f2f1cd70 100644 --- a/users/sterni/nix/html/tests/default.nix +++ b/users/sterni/nix/html/tests/default.nix @@ -8,15 +8,17 @@ let ; exampleDocument = withDoctype (<html> { lang = "en"; } [ - (<head> {} [ + (<head> { } [ (<meta> { charset = "utf-8"; } null) - (<title> {} "html.nix example document") - (<link> { - rel = "license"; - href = "https://code.tvl.fyi/about/LICENSE"; - type = "text/html"; - } null) - (<style> {} (esc '' + (<title> { } "html.nix example document") + (<link> + { + rel = "license"; + href = "https://code.tvl.fyi/about/LICENSE"; + type = "text/html"; + } + null) + (<style> { } (esc '' hgroup h2 { font-weight: normal; } @@ -26,39 +28,45 @@ let } '')) ]) - (<body> {} [ - (<main> {} [ - (<hgroup> {} [ - (<h1> {} (esc "html.nix")) - (<h2> {} [ - (<em> {} "the") + (<body> { } [ + (<main> { } [ + (<hgroup> { } [ + (<h1> { } (esc "html.nix")) + (<h2> { } [ + (<em> { } "the") (esc " most cursed HTML DSL ever!") ]) ]) - (<dl> {} [ - (<dt> {} [ + (<dl> { } [ + (<dt> { } [ (esc "Q: Wait, it's all ") - (<a> { - href = "https://cl.tvl.fyi/q/hashtag:cursed"; - } (esc "cursed")) + (<a> + { + href = "https://cl.tvl.fyi/q/hashtag:cursed"; + } + (esc "cursed")) (esc " nix hacks?") ]) - (<dd> {} (esc "A: Always has been. 🔫")) - (<dt> {} (esc "Q: Why does this work?")) - (<dd> {} [ + (<dd> { } (esc "A: Always has been. 🔫")) + (<dt> { } (esc "Q: Why does this work?")) + (<dd> { } [ (esc "Because nix ") - (<a> { - href = "https://github.com/NixOS/nix/blob/293220bed5a75efc963e33c183787e87e55e28d9/src/libexpr/parser.y#L410-L416"; - } (esc "translates ")) - (<a> { - href = "https://github.com/NixOS/nix/blob/293220bed5a75efc963e33c183787e87e55e28d9/src/libexpr/lexer.l#L100"; - } (esc "SPATH tokens")) + (<a> + { + href = "https://github.com/NixOS/nix/blob/293220bed5a75efc963e33c183787e87e55e28d9/src/libexpr/parser.y#L410-L416"; + } + (esc "translates ")) + (<a> + { + href = "https://github.com/NixOS/nix/blob/293220bed5a75efc963e33c183787e87e55e28d9/src/libexpr/lexer.l#L100"; + } + (esc "SPATH tokens")) (esc " like ") - (<code> {} (esc "<nixpkgs>")) + (<code> { } (esc "<nixpkgs>")) (esc " into calls to ") - (<code> {} (esc "__findFile")) + (<code> { } (esc "__findFile")) (esc " in the ") - (<em> {} (esc "current")) + (<em> { } (esc "current")) (esc " scope.") ]) ]) @@ -67,7 +75,8 @@ let ]); in -pkgs.runCommandNoCC "html.nix.html" { +pkgs.runCommandNoCC "html.nix.html" +{ passAsFile = [ "exampleDocument" ]; inherit exampleDocument; nativeBuildInputs = [ pkgs.html5validator ]; diff --git a/users/sterni/nix/int/default.nix b/users/sterni/nix/int/default.nix index b3157571272f..54b55964722d 100644 --- a/users/sterni/nix/int/default.nix +++ b/users/sterni/nix/int/default.nix @@ -47,12 +47,12 @@ let if i == 0 then "" else go (bitShiftR i 4) - + string.charAt (bitAnd i 15) hexdigits; + + string.charAt (bitAnd i 15) hexdigits; sign = lib.optionalString (int < 0) "-"; in - if int == 0 - then "0" - else "${sign}${go (abs int)}"; + if int == 0 + then "0" + else "${sign}${go (abs int)}"; fromHexMap = builtins.listToAttrs (lib.imap0 (i: c: { name = c; value = i; }) @@ -72,11 +72,12 @@ let val = v.val + (fromHexMap."${d}" * v.mul); mul = v.mul * 16; }) - { val = 0; mul = 1; } digits; + { val = 0; mul = 1; } + digits; in - if negative - then -parsed.val - else parsed.val; + if negative + then -parsed.val + else parsed.val; # A nix integer is a 64bit signed integer maxBound = 9223372036854775807; @@ -99,7 +100,8 @@ let inRange = a: b: x: x >= a && x <= b; -in { +in +{ inherit maxBound minBound diff --git a/users/sterni/nix/int/tests/default.nix b/users/sterni/nix/int/tests/default.nix index fac45dd251e1..8d2263b42117 100644 --- a/users/sterni/nix/int/tests/default.nix +++ b/users/sterni/nix/int/tests/default.nix @@ -31,22 +31,262 @@ let ]; expectedBytes = [ - "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "0A" "0B" "0C" "0D" "0E" "0F" - "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "1A" "1B" "1C" "1D" "1E" "1F" - "20" "21" "22" "23" "24" "25" "26" "27" "28" "29" "2A" "2B" "2C" "2D" "2E" "2F" - "30" "31" "32" "33" "34" "35" "36" "37" "38" "39" "3A" "3B" "3C" "3D" "3E" "3F" - "40" "41" "42" "43" "44" "45" "46" "47" "48" "49" "4A" "4B" "4C" "4D" "4E" "4F" - "50" "51" "52" "53" "54" "55" "56" "57" "58" "59" "5A" "5B" "5C" "5D" "5E" "5F" - "60" "61" "62" "63" "64" "65" "66" "67" "68" "69" "6A" "6B" "6C" "6D" "6E" "6F" - "70" "71" "72" "73" "74" "75" "76" "77" "78" "79" "7A" "7B" "7C" "7D" "7E" "7F" - "80" "81" "82" "83" "84" "85" "86" "87" "88" "89" "8A" "8B" "8C" "8D" "8E" "8F" - "90" "91" "92" "93" "94" "95" "96" "97" "98" "99" "9A" "9B" "9C" "9D" "9E" "9F" - "A0" "A1" "A2" "A3" "A4" "A5" "A6" "A7" "A8" "A9" "AA" "AB" "AC" "AD" "AE" "AF" - "B0" "B1" "B2" "B3" "B4" "B5" "B6" "B7" "B8" "B9" "BA" "BB" "BC" "BD" "BE" "BF" - "C0" "C1" "C2" "C3" "C4" "C5" "C6" "C7" "C8" "C9" "CA" "CB" "CC" "CD" "CE" "CF" - "D0" "D1" "D2" "D3" "D4" "D5" "D6" "D7" "D8" "D9" "DA" "DB" "DC" "DD" "DE" "DF" - "E0" "E1" "E2" "E3" "E4" "E5" "E6" "E7" "E8" "E9" "EA" "EB" "EC" "ED" "EE" "EF" - "F0" "F1" "F2" "F3" "F4" "F5" "F6" "F7" "F8" "F9" "FA" "FB" "FC" "FD" "FE" "FF" + "00" + "01" + "02" + "03" + "04" + "05" + "06" + "07" + "08" + "09" + "0A" + "0B" + "0C" + "0D" + "0E" + "0F" + "10" + "11" + "12" + "13" + "14" + "15" + "16" + "17" + "18" + "19" + "1A" + "1B" + "1C" + "1D" + "1E" + "1F" + "20" + "21" + "22" + "23" + "24" + "25" + "26" + "27" + "28" + "29" + "2A" + "2B" + "2C" + "2D" + "2E" + "2F" + "30" + "31" + "32" + "33" + "34" + "35" + "36" + "37" + "38" + "39" + "3A" + "3B" + "3C" + "3D" + "3E" + "3F" + "40" + "41" + "42" + "43" + "44" + "45" + "46" + "47" + "48" + "49" + "4A" + "4B" + "4C" + "4D" + "4E" + "4F" + "50" + "51" + "52" + "53" + "54" + "55" + "56" + "57" + "58" + "59" + "5A" + "5B" + "5C" + "5D" + "5E" + "5F" + "60" + "61" + "62" + "63" + "64" + "65" + "66" + "67" + "68" + "69" + "6A" + "6B" + "6C" + "6D" + "6E" + "6F" + "70" + "71" + "72" + "73" + "74" + "75" + "76" + "77" + "78" + "79" + "7A" + "7B" + "7C" + "7D" + "7E" + "7F" + "80" + "81" + "82" + "83" + "84" + "85" + "86" + "87" + "88" + "89" + "8A" + "8B" + "8C" + "8D" + "8E" + "8F" + "90" + "91" + "92" + "93" + "94" + "95" + "96" + "97" + "98" + "99" + "9A" + "9B" + "9C" + "9D" + "9E" + "9F" + "A0" + "A1" + "A2" + "A3" + "A4" + "A5" + "A6" + "A7" + "A8" + "A9" + "AA" + "AB" + "AC" + "AD" + "AE" + "AF" + "B0" + "B1" + "B2" + "B3" + "B4" + "B5" + "B6" + "B7" + "B8" + "B9" + "BA" + "BB" + "BC" + "BD" + "BE" + "BF" + "C0" + "C1" + "C2" + "C3" + "C4" + "C5" + "C6" + "C7" + "C8" + "C9" + "CA" + "CB" + "CC" + "CD" + "CE" + "CF" + "D0" + "D1" + "D2" + "D3" + "D4" + "D5" + "D6" + "D7" + "D8" + "D9" + "DA" + "DB" + "DC" + "DD" + "DE" + "DF" + "E0" + "E1" + "E2" + "E3" + "E4" + "E5" + "E6" + "E7" + "E8" + "E9" + "EA" + "EB" + "EC" + "ED" + "EE" + "EF" + "F0" + "F1" + "F2" + "F3" + "F4" + "F5" + "F6" + "F7" + "F8" + "F9" + "FA" + "FB" + "FC" + "FD" + "FE" + "FF" ]; hexByte = i: string.fit { width = 2; char = "0"; } (int.toHex i); @@ -64,14 +304,18 @@ let ]; testHex = it "checks conversion to hex" (lib.flatten [ - (lib.imap0 (i: hex: [ - (assertEq "hexByte ${toString i} == ${hex}" (hexByte i) hex) - (assertEq "${toString i} == fromHex ${hex}" i (int.fromHex hex)) - ]) expectedBytes) - (builtins.map ({ left, right }: [ - (assertEq "toHex ${toString left} == ${right}" (int.toHex left) right) - (assertEq "${toString left} == fromHex ${right}" left (int.fromHex right)) - ]) hexInts) + (lib.imap0 + (i: hex: [ + (assertEq "hexByte ${toString i} == ${hex}" (hexByte i) hex) + (assertEq "${toString i} == fromHex ${hex}" i (int.fromHex hex)) + ]) + expectedBytes) + (builtins.map + ({ left, right }: [ + (assertEq "toHex ${toString left} == ${right}" (int.toHex left) right) + (assertEq "${toString left} == fromHex ${right}" left (int.fromHex right)) + ]) + hexInts) ]); testBasic = it "checks basic int operations" [ @@ -94,20 +338,23 @@ let ]; testExp = it "checks exponentiation" - (builtins.map ({ left, right }: - assertEq - "2 ^ ${toString left} == ${toString right}" - (int.exp 2 left) right) expNumbers); + (builtins.map + ({ left, right }: + assertEq + "2 ^ ${toString left} == ${toString right}" + (int.exp 2 left) + right) + expNumbers); shifts = [ - { a = 2; b = 5; c = 64; op = "<<"; } - { a = -2; b = 5; c = -64; op = "<<"; } + { a = 2; b = 5; c = 64; op = "<<"; } + { a = -2; b = 5; c = -64; op = "<<"; } { a = 123; b = 4; c = 1968; op = "<<"; } - { a = 1; b = 8; c = 256; op = "<<"; } - { a = 256; b = 8; c = 1; op = ">>"; } - { a = 374; b = 2; c = 93; op = ">>"; } - { a = 2; b = 2; c = 0; op = ">>"; } - { a = 99; b = 9; c = 0; op = ">>"; } + { a = 1; b = 8; c = 256; op = "<<"; } + { a = 256; b = 8; c = 1; op = ">>"; } + { a = 374; b = 2; c = 93; op = ">>"; } + { a = 2; b = 2; c = 0; op = ">>"; } + { a = 99; b = 9; c = 0; op = ">>"; } ]; checkShift = { a, b, c, op }@args: @@ -116,15 +363,18 @@ let "<<" = int.bitShiftL; ">>" = int.bitShiftR; }; - in assertEq "${toString a} ${op} ${toString b} == ${toString c}" (f a b) c; + in + assertEq "${toString a} ${op} ${toString b} == ${toString c}" (f a b) c; checkShiftRDivExp = n: assertEq "${toString n} >> 5 == ${toString n} / 2 ^ 5" - (int.bitShiftR n 5) (int.div n (int.exp 2 5)); + (int.bitShiftR n 5) + (int.div n (int.exp 2 5)); checkShiftLMulExp = n: assertEq "${toString n} >> 6 == ${toString n} * 2 ^ 6" - (int.bitShiftL n 5) (int.mul n (int.exp 2 5)); + (int.bitShiftL n 5) + (int.mul n (int.exp 2 5)); testBit = it "checks bitwise operations" (lib.flatten [ (builtins.map checkShift shifts) @@ -160,11 +410,11 @@ let ]); divisions = [ - { a = 2; b = 1; c = 2; mod = 0;} - { a = 2; b = 2; c = 1; mod = 0;} - { a = 20; b = 10; c = 2; mod = 0;} - { a = 12; b = 5; c = 2; mod = 2;} - { a = 23; b = 4; c = 5; mod = 3;} + { a = 2; b = 1; c = 2; mod = 0; } + { a = 2; b = 2; c = 1; mod = 0; } + { a = 20; b = 10; c = 2; mod = 0; } + { a = 12; b = 5; c = 2; mod = 2; } + { a = 23; b = 4; c = 5; mod = 3; } ]; checkDiv = n: { a, b, c, mod }: [ @@ -176,28 +426,34 @@ let testDivMod = it "checks integer division and modulo" (lib.flatten [ (builtins.map (checkDiv "+a / +b") divisions) - (builtins.map (fun.rl (checkDiv "-a / +b") (x: x // { - a = -x.a; - c = -x.c; - mod = -x.mod; - })) divisions) - (builtins.map (fun.rl (checkDiv "+a / -b") (x: x // { - b = -x.b; - c = -x.c; - })) divisions) - (builtins.map (fun.rl (checkDiv "-a / -b") (x: x // { - a = -x.a; - b = -x.b; - mod = -x.mod; - })) divisions) + (builtins.map + (fun.rl (checkDiv "-a / +b") (x: x // { + a = -x.a; + c = -x.c; + mod = -x.mod; + })) + divisions) + (builtins.map + (fun.rl (checkDiv "+a / -b") (x: x // { + b = -x.b; + c = -x.c; + })) + divisions) + (builtins.map + (fun.rl (checkDiv "-a / -b") (x: x // { + a = -x.a; + b = -x.b; + mod = -x.mod; + })) + divisions) ]); in - runTestsuite "nix.int" [ - testBounds - testHex - testBasic - testExp - testBit - testDivMod - ] +runTestsuite "nix.int" [ + testBounds + testHex + testBasic + testExp + testBit + testDivMod +] diff --git a/users/sterni/nix/string/default.nix b/users/sterni/nix/string/default.nix index 19d2cec243c0..852ef2538fdc 100644 --- a/users/sterni/nix/string/default.nix +++ b/users/sterni/nix/string/default.nix @@ -21,7 +21,8 @@ let charAt = i: s: let r = builtins.substring i 1 s; - in if r == "" then null else r; + in + if r == "" then null else r; charIndex = char: s: let @@ -32,7 +33,8 @@ let [ (charAt i s == char) i ] [ true (go (i + 1)) ] ]; - in go 0; + in + go 0; toChars = lib.stringToCharacters; fromChars = lib.concatStrings; @@ -46,15 +48,16 @@ let let leftS = fromChars (builtins.genList (_: char) left); rightS = fromChars (builtins.genList (_: char) right); - in "${leftS}${s}${rightS}"; + in + "${leftS}${s}${rightS}"; fit = { char ? " ", width, side ? "left" }: s: let diff = width - builtins.stringLength s; in - if diff <= 0 - then s - else pad { inherit char; "${side}" = diff; } s; + if diff <= 0 + then s + else pad { inherit char; "${side}" = diff; } s; # pattern matching for strings only match = val: matcher: matcher."${val}"; @@ -80,23 +83,28 @@ let tokens = lib.flatten (builtins.split "(%.)" formatString); argsNeeded = builtins.length (builtins.filter specifierWithArg tokens); - format = args: (builtins.foldl' ({ out ? "", argIndex ? 0 }: token: { - argIndex = argIndex + (if specifierWithArg token then 1 else 0); - out = - /**/ if token == "%s" then out + builtins.elemAt args argIndex - else if token == "%%" then out + "%" - else if isSpecifier token then throw "Unsupported format specifier ${token}" - else out + token; - }) {} tokens).out; + format = args: (builtins.foldl' + ({ out ? "", argIndex ? 0 }: token: { + argIndex = argIndex + (if specifierWithArg token then 1 else 0); + out = + /**/ + if token == "%s" then out + builtins.elemAt args argIndex + else if token == "%%" then out + "%" + else if isSpecifier token then throw "Unsupported format specifier ${token}" + else out + token; + }) + { } + tokens).out; accumulateArgs = argCount: args: if argCount > 0 then arg: accumulateArgs (argCount - 1) (args ++ [ arg ]) else format args; in - accumulateArgs argsNeeded []; + accumulateArgs argsNeeded [ ]; -in { +in +{ inherit take drop diff --git a/users/sterni/nix/string/tests/default.nix b/users/sterni/nix/string/tests/default.nix index c8aec9464077..e9015e95dca4 100644 --- a/users/sterni/nix/string/tests/default.nix +++ b/users/sterni/nix/string/tests/default.nix @@ -63,10 +63,10 @@ let ]; in - runTestsuite "nix.string" [ - testTakeDrop - testIndexing - testFinding - testMatch - testPrintf - ] +runTestsuite "nix.string" [ + testTakeDrop + testIndexing + testFinding + testMatch + testPrintf +] diff --git a/users/sterni/nix/url/default.nix b/users/sterni/nix/url/default.nix index 37bd0de66ac9..4a401873a1f2 100644 --- a/users/sterni/nix/url/default.nix +++ b/users/sterni/nix/url/default.nix @@ -10,9 +10,24 @@ let ; reserved = c: builtins.elem c [ - "!" "#" "$" "&" "'" "(" ")" - "*" "+" "," "/" ":" ";" "=" - "?" "@" "[" "]" + "!" + "#" + "$" + "&" + "'" + "(" + ")" + "*" + "+" + "," + "/" + ":" + ";" + "=" + "?" + "@" + "[" + "]" ]; unreserved = c: char.asciiAlphaNum c @@ -21,11 +36,13 @@ let percentEncode = c: if unreserved c then c - else "%" + (string.fit { - width = 2; - char = "0"; - side = "left"; - } (int.toHex (char.ord c))); + else "%" + (string.fit + { + width = 2; + char = "0"; + side = "left"; + } + (int.toHex (char.ord c))); encode = { leaveReserved ? false }: s: let @@ -34,7 +51,8 @@ let if leaveReserved && reserved c then c else percentEncode c; - in lib.concatStrings (builtins.map tr chars); + in + lib.concatStrings (builtins.map tr chars); decode = s: let @@ -71,9 +89,10 @@ let ]; in - (builtins.foldl' decodeStep {} tokens).result; + (builtins.foldl' decodeStep { } tokens).result; -in { +in +{ inherit encode decode diff --git a/users/sterni/nix/url/tests/default.nix b/users/sterni/nix/url/tests/default.nix index 7cf53cde1555..4eb6f95ccd07 100644 --- a/users/sterni/nix/url/tests/default.nix +++ b/users/sterni/nix/url/tests/default.nix @@ -14,11 +14,13 @@ let checkEncoding = args: { left, right }: assertEq "encode ${builtins.toJSON left} == ${builtins.toJSON right}" - (url.encode args left) right; + (url.encode args left) + right; checkDecoding = { left, right }: - assertEq "${builtins.toJSON left} == decode ${builtins.toJSON right}" - (url.decode left) right; + assertEq "${builtins.toJSON left} == decode ${builtins.toJSON right}" + (url.decode left) + right; unreserved = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_~"; @@ -33,7 +35,7 @@ let ]; testEncode = it "checks url.encode" - (builtins.map (checkEncoding {}) encodeExpected); + (builtins.map (checkEncoding { }) encodeExpected); testDecode = it "checks url.decode" (builtins.map checkDecoding encodeExpected); @@ -50,7 +52,7 @@ let "urn:oasis:names:specification:docbook:dtd:xml:4.1.2" ]); in - runTestsuite "nix.url" [ - testEncode - testLeaveReserved - ] +runTestsuite "nix.url" [ + testEncode + testLeaveReserved +] diff --git a/users/sterni/nix/utf8/default.nix b/users/sterni/nix/utf8/default.nix index 270da934b6a6..71c846c0421e 100644 --- a/users/sterni/nix/utf8/default.nix +++ b/users/sterni/nix/utf8/default.nix @@ -25,7 +25,7 @@ let Type: integer -> integer */ byteCount = i: flow.cond [ - [ (int.bitAnd i 128 == 0) 1 ] + [ (int.bitAnd i 128 == 0) 1 ] [ (int.bitAnd i 224 == 192) 2 ] [ (int.bitAnd i 240 == 224) 3 ] [ (int.bitAnd i 248 == 240) 4 ] @@ -45,30 +45,30 @@ let first: # byte position as an index starting with 0 pos: - let - defaultRange = int.inRange 128 191; - - secondBytePredicate = flow.switch first [ - [ (int.inRange 194 223) defaultRange ] # C2..DF - [ 224 (int.inRange 160 191) ] # E0 - [ (int.inRange 225 236) defaultRange ] # E1..EC - [ 237 (int.inRange 128 159) ] # ED - [ (int.inRange 238 239) defaultRange ] # EE..EF - [ 240 (int.inRange 144 191) ] # F0 - [ (int.inRange 241 243) defaultRange ] # F1..F3 - [ 244 (int.inRange 128 143) ] # F4 - [ (fun.const true) null ] - ]; + let + defaultRange = int.inRange 128 191; + + secondBytePredicate = flow.switch first [ + [ (int.inRange 194 223) defaultRange ] # C2..DF + [ 224 (int.inRange 160 191) ] # E0 + [ (int.inRange 225 236) defaultRange ] # E1..EC + [ 237 (int.inRange 128 159) ] # ED + [ (int.inRange 238 239) defaultRange ] # EE..EF + [ 240 (int.inRange 144 191) ] # F0 + [ (int.inRange 241 243) defaultRange ] # F1..F3 + [ 244 (int.inRange 128 143) ] # F4 + [ (fun.const true) null ] + ]; - firstBytePredicate = byte: assert first == byte; - first < 128 || secondBytePredicate != null; - in - # Either ASCII or in one of the byte ranges of Table 3-6. - if pos == 0 then firstBytePredicate - # return predicate according to Table 3-6. - else if pos == 1 then assert secondBytePredicate != null; secondBytePredicate - # 3rd and 4th byte have only one validity rule - else defaultRange; + firstBytePredicate = byte: assert first == byte; + first < 128 || secondBytePredicate != null; + in + # Either ASCII or in one of the byte ranges of Table 3-6. + if pos == 0 then firstBytePredicate + # return predicate according to Table 3-6. + else if pos == 1 then assert secondBytePredicate != null; secondBytePredicate + # 3rd and 4th byte have only one validity rule + else defaultRange; /* Iteration step for decoding an UTF-8 byte sequence. It decodes incrementally, i. e. it has to be fed @@ -128,23 +128,24 @@ let # the current value by the amount of bytes left. offset = (count - (pos + 1)) * 6; in - code + (int.bitShiftL (int.bitAnd mask value) offset); + code + (int.bitShiftL (int.bitAnd mask value) offset); illFormedMsg = "Ill-formed byte ${int.toHex value} at position ${toString pos} in ${toString count} byte UTF-8 sequence"; in - if !(wellFormedByte first pos value) then builtins.throw illFormedMsg - else if pos + 1 == count - then (builtins.removeAttrs args [ # allow extra state being passed through - "count" - "code" - "pos" - "first" - ]) // { result = newCode; } - else (builtins.removeAttrs args [ "result" ]) // { - inherit count first; - code = newCode; - pos = pos + 1; - }; + if !(wellFormedByte first pos value) then builtins.throw illFormedMsg + else if pos + 1 == count + then (builtins.removeAttrs args [ + # allow extra state being passed through + "count" + "code" + "pos" + "first" + ]) // { result = newCode; } + else (builtins.removeAttrs args [ "result" ]) // { + inherit count first; + code = newCode; + pos = pos + 1; + }; /* Decode an UTF-8 string into a list of codepoints. @@ -161,7 +162,7 @@ let { key = "start"; stringIndex = -1; - state = {}; + state = { }; codepoint = null; } ]; @@ -170,7 +171,8 @@ let # updated values for current iteration step newIndex = stringIndex + 1; newState = step state (builtins.substring newIndex 1 s); - in lib.optional (newIndex < stringLength) { + in + lib.optional (newIndex < stringLength) { # unique keys to make genericClosure happy key = toString newIndex; # carryover state for the next step @@ -183,35 +185,39 @@ let in # extract all steps that yield a code point into a list builtins.map (v: v.codepoint) ( - builtins.filter ( - { codepoint, stringIndex, state, ... }: - - let - # error message in case we are missing bytes at the end of input - earlyEndMsg = - if state ? count && state ? pos - then "Missing ${toString (with state; count - pos)} bytes at end of input" - else "Unexpected end of input"; - in - - # filter out all iteration steps without a codepoint value - codepoint != null + builtins.filter + ( + { codepoint, stringIndex, state, ... }: + + let + # error message in case we are missing bytes at the end of input + earlyEndMsg = + if state ? count && state ? pos + then "Missing ${toString (with state; count - pos)} bytes at end of input" + else "Unexpected end of input"; + in + + # filter out all iteration steps without a codepoint value + codepoint != null # if we are at the iteration step of a non-empty input string, throw # an error if no codepoint was returned, as it indicates an incomplete # UTF-8 sequence. || (stringLength > 0 && stringIndex == stringLength - 1 && throw earlyEndMsg) - ) iterResult + ) + iterResult ); /* Pretty prints a Unicode codepoint in the U+<HEX> notation. Type: integer -> string */ - formatCodepoint = cp: "U+" + string.fit { - width = 4; - char = "0"; - } (int.toHex cp); + formatCodepoint = cp: "U+" + string.fit + { + width = 4; + char = "0"; + } + (int.toHex cp); encodeCodepoint = cp: let @@ -219,11 +225,11 @@ let # Note that this doesn't check if the Unicode codepoint is allowed, # but rather allows all theoretically UTF-8-encodeable ones. count = flow.switch cp [ - [ (int.inRange 0 127) 1 ] # 00000000 0xxxxxxx - [ (int.inRange 128 2047) 2 ] # 00000yyy yyxxxxxx - [ (int.inRange 2048 65535) 3 ] # zzzzyyyy yyxxxxxx + [ (int.inRange 0 127) 1 ] # 00000000 0xxxxxxx + [ (int.inRange 128 2047) 2 ] # 00000yyy yyxxxxxx + [ (int.inRange 2048 65535) 3 ] # zzzzyyyy yyxxxxxx [ (int.inRange 65536 1114111) 4 ] # 000uuuuu zzzzyyyy yyxxxxxx, - # capped at U+10FFFF + # capped at U+10FFFF [ (fun.const true) (builtins.throw invalidCodepointMsg) ] ]; @@ -234,32 +240,34 @@ let # according to Table 3-6. from The Unicode Standard, Version 13.0, # section 3.9. u is split into uh and ul since they are used in # different bytes in the end. - components = lib.mapAttrs (_: { mask, offset }: - int.bitAnd (int.bitShiftR cp offset) mask - ) { - x = { - mask = if count > 1 then 63 else 127; - offset = 0; - }; - y = { - mask = if count > 2 then 63 else 31; - offset = 6; - }; - z = { - mask = 15; - offset = 12; - }; - # u which belongs into the second byte - ul = { - mask = 3; - offset = 16; - }; - # u which belongs into the first byte - uh = { - mask = 7; - offset = 18; + components = lib.mapAttrs + (_: { mask, offset }: + int.bitAnd (int.bitShiftR cp offset) mask + ) + { + x = { + mask = if count > 1 then 63 else 127; + offset = 0; + }; + y = { + mask = if count > 2 then 63 else 31; + offset = 6; + }; + z = { + mask = 15; + offset = 12; + }; + # u which belongs into the second byte + ul = { + mask = 3; + offset = 16; + }; + # u which belongs into the first byte + uh = { + mask = 7; + offset = 18; + }; }; - }; inherit (components) x y z ul uh; # Finally construct the byte sequence for the given codepoint. This is @@ -286,15 +294,18 @@ let unableToEncodeMessage = "Can't encode ${formatCodepoint cp} as UTF-8"; - in string.fromBytes ( - builtins.genList (i: - let - byte = builtins.elemAt bytes i; - in + in + string.fromBytes ( + builtins.genList + (i: + let + byte = builtins.elemAt bytes i; + in if wellFormedByte firstByte i byte then byte else builtins.throw unableToEncodeMessage - ) count + ) + count ); /* Encode a list of Unicode codepoints into an UTF-8 string. @@ -303,7 +314,8 @@ let */ encode = lib.concatMapStrings encodeCodepoint; -in { +in +{ inherit encode decode diff --git a/users/sterni/nix/utf8/tests/default.nix b/users/sterni/nix/utf8/tests/default.nix index ddcd34208a6d..40783eab2421 100644 --- a/users/sterni/nix/utf8/tests/default.nix +++ b/users/sterni/nix/utf8/tests/default.nix @@ -25,9 +25,10 @@ let char ; - rustDecoder = rustSimple { - name = "utf8-decode"; - } '' + rustDecoder = rustSimple + { + name = "utf8-decode"; + } '' use std::io::{self, Read}; fn main() -> std::io::Result<()> { let mut buffer = String::new(); @@ -47,10 +48,11 @@ let rustDecode = s: let - expr = runCommandLocal "${s}-decoded" {} '' + expr = runCommandLocal "${s}-decoded" { } '' printf '%s' ${lib.escapeShellArg s} | ${rustDecoder} > $out ''; - in import expr; + in + import expr; hexDecode = l: utf8.decode (string.fromBytes (builtins.map int.fromHex l)); @@ -65,23 +67,27 @@ let (assertEq "well-formed: F4 80 83 92" (hexDecode [ "F4" "80" "83" "92" ]) [ 1048786 ]) (assertThrows "Codepoint out of range: 0xFFFFFF" (hexEncode [ "FFFFFF" ])) (assertThrows "Codepoint out of range: -0x02" (hexEncode [ "-02" ])) - ] ++ builtins.genList (i: - let - cp = i + int.fromHex "D800"; - in + ] ++ builtins.genList + (i: + let + cp = i + int.fromHex "D800"; + in assertThrows "Can't encode UTF-16 reserved characters: ${utf8.formatCodepoint cp}" (utf8.encode [ cp ]) - ) (int.fromHex "07FF")); + ) + (int.fromHex "07FF")); testAscii = it "checks decoding of ascii strings" - (builtins.map (s: assertEq "ASCII decoding is equal to UTF-8 decoding for \"${s}\"" - (string.toBytes s) (utf8.decode s)) [ - "foo bar" - "hello\nworld" - "carriage\r\nreturn" - "1238398494829304 []<><>({})[]!!)" - (string.take 127 char.allChars) - ]); + (builtins.map + (s: assertEq "ASCII decoding is equal to UTF-8 decoding for \"${s}\"" + (string.toBytes s) + (utf8.decode s)) [ + "foo bar" + "hello\nworld" + "carriage\r\nreturn" + "1238398494829304 []<><>({})[]!!)" + (string.take 127 char.allChars) + ]); randomUnicode = [ "" # empty string should yield empty list @@ -126,16 +132,17 @@ let testDecodingEncoding = it "checks that decoding and then encoding forms an identity" (builtins.map (s: assertEq "Decoding and then encoding “${s}” yields itself" - (utf8.encode (utf8.decode s)) s) + (utf8.encode (utf8.decode s)) + s) (lib.flatten [ glassSentences randomUnicode ])); in - runTestsuite "nix.utf8" [ - testFailures - testAscii - testDecoding - testDecodingEncoding - ] +runTestsuite "nix.utf8" [ + testFailures + testAscii + testDecoding + testDecodingEncoding +] diff --git a/users/sterni/nixpkgs-crate-holes/default.nix b/users/sterni/nixpkgs-crate-holes/default.nix index a022568dc941..b659c9c89eb2 100644 --- a/users/sterni/nixpkgs-crate-holes/default.nix +++ b/users/sterni/nixpkgs-crate-holes/default.nix @@ -33,7 +33,7 @@ let symphorien erictapen expipiplus1 - ; + ; }; # buildRustPackage handling @@ -55,24 +55,25 @@ let extractCargoLock = drv: if !(drv ? cargoDeps.outPath) then null - else pkgs.runCommandNoCC "${drv.name}-Cargo.lock" {} '' - if test -d "${drv.cargoDeps}"; then - cp "${drv.cargoDeps}/Cargo.lock" "$out" - fi - - if test -f "${drv.cargoDeps}"; then - tar -xO \ - --no-wildcards-match-slash --wildcards \ - -f "${drv.cargoDeps}" \ - '*/Cargo.lock' \ - > "$out" - fi - ''; + else + pkgs.runCommandNoCC "${drv.name}-Cargo.lock" { } '' + if test -d "${drv.cargoDeps}"; then + cp "${drv.cargoDeps}/Cargo.lock" "$out" + fi + + if test -f "${drv.cargoDeps}"; then + tar -xO \ + --no-wildcards-match-slash --wildcards \ + -f "${drv.cargoDeps}" \ + '*/Cargo.lock' \ + > "$out" + fi + ''; # nixpkgs traversal # Condition for us to recurse: Either at top-level or recurseForDerivation. - recurseInto = path: x: path == [] || + recurseInto = path: x: path == [ ] || (lib.isAttrs x && (x.recurseForDerivations or false)); # Returns the value or false if an eval error occurs. @@ -97,46 +98,69 @@ let doRec = tryEvalOrFalse (recurseInto path x); isRust = tryEvalOrFalse (isRustPackage x); in - if doRec then lib.concatLists ( - lib.mapAttrsToList (n: go (path ++ [ n ])) x - ) else if isDrv && isRust then [ - { - attr = path; - lock = extractCargoLock x; - maintainers = x.meta.maintainers or []; - } - ] else []; - in go []; + if doRec then + lib.concatLists + ( + lib.mapAttrsToList (n: go (path ++ [ n ])) x + ) else if isDrv && isRust then [ + { + attr = path; + lock = extractCargoLock x; + maintainers = x.meta.maintainers or [ ]; + } + ] else [ ]; + in + go [ ]; # Report generation and formatting - reportFor = { attr, lock, maintainers ? [] }: let - # naïve attribute path to Nix syntax conversion - strAttr = lib.concatStringsSep "." attr; - strMaintainers = lib.concatMapStringsSep " " (m: "@${m.github}") ( - builtins.filter (x: builtins.elem x maintainerWhitelist) maintainers - ); - in + reportFor = { attr, lock, maintainers ? [ ] }: + let + # naïve attribute path to Nix syntax conversion + strAttr = lib.concatStringsSep "." attr; + strMaintainers = lib.concatMapStringsSep " " (m: "@${m.github}") ( + builtins.filter (x: builtins.elem x maintainerWhitelist) maintainers + ); + in if lock == null then pkgs.emptyFile - else depot.nix.runExecline "${strAttr}-vulnerability-report" {} [ - "pipeline" [ - bins.cargo-audit - "audit" "--json" - "-n" "--db" rustsec-advisory-db - "-f" lock - ] - "importas" "out" "out" - "redirfd" "-w" "1" "$out" - bins.jq "-rj" "-f" ./format-audit-result.jq - "--arg" "attr" strAttr - "--arg" "maintainers" strMaintainers - ]; + else + depot.nix.runExecline "${strAttr}-vulnerability-report" { } [ + "pipeline" + [ + bins.cargo-audit + "audit" + "--json" + "-n" + "--db" + rustsec-advisory-db + "-f" + lock + ] + "importas" + "out" + "out" + "redirfd" + "-w" + "1" + "$out" + bins.jq + "-rj" + "-f" + ./format-audit-result.jq + "--arg" + "attr" + strAttr + "--arg" + "maintainers" + strMaintainers + ]; # GHMF in issues splits paragraphs on newlines - description = lib.concatMapStringsSep "\n\n" ( - builtins.replaceStrings [ "\n" ] [ " " ] - ) [ + description = lib.concatMapStringsSep "\n\n" + ( + builtins.replaceStrings [ "\n" ] [ " " ] + ) [ '' The vulnerability report below was generated by [nixpkgs-crate-holes](https://code.tvl.fyi/tree/users/sterni/nixpkgs-crate-holes) @@ -194,39 +218,63 @@ let ); in - depot.nix.runExecline "nixpkgs-rust-pkgs-vulnerability-report.md" { - stdin = lib.concatMapStrings (report: "${report}\n") reports; - } [ - "importas" "out" "out" - "redirfd" "-w" "1" "$out" + depot.nix.runExecline "nixpkgs-rust-pkgs-vulnerability-report.md" + { + stdin = lib.concatMapStrings (report: "${report}\n") reports; + } [ + "importas" + "out" + "out" + "redirfd" + "-w" + "1" + "$out" # Print introduction paragraph for the issue - "if" [ bins.printf "%s\n\n" description ] + "if" + [ bins.printf "%s\n\n" description ] # Print all reports - "foreground" [ - "forstdin" "-E" "report" bins.cat "$report" + "foreground" + [ + "forstdin" + "-E" + "report" + bins.cat + "$report" ] # Print stats at the end (mostly as a gimmick), we already know how many # attributes there are and count the attributes with vulnerability by # finding the number of checkable list entries in the output. - "backtick" "-E" "vulnerableCount" [ - "pipeline" [ - bins.grep "^- \\[ \\]" "$out" + "backtick" + "-E" + "vulnerableCount" + [ + "pipeline" + [ + bins.grep + "^- \\[ \\]" + "$out" ] - bins.wc "-l" + bins.wc + "-l" ] - "if" [ + "if" + [ bins.printf "\n%s of %s checked attributes have vulnerable dependencies.\n\n" "$vulnerableCount" (toString (builtins.length reports)) ] - "if" [ - bins.printf "%s\n\n" runInstructions + "if" + [ + bins.printf + "%s\n\n" + runInstructions ] ]; singleReport = - { # Attribute to check: string or list of strings (attr path) + { + # Attribute to check: string or list of strings (attr path) attr # Path to importable nixpkgs checkout , nixpkgsPath @@ -241,37 +289,63 @@ let strAttr = lib.concatStringsSep "." attr'; in - depot.nix.runExecline "${strAttr}-report.html" {} [ - "importas" "out" "out" - "backtick" "-I" "-E" "-N" "report" [ - bins.cargo-audit "audit" + depot.nix.runExecline "${strAttr}-report.html" { } [ + "importas" + "out" + "out" + "backtick" + "-I" + "-E" + "-N" + "report" + [ + bins.cargo-audit + "audit" "--quiet" - "-n" "--db" rustsec-advisory-db - "-f" lockFile + "-n" + "--db" + rustsec-advisory-db + "-f" + lockFile ] - "pipeline" [ - "ifte" [ - bins.printf "%s" "$report" - ] [ - bins.printf "%s\n" "No vulnerabilities found" + "pipeline" + [ + "ifte" + [ + bins.printf + "%s" + "$report" + ] + [ + bins.printf + "%s\n" + "No vulnerabilities found" ] - bins.test "-n" "$report" + bins.test + "-n" + "$report" ] - "pipeline" [ - bins.tee "/dev/stderr" + "pipeline" + [ + bins.tee + "/dev/stderr" ] - "redirfd" "-w" "1" "$out" + "redirfd" + "-w" + "1" + "$out" bins.ansi2html ]; -in { +in +{ full = reportForNixpkgs; single = singleReport; inherit extractCargoLock allLockFiles - ; + ; # simple sanity check, doesn't cover everything, but testing the full report # is quite expensive in terms of evaluation. diff --git a/users/tazjin/aoc2019/default.nix b/users/tazjin/aoc2019/default.nix index ce3146d1f74e..a1798f400174 100644 --- a/users/tazjin/aoc2019/default.nix +++ b/users/tazjin/aoc2019/default.nix @@ -11,12 +11,16 @@ let getDay = f: head (matchSolution f); solutionFiles = filter (e: dir."${e}" == "regular" && isSolution e) (attrNames dir); - solutions = map (f: let day = getDay f; in { - name = day; - value = depot.nix.writeElispBin { - name = "aoc2019"; - deps = p: with p; [ dash s ht ]; - src = ./. + ("/" + f); - }; - }) solutionFiles; -in listToAttrs solutions + solutions = map + (f: + let day = getDay f; in { + name = day; + value = depot.nix.writeElispBin { + name = "aoc2019"; + deps = p: with p; [ dash s ht ]; + src = ./. + ("/" + f); + }; + }) + solutionFiles; +in +listToAttrs solutions diff --git a/users/tazjin/aoc2020/default.nix b/users/tazjin/aoc2020/default.nix index 7a7309ac5aaa..cd89da7de412 100644 --- a/users/tazjin/aoc2020/default.nix +++ b/users/tazjin/aoc2020/default.nix @@ -11,12 +11,16 @@ let getDay = f: head (matchSolution f); solutionFiles = filter (e: dir."${e}" == "regular" && isSolution e) (attrNames dir); - solutions = map (f: let day = getDay f; in depot.nix.writeElispBin { - name = day; - deps = p: with p; [ dash s ht p.f ]; - src = ./. + ("/" + f); - }) solutionFiles; -in pkgs.symlinkJoin { + solutions = map + (f: + let day = getDay f; in depot.nix.writeElispBin { + name = day; + deps = p: with p; [ dash s ht p.f ]; + src = ./. + ("/" + f); + }) + solutionFiles; +in +pkgs.symlinkJoin { name = "aoc2020"; paths = solutions; } diff --git a/users/tazjin/blog/default.nix b/users/tazjin/blog/default.nix index 6ac89e46656a..c8b3c318995b 100644 --- a/users/tazjin/blog/default.nix +++ b/users/tazjin/blog/default.nix @@ -23,7 +23,7 @@ let posts = filter includePost (list post (import ./posts.nix)); - rendered = pkgs.runCommandNoCC "tazjins-blog" {} '' + rendered = pkgs.runCommandNoCC "tazjins-blog" { } '' mkdir -p $out ${lib.concatStringsSep "\n" (map (post: @@ -31,13 +31,16 @@ let ) posts)} ''; -in { +in +{ inherit posts rendered config; # Generate embeddable nginx configuration for redirects from old post URLs - oldRedirects = lib.concatStringsSep "\n" (map (post: '' - location ~* ^(/en)?/${post.oldKey} { - return 301 https://tazj.in/blog/${post.key}; - } - '') (filter (hasAttr "oldKey") posts)); + oldRedirects = lib.concatStringsSep "\n" (map + (post: '' + location ~* ^(/en)?/${post.oldKey} { + return 301 https://tazj.in/blog/${post.key}; + } + '') + (filter (hasAttr "oldKey") posts)); } diff --git a/users/tazjin/blog/posts.nix b/users/tazjin/blog/posts.nix index b43598d01358..eeba600286db 100644 --- a/users/tazjin/blog/posts.nix +++ b/users/tazjin/blog/posts.nix @@ -37,7 +37,7 @@ key = "the-smu-problem"; title = "The SMU-problem of messaging apps"; date = 1450354078; - content =./posts/the-smu-problem.md; + content = ./posts/the-smu-problem.md; oldKey = "1450354078"; } { diff --git a/users/tazjin/dns/default.nix b/users/tazjin/dns/default.nix index da92b88beade..6c51cb5de4f5 100644 --- a/users/tazjin/dns/default.nix +++ b/users/tazjin/dns/default.nix @@ -2,11 +2,12 @@ { depot, pkgs, ... }: let - checkZone = zone: file: pkgs.runCommandNoCC "${zone}-check" {} '' + checkZone = zone: file: pkgs.runCommandNoCC "${zone}-check" { } '' ${pkgs.bind}/bin/named-checkzone -i local ${zone} ${file} | tee $out ''; -in depot.nix.readTree.drvTargets { - kontemplate-works = checkZone "kontemplate.works"./kontemplate.works.zone; +in +depot.nix.readTree.drvTargets { + kontemplate-works = checkZone "kontemplate.works" ./kontemplate.works.zone; tazj-in = checkZone "tazj.in" ./tazj.in.zone; } diff --git a/users/tazjin/emacs/default.nix b/users/tazjin/emacs/default.nix index c7c57ba35543..08ff76c00ca1 100644 --- a/users/tazjin/emacs/default.nix +++ b/users/tazjin/emacs/default.nix @@ -2,166 +2,173 @@ # and my personal Emacs configuration. { lib, pkgs, ... }: -pkgs.makeOverridable({ emacs ? pkgs.emacsGcc }: -let - emacsWithPackages = (pkgs.emacsPackagesGen emacs).emacsWithPackages; +pkgs.makeOverridable + ({ emacs ? pkgs.emacsGcc }: + let + emacsWithPackages = (pkgs.emacsPackagesGen emacs).emacsWithPackages; - # If switching telega versions, use this variable because it will - # keep the version check, binary path and so on in sync. - currentTelega = epkgs: epkgs.melpaPackages.telega; + # If switching telega versions, use this variable because it will + # keep the version check, binary path and so on in sync. + currentTelega = epkgs: epkgs.melpaPackages.telega; - # $PATH for binaries that need to be available to Emacs - emacsBinPath = lib.makeBinPath [ - (currentTelega pkgs.emacsPackages) - pkgs.libwebp # for dwebp, required by telega - ]; + # $PATH for binaries that need to be available to Emacs + emacsBinPath = lib.makeBinPath [ + (currentTelega pkgs.emacsPackages) + pkgs.libwebp # for dwebp, required by telega + ]; - identity = x: x; + identity = x: x; - tazjinsEmacs = pkgfun: (emacsWithPackages(epkgs: pkgfun(with epkgs; [ - ace-link - ace-window - avy - bazel - browse-kill-ring - cargo - clojure-mode - cmake-mode - company - counsel - counsel-notmuch - d-mode - direnv - dockerfile-mode - eglot - elfeed - elixir-mode - elm-mode - erlang - exwm - flymake - go-mode - google-c-style - gruber-darker-theme - haskell-mode - ht - hydra - idle-highlight-mode - ivy - ivy-prescient - jq-mode - kotlin-mode - lsp-mode - magit - markdown-toc - meson-mode - multi-term - multiple-cursors - nginx-mode - nix-mode - notmuch - paredit - password-store - pinentry - polymode - prescient - protobuf-mode - rainbow-delimiters - rainbow-mode - refine - request - restclient - rust-mode - sly - string-edit - swiper - telephone-line - terraform-mode - toml-mode - transient - undo-tree - use-package - uuidgen - vterm - web-mode - websocket - which-key - xelb - yaml-mode - yasnippet - zoxide + tazjinsEmacs = pkgfun: (emacsWithPackages (epkgs: pkgfun (with epkgs; [ + ace-link + ace-window + avy + bazel + browse-kill-ring + cargo + clojure-mode + cmake-mode + company + counsel + counsel-notmuch + d-mode + direnv + dockerfile-mode + eglot + elfeed + elixir-mode + elm-mode + erlang + exwm + flymake + go-mode + google-c-style + gruber-darker-theme + haskell-mode + ht + hydra + idle-highlight-mode + ivy + ivy-prescient + jq-mode + kotlin-mode + lsp-mode + magit + markdown-toc + meson-mode + multi-term + multiple-cursors + nginx-mode + nix-mode + notmuch + paredit + password-store + pinentry + polymode + prescient + protobuf-mode + rainbow-delimiters + rainbow-mode + refine + request + restclient + rust-mode + sly + string-edit + swiper + telephone-line + terraform-mode + toml-mode + transient + undo-tree + use-package + uuidgen + vterm + web-mode + websocket + which-key + xelb + yaml-mode + yasnippet + zoxide - # Wonky stuff - (currentTelega epkgs) + # Wonky stuff + (currentTelega epkgs) - # Custom depot packages (either ours, or overridden ones) - tvlPackages.dottime - tvlPackages.nix-util - tvlPackages.passively - tvlPackages.rcirc - tvlPackages.term-switcher - tvlPackages.tvl - ]))); + # Custom depot packages (either ours, or overridden ones) + tvlPackages.dottime + tvlPackages.nix-util + tvlPackages.passively + tvlPackages.rcirc + tvlPackages.term-switcher + tvlPackages.tvl + ]))); - # Tired of telega.el runtime breakages through tdlib - # incompatibility. Target to make that a build failure instead. - tdlibCheck = - let - tgEmacs = emacsWithPackages(epkgs: [ (currentTelega epkgs) ]); - verifyTdlibVersion = builtins.toFile "verify-tdlib-version.el" '' - (require 'telega) - (defvar tdlib-version "${pkgs.tdlib.version}") - (when (or (version< tdlib-version - telega-tdlib-min-version) - (and telega-tdlib-max-version - (version< telega-tdlib-max-version - tdlib-version))) - (message "Found TDLib version %s, but require %s to %s" - tdlib-version telega-tdlib-min-version telega-tdlib-max-version) - (kill-emacs 1)) - ''; - in pkgs.runCommandNoCC "tdlibCheck" {} '' + # Tired of telega.el runtime breakages through tdlib + # incompatibility. Target to make that a build failure instead. + tdlibCheck = + let + tgEmacs = emacsWithPackages (epkgs: [ (currentTelega epkgs) ]); + verifyTdlibVersion = builtins.toFile "verify-tdlib-version.el" '' + (require 'telega) + (defvar tdlib-version "${pkgs.tdlib.version}") + (when (or (version< tdlib-version + telega-tdlib-min-version) + (and telega-tdlib-max-version + (version< telega-tdlib-max-version + tdlib-version))) + (message "Found TDLib version %s, but require %s to %s" + tdlib-version telega-tdlib-min-version telega-tdlib-max-version) + (kill-emacs 1)) + ''; + in + pkgs.runCommandNoCC "tdlibCheck" { } '' + export PATH="${emacsBinPath}:$PATH" + ${tgEmacs}/bin/emacs --script ${verifyTdlibVersion} && touch $out + ''; + in + lib.fix + (self: l: f: pkgs.writeShellScriptBin "tazjins-emacs" '' export PATH="${emacsBinPath}:$PATH" - ${tgEmacs}/bin/emacs --script ${verifyTdlibVersion} && touch $out - ''; -in lib.fix(self: l: f: pkgs.writeShellScriptBin "tazjins-emacs" '' - export PATH="${emacsBinPath}:$PATH" - exec ${tazjinsEmacs f}/bin/emacs \ - --debug-init \ - --no-site-file \ - --no-site-lisp \ - --no-init-file \ - --directory ${./config} ${if l != null then "--directory ${l}" else ""} \ - --eval "(require 'init)" $@ - '' // { - # Call overrideEmacs with a function (pkgs -> pkgs) to modify the - # packages that should be included in this Emacs distribution. - overrideEmacs = f': self l f'; - - # Call withLocalConfig with the path to a *folder* containing a - # `local.el` which provides local system configuration. - withLocalConfig = confDir: self confDir f; - - # Build a derivation that uses the specified local Emacs (i.e. - # built outside of Nix) instead - withLocalEmacs = emacsBin: pkgs.writeShellScriptBin "tazjins-emacs" '' - export PATH="${emacsBinPath}:$PATH" - export EMACSLOADPATH="${(tazjinsEmacs f).deps}/share/emacs/site-lisp:" - exec ${emacsBin} \ + exec ${tazjinsEmacs f}/bin/emacs \ --debug-init \ --no-site-file \ --no-site-lisp \ --no-init-file \ - --directory ${./config} \ - ${if l != null then "--directory ${l}" else ""} \ + --directory ${./config} ${if l != null then "--directory ${l}" else ""} \ --eval "(require 'init)" $@ - ''; + '' // { + # Call overrideEmacs with a function (pkgs -> pkgs) to modify the + # packages that should be included in this Emacs distribution. + overrideEmacs = f': self l f'; + + # Call withLocalConfig with the path to a *folder* containing a + # `local.el` which provides local system configuration. + withLocalConfig = confDir: self confDir f; + + # Build a derivation that uses the specified local Emacs (i.e. + # built outside of Nix) instead + withLocalEmacs = emacsBin: pkgs.writeShellScriptBin "tazjins-emacs" '' + export PATH="${emacsBinPath}:$PATH" + export EMACSLOADPATH="${(tazjinsEmacs f).deps}/share/emacs/site-lisp:" + exec ${emacsBin} \ + --debug-init \ + --no-site-file \ + --no-site-lisp \ + --no-init-file \ + --directory ${./config} \ + ${if l != null then "--directory ${l}" else ""} \ + --eval "(require 'init)" $@ + ''; - # Expose telega/tdlib version check as a target that is built in - # CI. - # - # TODO(tazjin): uncomment when telega works again - inherit tdlibCheck; - # meta.targets = [ "tdlibCheck" ]; - }) null identity -) {} + # Expose telega/tdlib version check as a target that is built in + # CI. + # + # TODO(tazjin): uncomment when telega works again + inherit tdlibCheck; + # meta.targets = [ "tdlibCheck" ]; + }) + null + identity + ) +{ } diff --git a/users/tazjin/homepage/default.nix b/users/tazjin/homepage/default.nix index 2ce1cf632255..0edb75d60933 100644 --- a/users/tazjin/homepage/default.nix +++ b/users/tazjin/homepage/default.nix @@ -35,7 +35,7 @@ let date = post.date; }); - formatDate = defun [ int string ] (date: readFile (runCommandNoCC "date" {} '' + formatDate = defun [ int string ] (date: readFile (runCommandNoCC "date" { } '' date --date='@${toString date}' '+%Y-%m-%d' > $out '')); @@ -67,7 +67,8 @@ let pageEntries = import ./entries.nix; homepage = index ((map postToEntry users.tazjin.blog.posts) ++ pageEntries); atomFeed = import ./feed.nix (args // { inherit entry pageEntries; }); -in runCommandNoCC "website" {} '' +in +runCommandNoCC "website" { } '' mkdir $out cp ${homepage} $out/index.html cp ${atomFeed} $out/feed.atom diff --git a/users/tazjin/homepage/feed.nix b/users/tazjin/homepage/feed.nix index 2a033444e8ba..09bc36341401 100644 --- a/users/tazjin/homepage/feed.nix +++ b/users/tazjin/homepage/feed.nix @@ -23,7 +23,7 @@ let }); allEntries = (with depot.users.tazjin.blog; map (blog.toFeedEntry config) posts) - ++ (map pageEntryToEntry pageEntries); + ++ (map pageEntryToEntry pageEntries); feed = { id = "https://tazj.in/"; @@ -39,4 +39,5 @@ let entries = allEntries; }; -in writeText "feed.atom" (atom-feed.renderFeed feed) +in +writeText "feed.atom" (atom-feed.renderFeed feed) diff --git a/users/tazjin/nixos/camden/default.nix b/users/tazjin/nixos/camden/default.nix index 4b5e4b4872c2..b8b8e25fc3f4 100644 --- a/users/tazjin/nixos/camden/default.nix +++ b/users/tazjin/nixos/camden/default.nix @@ -1,7 +1,8 @@ # This file configures camden.tazj.in, my homeserver. { depot, pkgs, lib, ... }: -config: let +config: +let nginxRedirect = { from, to, acmeHost }: { serverName = from; useACMEHost = acmeHost; @@ -9,18 +10,21 @@ config: let extraConfig = "return 301 https://${to}$request_uri;"; }; -in lib.fix(self: { +in +lib.fix (self: { # Disable the current ACME module and use the old one from 19.09 # instead, until the various regressions have been sorted out. # TODO(tazjin): Remove this once the new ACME module works. disabledModules = [ "security/acme" ]; imports = - let oldChannel = fetchTarball { - # NixOS 19.09 on 2020-10-04 - url = "https://github.com/NixOS/nixpkgs-channels/archive/75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1.tar.gz"; - sha256 = "157c64220lf825ll4c0cxsdwg7cxqdx4z559fdp7kpz0g6p8fhhr"; - }; - in [ + let + oldChannel = fetchTarball { + # NixOS 19.09 on 2020-10-04 + url = "https://github.com/NixOS/nixpkgs-channels/archive/75f4ba05c63be3f147bcc2f7bd4ba1f029cedcb1.tar.gz"; + sha256 = "157c64220lf825ll4c0cxsdwg7cxqdx4z559fdp7kpz0g6p8fhhr"; + }; + in + [ "${depot.path}/ops/modules/quassel.nix" "${depot.path}/ops/modules/smtprelay.nix" "${oldChannel}/nixos/modules/security/acme.nix" @@ -37,8 +41,14 @@ in lib.fix(self: { boot = { initrd = { availableKernelModules = [ - "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" - "rtsx_usb_sdmmc" "r8169" + "ahci" + "xhci_pci" + "usbhid" + "usb_storage" + "sd_mod" + "sdhci_pci" + "rtsx_usb_sdmmc" + "r8169" ]; kernelModules = [ "dm-snapshot" ]; @@ -152,7 +162,7 @@ in lib.fix(self: { }; # Set up a user & group for general git shenanigans - groups.git = {}; + groups.git = { }; users.git = { group = "git"; isSystemUser = true; @@ -220,9 +230,9 @@ in lib.fix(self: { # Forward logs to Google Cloud Platform services.journaldriver = { - enable = true; - logStream = "home"; - googleCloudProject = "tazjins-infrastructure"; + enable = true; + logStream = "home"; + googleCloudProject = "tazjins-infrastructure"; applicationCredentials = "/etc/gcp/key.json"; }; diff --git a/users/tazjin/nixos/frog/default.nix b/users/tazjin/nixos/frog/default.nix index b3c803c87131..b789ab04f3bf 100644 --- a/users/tazjin/nixos/frog/default.nix +++ b/users/tazjin/nixos/frog/default.nix @@ -1,6 +1,7 @@ { depot, lib, pkgs, ... }: -config: let +config: +let inherit (pkgs) lieer; quasselClient = pkgs.quassel.override { @@ -8,7 +9,8 @@ config: let enableDaemon = false; monolithic = false; }; -in lib.fix(self: { +in +lib.fix (self: { imports = [ "${depot.path}/ops/modules/v4l2loopback.nix" ]; @@ -61,8 +63,8 @@ in lib.fix(self: { nix = { maxJobs = 48; - binaryCaches = ["ssh://nix-ssh@whitby.tvl.fyi"]; - binaryCachePublicKeys = ["cache.tvl.fyi:fd+9d1ceCPvDX/xVhcfv8nAa6njEhAGAEe+oGJDEeoc="]; + binaryCaches = [ "ssh://nix-ssh@whitby.tvl.fyi" ]; + binaryCachePublicKeys = [ "cache.tvl.fyi:fd+9d1ceCPvDX/xVhcfv8nAa6njEhAGAEe+oGJDEeoc=" ]; }; networking = { diff --git a/users/tazjin/nixos/tverskoy/default.nix b/users/tazjin/nixos/tverskoy/default.nix index 24a4a2d49122..f19501362ab5 100644 --- a/users/tazjin/nixos/tverskoy/default.nix +++ b/users/tazjin/nixos/tverskoy/default.nix @@ -1,6 +1,7 @@ { depot, lib, pkgs, ... }: -config: let +config: +let quasselClient = pkgs.quassel.override { client = true; enableDaemon = false; @@ -15,7 +16,8 @@ config: let ${pkgs.xorg.setxkbmap}/bin/setxkbmap -option caps:super exec ${pkgs.xsecurelock}/bin/xsecurelock ''; -in lib.fix(self: { +in +lib.fix (self: { imports = [ "${depot.third_party.impermanence}/nixos.nix" "${pkgs.home-manager.src}/nixos" @@ -43,7 +45,7 @@ in lib.fix(self: { }; fileSystems = { - "/" = { + "/" = { device = "tmpfs"; fsType = "tmpfs"; options = [ "defaults" "size=8G" "mode=755" ]; @@ -320,109 +322,109 @@ in lib.fix(self: { zoxide ]); - systemd.user.services.lieer-tazjin = { - description = "Synchronise mail@tazj.in via lieer"; - script = "${pkgs.lieer}/bin/gmi sync"; + systemd.user.services.lieer-tazjin = { + description = "Synchronise mail@tazj.in via lieer"; + script = "${pkgs.lieer}/bin/gmi sync"; - serviceConfig = { - WorkingDirectory = "%h/mail/account.tazjin"; - Type = "oneshot"; - }; + serviceConfig = { + WorkingDirectory = "%h/mail/account.tazjin"; + Type = "oneshot"; }; + }; - systemd.user.timers.lieer-tazjin = { - wantedBy = [ "timers.target" ]; + systemd.user.timers.lieer-tazjin = { + wantedBy = [ "timers.target" ]; - timerConfig = { - OnActiveSec = "1"; - OnUnitActiveSec = "180"; - }; + timerConfig = { + OnActiveSec = "1"; + OnUnitActiveSec = "180"; }; + }; - home-manager.useGlobalPkgs = true; - home-manager.users.tazjin = { config, lib, ... }: { - imports = [ "${depot.third_party.impermanence}/home-manager.nix" ]; - - home.persistence."/persist/tazjin/home" = { - allowOther = true; - - directories = [ - ".cargo" - ".config/audacity" - ".config/google-chrome" - ".config/quassel-irc.org" - ".config/spotify" - ".config/syncthing" - ".elfeed" - ".gnupg" - ".local/share/Steam" - ".local/share/audacity" - ".local/share/direnv" - ".local/share/fish" - ".local/share/keyrings" - ".local/share/zoxide" - ".mozilla/firefox" - ".password-store" - ".rustup" - ".ssh" - ".steam" - ".telega" - "go" - "mail" - ]; - - files = [ - ".notmuch-config" - ]; - }; + home-manager.useGlobalPkgs = true; + home-manager.users.tazjin = { config, lib, ... }: { + imports = [ "${depot.third_party.impermanence}/home-manager.nix" ]; + + home.persistence."/persist/tazjin/home" = { + allowOther = true; + + directories = [ + ".cargo" + ".config/audacity" + ".config/google-chrome" + ".config/quassel-irc.org" + ".config/spotify" + ".config/syncthing" + ".elfeed" + ".gnupg" + ".local/share/Steam" + ".local/share/audacity" + ".local/share/direnv" + ".local/share/fish" + ".local/share/keyrings" + ".local/share/zoxide" + ".mozilla/firefox" + ".password-store" + ".rustup" + ".ssh" + ".steam" + ".telega" + "go" + "mail" + ]; - home.activation.screenshots = lib.hm.dag.entryAnywhere '' - $DRY_RUN_CMD mkdir -p $HOME/screenshots - ''; + files = [ + ".notmuch-config" + ]; + }; - programs.git = { - enable = true; - userName = "Vincent Ambo"; - userEmail = "mail@tazj.in"; - extraConfig = { - pull.rebase = true; - init.defaultBranch = "canon"; - }; - }; + home.activation.screenshots = lib.hm.dag.entryAnywhere '' + $DRY_RUN_CMD mkdir -p $HOME/screenshots + ''; - programs.fish = { - enable = true; - interactiveShellInit = '' - ${pkgs.zoxide}/bin/zoxide init fish | source - ''; + programs.git = { + enable = true; + userName = "Vincent Ambo"; + userEmail = "mail@tazj.in"; + extraConfig = { + pull.rebase = true; + init.defaultBranch = "canon"; }; + }; - services.screen-locker = { - enable = true; - enableDetectSleep = true; - inactiveInterval = 10; # minutes - lockCmd = "${screenLock}/bin/tazjin-screen-lock"; - }; + programs.fish = { + enable = true; + interactiveShellInit = '' + ${pkgs.zoxide}/bin/zoxide init fish | source + ''; + }; - services.picom = { - enable = true; - vSync = true; - backend = "glx"; - }; + services.screen-locker = { + enable = true; + enableDetectSleep = true; + inactiveInterval = 10; # minutes + lockCmd = "${screenLock}/bin/tazjin-screen-lock"; + }; - # Enable the dunst notification daemon, but force the - # configuration file separately instead of going via the strange - # Nix->dunstrc encoding route. - services.dunst.enable = true; - xdg.configFile."dunst/dunstrc" = { - source = depot.users.tazjin.dotfiles.dunstrc; - onChange = '' - ${pkgs.procps}/bin/pkill -u "$USER" ''${VERBOSE+-e} dunst || true - ''; - }; + services.picom = { + enable = true; + vSync = true; + backend = "glx"; + }; - systemd.user.startServices = true; + # Enable the dunst notification daemon, but force the + # configuration file separately instead of going via the strange + # Nix->dunstrc encoding route. + services.dunst.enable = true; + xdg.configFile."dunst/dunstrc" = { + source = depot.users.tazjin.dotfiles.dunstrc; + onChange = '' + ${pkgs.procps}/bin/pkill -u "$USER" ''${VERBOSE+-e} dunst || true + ''; }; - system.stateVersion = "20.09"; + systemd.user.startServices = true; + }; + + system.stateVersion = "20.09"; }) diff --git a/users/tazjin/presentations/bootstrapping-2018/default.nix b/users/tazjin/presentations/bootstrapping-2018/default.nix index 0dff14b2a1a6..2775d0b3fbbb 100644 --- a/users/tazjin/presentations/bootstrapping-2018/default.nix +++ b/users/tazjin/presentations/bootstrapping-2018/default.nix @@ -4,24 +4,26 @@ with pkgs; -let tex = texlive.combine { - inherit (texlive) - beamer - beamertheme-metropolis - etoolbox - euenc - extsizes - fontspec - lualibs - luaotfload - luatex - minted - ms - pgfopts - scheme-basic - translator; -}; -in stdenv.mkDerivation { +let + tex = texlive.combine { + inherit (texlive) + beamer + beamertheme-metropolis + etoolbox + euenc + extsizes + fontspec + lualibs + luaotfload + luatex + minted + ms + pgfopts + scheme-basic + translator; + }; +in +stdenv.mkDerivation { name = "nuug-bootstrapping-slides"; src = ./.; diff --git a/users/wpcarro/assessments/brilliant/default.nix b/users/wpcarro/assessments/brilliant/default.nix index 536e54d3650a..0628679c0127 100644 --- a/users/wpcarro/assessments/brilliant/default.nix +++ b/users/wpcarro/assessments/brilliant/default.nix @@ -12,5 +12,5 @@ depot.users.wpcarro.buildHaskell.program { split rio ]; - ghcExtensions = []; + ghcExtensions = [ ]; } diff --git a/users/wpcarro/buildHaskell/default.nix b/users/wpcarro/buildHaskell/default.nix index 5958b1ea26ae..2f0fd9e1c2d1 100644 --- a/users/wpcarro/buildHaskell/default.nix +++ b/users/wpcarro/buildHaskell/default.nix @@ -2,11 +2,13 @@ { # Create a nix-shell for Haskell development. - shell = { deps }: let - ghc = pkgs.haskellPackages.ghcWithPackages (hpkgs: deps hpkgs); - in pkgs.mkShell { - buildInputs = [ghc]; - }; + shell = { deps }: + let + ghc = pkgs.haskellPackages.ghcWithPackages (hpkgs: deps hpkgs); + in + pkgs.mkShell { + buildInputs = [ ghc ]; + }; # Build a Haskell executable. This assumes a project directory with a # top-level Main.hs. @@ -15,17 +17,19 @@ # - `deps`: A function that accepts `hpkgs` and returns a list of Haskell # - `ghcExtensions`: A list of strings representing the language extensions to # use. - program = { name, srcs, deps, ghcExtensions }: let - ghc = pkgs.haskellPackages.ghcWithPackages (hpkgs: deps hpkgs); - in pkgs.stdenv.mkDerivation { - name = name; - buildInputs = []; - srcs = srcs; - buildPhase = '' - ${ghc}/bin/ghc -Wall Main.hs ${pkgs.lib.concatMapStrings (x: "-X${x} ") ghcExtensions} - ''; - installPhase = '' - mkdir -p $out && mv Main $out/${name} - ''; - }; + program = { name, srcs, deps, ghcExtensions }: + let + ghc = pkgs.haskellPackages.ghcWithPackages (hpkgs: deps hpkgs); + in + pkgs.stdenv.mkDerivation { + name = name; + buildInputs = [ ]; + srcs = srcs; + buildPhase = '' + ${ghc}/bin/ghc -Wall Main.hs ${pkgs.lib.concatMapStrings (x: "-X${x} ") ghcExtensions} + ''; + installPhase = '' + mkdir -p $out && mv Main $out/${name} + ''; + }; } diff --git a/users/wpcarro/ci/pipelines/post-receive.nix b/users/wpcarro/ci/pipelines/post-receive.nix index cb7501bdeacf..09b8990e13e2 100644 --- a/users/wpcarro/ci/pipelines/post-receive.nix +++ b/users/wpcarro/ci/pipelines/post-receive.nix @@ -10,4 +10,5 @@ let label = ":broom: lint secrets"; } ]; -in pkgs.writeText "pipeline.yaml" (toJSON pipeline) +in +pkgs.writeText "pipeline.yaml" (toJSON pipeline) diff --git a/users/wpcarro/clients/monsterpoker/default.nix b/users/wpcarro/clients/monsterpoker/default.nix index 0e079261fb6a..e5dca4bca21c 100644 --- a/users/wpcarro/clients/monsterpoker/default.nix +++ b/users/wpcarro/clients/monsterpoker/default.nix @@ -1,6 +1,6 @@ { depot, pkgs, ... }: -pkgs.runCommandNoCC "monsterpoker.app" {} '' +pkgs.runCommandNoCC "monsterpoker.app" { } '' mkdir -p $out cp ${./index.html} $out/index.html '' diff --git a/users/wpcarro/common.nix b/users/wpcarro/common.nix index 829c3394d1e2..d88b83b9d2b8 100644 --- a/users/wpcarro/common.nix +++ b/users/wpcarro/common.nix @@ -2,7 +2,8 @@ let inherit (depot.users) wpcarro; -in { +in +{ programs = { fish.enable = true; diff --git a/users/wpcarro/configs/default.nix b/users/wpcarro/configs/default.nix index 81ba5b4d48ac..681f976052c7 100644 --- a/users/wpcarro/configs/default.nix +++ b/users/wpcarro/configs/default.nix @@ -3,7 +3,8 @@ let inherit (pkgs) writeShellScript; inherit (pkgs.lib.strings) makeBinPath; -in { +in +{ install = writeShellScript "install-configs" '' cd "$WPCARRO/configs" && ${pkgs.stow}/bin/stow --target="$HOME" . ''; diff --git a/users/wpcarro/emacs/default.nix b/users/wpcarro/emacs/default.nix index c2669f6949e5..b751849eab9c 100644 --- a/users/wpcarro/emacs/default.nix +++ b/users/wpcarro/emacs/default.nix @@ -18,7 +18,8 @@ let pass scrot xorg.xset - ])); + ]) + ); emacsWithPackages = (emacsPackagesGen emacs27).emacsWithPackages; @@ -128,7 +129,7 @@ let makeEnvVars = env: concatStringsSep "\n" (mapAttrsToList (k: v: "export ${k}=\"${v}\"") env); - withEmacsPath = { emacsBin, env ? {}, load ? [] }: + withEmacsPath = { emacsBin, env ? { }, load ? [ ] }: writeShellScriptBin "wpcarros-emacs" '' export XMODIFIERS=emacs export PATH="${emacsBinPath}:$PATH" @@ -143,16 +144,17 @@ let ${concatStringsSep "\n" (map (el: "--load ${el} \\") load)} "$@" ''; -in { +in +{ inherit withEmacsPath; - nixos = { load ? [] }: withEmacsPath { + nixos = { load ? [ ] }: withEmacsPath { inherit load; emacsBin = "${wpcarrosEmacs}/bin/emacs"; }; # Script that asserts my Emacs can initialize without warnings or errors. - check = runCommand "check-emacs" {} '' + check = runCommand "check-emacs" { } '' # Even though Buildkite defines this, I'd still like still be able to test # this locally without depending on my ability to remember to set CI=true. export CI=true diff --git a/users/wpcarro/haskell-file/shell.nix b/users/wpcarro/haskell-file/shell.nix index 7682e8246cac..0c6a298bf2b0 100644 --- a/users/wpcarro/haskell-file/shell.nix +++ b/users/wpcarro/haskell-file/shell.nix @@ -1,5 +1,5 @@ { depot, ... }: depot.users.wpcarro.buildHaskell.shell { - deps = hpkgs: []; + deps = hpkgs: [ ]; } diff --git a/users/wpcarro/nixos/diogenes/default.nix b/users/wpcarro/nixos/diogenes/default.nix index d1246de4f34f..f92de19d18bf 100644 --- a/users/wpcarro/nixos/diogenes/default.nix +++ b/users/wpcarro/nixos/diogenes/default.nix @@ -4,7 +4,8 @@ let inherit (depot.users) wpcarro; name = "diogenes"; domainName = "billandhiscomputer.com"; -in wpcarro.terraform.googleCloudVM { +in +wpcarro.terraform.googleCloudVM { project = "wpcarros-infrastructure"; name = "diogenes"; region = "us-central1"; @@ -23,7 +24,7 @@ in wpcarro.terraform.googleCloudVM { type = "A"; ttl = 300; # 5m managed_zone = "\${google_dns_managed_zone.${name}.name}"; - rrdatas = ["\${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip}"]; + rrdatas = [ "\${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip}" ]; }; resource.google_compute_instance."${name}" = { @@ -43,7 +44,7 @@ in wpcarro.terraform.googleCloudVM { type = "A"; ttl = 300; # 5m managed_zone = "\${google_dns_managed_zone.monsterpoker.name}"; - rrdatas = ["\${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip}"]; + rrdatas = [ "\${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip}" ]; }; }; @@ -54,9 +55,9 @@ in wpcarro.terraform.googleCloudVM { networking = { firewall.allowedTCPPorts = [ - 22 # ssh - 80 # http - 443 # https + 22 # ssh + 80 # http + 443 # https 6698 # quassel ]; firewall.allowedUDPPortRanges = [ diff --git a/users/wpcarro/nixos/marcus/default.nix b/users/wpcarro/nixos/marcus/default.nix index 1de320f10c20..a84d33ead75b 100644 --- a/users/wpcarro/nixos/marcus/default.nix +++ b/users/wpcarro/nixos/marcus/default.nix @@ -13,7 +13,8 @@ let enableDaemon = false; monolithic = false; }; -in { +in +{ imports = [ (depot.path + "/users/wpcarro/nixos/marcus/hardware.nix") "${pkgs.home-manager.src}/nixos" diff --git a/users/wpcarro/nixos/marcus/hardware.nix b/users/wpcarro/nixos/marcus/hardware.nix index a5735bc8e22b..cd80685abe13 100644 --- a/users/wpcarro/nixos/marcus/hardware.nix +++ b/users/wpcarro/nixos/marcus/hardware.nix @@ -6,9 +6,9 @@ ]; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = []; + boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = []; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/disk/by-uuid/b8b911ee-e9b9-40ea-89d6-551f11350e7b"; diff --git a/users/wpcarro/playbooks/nix_gcr/cloud_run.nix b/users/wpcarro/playbooks/nix_gcr/cloud_run.nix index 3d981611817b..1f473b5f59fa 100644 --- a/users/wpcarro/playbooks/nix_gcr/cloud_run.nix +++ b/users/wpcarro/playbooks/nix_gcr/cloud_run.nix @@ -4,7 +4,7 @@ pkgs.dockerTools.buildLayeredImage { name = "gemma"; tag = "latest"; config.ExposedPorts = { - "4242" = {}; + "4242" = { }; }; config.Env = [ "GEMMA_CONFIG=${./config.lisp}" diff --git a/users/wpcarro/scratch/blockchain/default.nix b/users/wpcarro/scratch/blockchain/default.nix index 745e7a5ab490..c02f9a9c8108 100644 --- a/users/wpcarro/scratch/blockchain/default.nix +++ b/users/wpcarro/scratch/blockchain/default.nix @@ -2,7 +2,8 @@ let pypkgs = pkgs.python3Packages; -in pkgs.python3Packages.buildPythonApplication { +in +pkgs.python3Packages.buildPythonApplication { pname = "main"; src = ./.; version = "0.0.1"; diff --git a/users/wpcarro/scratch/groceries/shell.nix b/users/wpcarro/scratch/groceries/shell.nix index 7682e8246cac..0c6a298bf2b0 100644 --- a/users/wpcarro/scratch/groceries/shell.nix +++ b/users/wpcarro/scratch/groceries/shell.nix @@ -1,5 +1,5 @@ { depot, ... }: depot.users.wpcarro.buildHaskell.shell { - deps = hpkgs: []; + deps = hpkgs: [ ]; } diff --git a/users/wpcarro/scratch/picoctf/challenge_166/shell.nix b/users/wpcarro/scratch/picoctf/challenge_166/shell.nix index 07a3a2e281b4..85d3865a51bf 100644 --- a/users/wpcarro/scratch/picoctf/challenge_166/shell.nix +++ b/users/wpcarro/scratch/picoctf/challenge_166/shell.nix @@ -1,7 +1,8 @@ { pkgs, ... }: let - python =pkgs.python3.withPackages (pypkgs: with pypkgs; [ + python = pkgs.python3.withPackages (pypkgs: with pypkgs; [ cryptography ]); -in python.env +in +python.env diff --git a/users/wpcarro/terraform/default.nix b/users/wpcarro/terraform/default.nix index be35785a54d0..d73d46dbf91e 100644 --- a/users/wpcarro/terraform/default.nix +++ b/users/wpcarro/terraform/default.nix @@ -7,179 +7,183 @@ let images = import "${pkgs.path}/nixos/modules/virtualisation/gce-images.nix"; nixosImage = images."20.09"; -in { - googleCloudVM = { - project, - name, - region, - zone, - configuration, - extraConfig ? {}, - }: let - inherit (configuration.users.users) root; - inherit (configuration.networking) firewall; - - # Convert NixOS-style port numbers to Terraform-style. - asStrings = xs: map toString xs; - asRanges = xs: map (x: "${toString x.from}-${toString x.to}") xs; - - sshKeys = concatStringsSep "\n" - (map (key: "root:${key}") root.openssh.authorizedKeys.keys); - - os = depot.ops.nixos.nixosFor (_: { - imports = [ - "${pkgs.path}/nixos/modules/virtualisation/google-compute-image.nix" - configuration - ]; - - networking.hostName = name; - - fileSystems."/nix" = { - device = "/dev/disk/by-label/google-${name}-disk"; - fsType = "ext4"; +in +{ + googleCloudVM = + { project + , name + , region + , zone + , configuration + , extraConfig ? { } + , + }: + let + inherit (configuration.users.users) root; + inherit (configuration.networking) firewall; + + # Convert NixOS-style port numbers to Terraform-style. + asStrings = xs: map toString xs; + asRanges = xs: map (x: "${toString x.from}-${toString x.to}") xs; + + sshKeys = concatStringsSep "\n" + (map (key: "root:${key}") root.openssh.authorizedKeys.keys); + + os = depot.ops.nixos.nixosFor (_: { + imports = [ + "${pkgs.path}/nixos/modules/virtualisation/google-compute-image.nix" + configuration + ]; + + networking.hostName = name; + + fileSystems."/nix" = { + device = "/dev/disk/by-label/google-${name}-disk"; + fsType = "ext4"; + }; + }); + + osRoot = os.config.system.build.toplevel; + osPath = unsafeDiscardStringContext (toString osRoot.outPath); + drvPath = unsafeDiscardStringContext (toString osRoot.drvPath); + in + writeText "terraform.tf.json" (toJSON (lib.recursiveUpdate extraConfig { + provider.google = { + inherit project region zone; }; - }); - - osRoot = os.config.system.build.toplevel; - osPath = unsafeDiscardStringContext (toString osRoot.outPath); - drvPath = unsafeDiscardStringContext (toString osRoot.drvPath); - in writeText "terraform.tf.json" (toJSON (lib.recursiveUpdate extraConfig { - provider.google = { - inherit project region zone; - }; - - resource.google_compute_instance."${name}" = { - inherit name zone; - machine_type = "e2-standard-2"; - - tags = [ - "http-server" - "https-server" - "${name}-firewall" - ]; - - boot_disk = { - device_name = "boot"; - initialize_params = { - size = 10; - image = "projects/nixos-cloud/global/images/${nixosImage.name}"; + + resource.google_compute_instance."${name}" = { + inherit name zone; + machine_type = "e2-standard-2"; + + tags = [ + "http-server" + "https-server" + "${name}-firewall" + ]; + + boot_disk = { + device_name = "boot"; + initialize_params = { + size = 10; + image = "projects/nixos-cloud/global/images/${nixosImage.name}"; + }; + }; + + attached_disk = { + source = "\${google_compute_disk.${name}.id}"; + device_name = "${name}-disk"; + }; + + network_interface = { + network = "default"; + subnetwork = "default"; + access_config = { }; + }; + + # Copy root's SSH keys from the NixOS configuration and expose them to the + # metadata server. + metadata = { + inherit sshKeys; + ssh-keys = sshKeys; + + # NixOS's fetch-instance-ssh-keys.bash relies on these fields being + # available on the metadata server. + ssh_host_ed25519_key = "\${tls_private_key.${name}.private_key_pem}"; + ssh_host_ed25519_key_pub = "\${tls_private_key.${name}.public_key_pem}"; + + # Even though we have SSH access, having oslogin can still be useful for + # troubleshooting in the browser if for some reason SSH isn't working as + # expected. + enable-oslogin = "TRUE"; }; + + service_account.scopes = [ "cloud-platform" ]; }; - - attached_disk = { - source = "\${google_compute_disk.${name}.id}"; - device_name = "${name}-disk"; + + resource.tls_private_key."${name}" = { + algorithm = "ECDSA"; + ecdsa_curve = "P384"; }; - - network_interface = { + + resource.google_compute_firewall."${name}" = { + name = "${name}-firewall"; network = "default"; - subnetwork = "default"; - access_config = {}; - }; - - # Copy root's SSH keys from the NixOS configuration and expose them to the - # metadata server. - metadata = { - inherit sshKeys; - ssh-keys = sshKeys; - - # NixOS's fetch-instance-ssh-keys.bash relies on these fields being - # available on the metadata server. - ssh_host_ed25519_key = "\${tls_private_key.${name}.private_key_pem}"; - ssh_host_ed25519_key_pub = "\${tls_private_key.${name}.public_key_pem}"; - - # Even though we have SSH access, having oslogin can still be useful for - # troubleshooting in the browser if for some reason SSH isn't working as - # expected. - enable-oslogin = "TRUE"; - }; - - service_account.scopes = ["cloud-platform"]; - }; - - resource.tls_private_key."${name}" = { - algorithm = "ECDSA"; - ecdsa_curve = "P384"; - }; - - resource.google_compute_firewall."${name}" = { - name = "${name}-firewall"; - network = "default"; - - # Read the firewall configuration from the NixOS configuration. - allow = [ - { - protocol = "tcp"; - ports = concatLists [ - (asStrings (firewall.allowedTCPPorts or [])) - (asRanges (firewall.allowedTCPPortRanges or [])) - ]; - } - { - protocol = "udp"; - ports = concatLists [ - (asStrings (firewall.allowedUDPPorts or [])) - (asRanges (firewall.allowedUDPPortRanges or [])) - ]; - } - ]; - source_ranges = ["0.0.0.0/0"]; - }; - - resource.google_compute_disk."${name}" = { - inherit zone; - name = "${name}-disk"; - size = 100; - }; - - resource.null_resource.deploy_nixos = { - triggers = { - # Redeploy when the NixOS configuration changes. - os = "${osPath}"; - # Redeploy when a new machine is provisioned. - machine_id = "\${google_compute_instance.${name}.id}"; + + # Read the firewall configuration from the NixOS configuration. + allow = [ + { + protocol = "tcp"; + ports = concatLists [ + (asStrings (firewall.allowedTCPPorts or [ ])) + (asRanges (firewall.allowedTCPPortRanges or [ ])) + ]; + } + { + protocol = "udp"; + ports = concatLists [ + (asStrings (firewall.allowedUDPPorts or [ ])) + (asRanges (firewall.allowedUDPPortRanges or [ ])) + ]; + } + ]; + source_ranges = [ "0.0.0.0/0" ]; }; - connection = { - host = "\${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip}"; + resource.google_compute_disk."${name}" = { + inherit zone; + name = "${name}-disk"; + size = 100; }; - provisioner = [ - { remote-exec.inline = ["true"]; } - { - local-exec.command = '' - export PATH="${pkgs.openssh}/bin:$PATH" - - scratch="$(mktemp -d)" - function cleanup() { - rm -rf $scratch - } - trap cleanup EXIT - - # write out ssh key - echo -n "''${tls_private_key.${name}.private_key_pem}" > $scratch/id_rsa.pem - chmod 0600 $scratch/id_rsa.pem - - export NIX_SSHOPTS="\ - -o StrictHostKeyChecking=no\ - -o UserKnownHostsFile=/dev/null\ - -o GlobalKnownHostsFile=/dev/null\ - -o IdentityFile=$scratch/id_rsa.pem - " - - nix-build ${drvPath} - nix-copy-closure --to \ - root@''${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip} \ - ${osPath} --gzip --use-substitutes - ''; - } - { - remote-exec.inline = [ - "nix-env --profile /nix/var/nix/profiles/system --set ${osPath}" - "${osPath}/bin/switch-to-configuration switch" - ]; - } - ]; - }; - })); + resource.null_resource.deploy_nixos = { + triggers = { + # Redeploy when the NixOS configuration changes. + os = "${osPath}"; + # Redeploy when a new machine is provisioned. + machine_id = "\${google_compute_instance.${name}.id}"; + }; + + connection = { + host = "\${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip}"; + }; + + provisioner = [ + { remote-exec.inline = [ "true" ]; } + { + local-exec.command = '' + export PATH="${pkgs.openssh}/bin:$PATH" + + scratch="$(mktemp -d)" + function cleanup() { + rm -rf $scratch + } + trap cleanup EXIT + + # write out ssh key + echo -n "''${tls_private_key.${name}.private_key_pem}" > $scratch/id_rsa.pem + chmod 0600 $scratch/id_rsa.pem + + export NIX_SSHOPTS="\ + -o StrictHostKeyChecking=no\ + -o UserKnownHostsFile=/dev/null\ + -o GlobalKnownHostsFile=/dev/null\ + -o IdentityFile=$scratch/id_rsa.pem + " + + nix-build ${drvPath} + nix-copy-closure --to \ + root@''${google_compute_instance.${name}.network_interface[0].access_config[0].nat_ip} \ + ${osPath} --gzip --use-substitutes + ''; + } + { + remote-exec.inline = [ + "nix-env --profile /nix/var/nix/profiles/system --set ${osPath}" + "${osPath}/bin/switch-to-configuration switch" + ]; + } + ]; + }; + })); } diff --git a/users/wpcarro/tools/monzo_ynab/job.nix b/users/wpcarro/tools/monzo_ynab/job.nix index c2c8baab3b45..f710b73cefdb 100644 --- a/users/wpcarro/tools/monzo_ynab/job.nix +++ b/users/wpcarro/tools/monzo_ynab/job.nix @@ -2,7 +2,8 @@ let inherit (depot.users.wpcarro) gopkgs; -in depot.nix.buildGo.program { +in +depot.nix.buildGo.program { name = "job"; srcs = [ ./main.go diff --git a/users/wpcarro/tools/monzo_ynab/tokens.nix b/users/wpcarro/tools/monzo_ynab/tokens.nix index b58c272bde02..4e2761bc7882 100644 --- a/users/wpcarro/tools/monzo_ynab/tokens.nix +++ b/users/wpcarro/tools/monzo_ynab/tokens.nix @@ -12,7 +12,8 @@ let utils ]; }; -in depot.nix.buildGo.program { +in +depot.nix.buildGo.program { name = "token-server"; srcs = [ ./tokens.go diff --git a/users/wpcarro/tools/rfcToKindle/default.nix b/users/wpcarro/tools/rfcToKindle/default.nix index 4ea271943950..ca87abdee012 100644 --- a/users/wpcarro/tools/rfcToKindle/default.nix +++ b/users/wpcarro/tools/rfcToKindle/default.nix @@ -7,5 +7,5 @@ depot.nix.buildGo.program { srcs = [ ./main.go ]; - deps = []; + deps = [ ]; } diff --git a/users/wpcarro/tools/symlinkManager/default.nix b/users/wpcarro/tools/symlinkManager/default.nix index 4e261d730932..7d022828ee97 100644 --- a/users/wpcarro/tools/symlinkManager/default.nix +++ b/users/wpcarro/tools/symlinkManager/default.nix @@ -2,7 +2,8 @@ let inherit (depot.users.wpcarro) gopkgs; -in depot.nix.buildGo.program { +in +depot.nix.buildGo.program { name = "symlink-mgr"; srcs = [ ./main.go diff --git a/users/wpcarro/tools/url-blocker/default.nix b/users/wpcarro/tools/url-blocker/default.nix index 943644e5f542..ae24aa41b7ca 100644 --- a/users/wpcarro/tools/url-blocker/default.nix +++ b/users/wpcarro/tools/url-blocker/default.nix @@ -12,11 +12,11 @@ let name = "url-blocker"; src = builtins.path { path = ./.; name = "url-blocker"; }; buildPhase = '' - ${ghc}/bin/ghc Main.hs - ''; + ${ghc}/bin/ghc Main.hs + ''; installPhase = '' - mv ./Main $out - ''; + mv ./Main $out + ''; }; # This is the systemd timer unit. @@ -26,8 +26,9 @@ let systemd = { timers.simple-timer = { wantedBy = [ "timers.target" ]; - partOf = []; + partOf = [ ]; }; }; }; -in null +in +null diff --git a/users/wpcarro/utils/builder.nix b/users/wpcarro/utils/builder.nix index 45e783cf0ba8..2bc061d3661b 100644 --- a/users/wpcarro/utils/builder.nix +++ b/users/wpcarro/utils/builder.nix @@ -2,7 +2,8 @@ let inherit (pkgs) writeShellScriptBin; -in { +in +{ # Create a derivation that creates an executable shell script named `as` that # calls the program located at `path`, forwarding all of the arguments. wrapNonNixProgram = { path, as }: writeShellScriptBin as '' diff --git a/users/wpcarro/utils/default.nix b/users/wpcarro/utils/default.nix index 59aa322076b4..46d30acfa24e 100644 --- a/users/wpcarro/utils/default.nix +++ b/users/wpcarro/utils/default.nix @@ -8,7 +8,8 @@ args@{ pkgs, ... }: let builder = import ./builder.nix args; - fs = import ./fs.nix args; -in { + fs = import ./fs.nix args; +in +{ inherit builder fs; } diff --git a/users/wpcarro/utils/fs.nix b/users/wpcarro/utils/fs.nix index 6305e705b141..d7d5e34e991b 100644 --- a/users/wpcarro/utils/fs.nix +++ b/users/wpcarro/utils/fs.nix @@ -5,7 +5,8 @@ let inherit (builtins) attrNames hasAttr map readDir; inherit (pkgs.lib) filterAttrs; -in { +in +{ # Returns a list of all of the regular files in `dir`. files = dir: map (name: dir + "/${name}") @@ -31,11 +32,11 @@ in { if hasAttr name (readDir dir) then dir + "/${name}" else - # This prevents the function from infinitely recursing and eventually - # stack overflowing. + # This prevents the function from infinitely recursing and eventually + # stack overflowing. if (dirOf dir) == dir then null else resolve name (dirOf dir); - }; +}; } diff --git a/users/wpcarro/website/blog/default.nix b/users/wpcarro/website/blog/default.nix index 4ccf200223ce..d87b714b6fe1 100644 --- a/users/wpcarro/website/blog/default.nix +++ b/users/wpcarro/website/blog/default.nix @@ -17,7 +17,7 @@ let posts = sort (x: y: x.date > y.date) (filter includePost (list post (import ./posts.nix))); - rendered = pkgs.runCommandNoCC "blog-posts" {} '' + rendered = pkgs.runCommandNoCC "blog-posts" { } '' mkdir -p $out ${lib.concatStringsSep "\n" (map (post: @@ -25,7 +25,7 @@ let ) posts)} ''; - formatDate = date: readFile (pkgs.runCommandNoCC "date" {} '' + formatDate = date: readFile (pkgs.runCommandNoCC "date" { } '' date --date='@${toString date}' '+%B %e, %Y' > $out ''); @@ -38,7 +38,8 @@ let postTitle = post.title; postDate = formatDate post.date; }); -in pkgs.runCommandNoCC "blog" {} '' +in +pkgs.runCommandNoCC "blog" { } '' mkdir -p $out cp ${withBrand (readFile postsHtml)} $out/index.html cp -r ${rendered} $out/posts diff --git a/users/wpcarro/website/default.nix b/users/wpcarro/website/default.nix index 9694aad17d60..19229aab5a35 100644 --- a/users/wpcarro/website/default.nix +++ b/users/wpcarro/website/default.nix @@ -8,11 +8,11 @@ let globalVars = { inherit domain; - homepage = "https://${domain}/"; - blog = "https://${domain}/blog"; - habits = "https://${domain}/habits"; - github = "https://github.com/wpcarro"; - linkedin = "https://linkedin.com/in/williampatrickcarroll"; + homepage = "https://${domain}/"; + blog = "https://${domain}/blog"; + habits = "https://${domain}/habits"; + github = "https://github.com/wpcarro"; + linkedin = "https://linkedin.com/in/williampatrickcarroll"; depotWork = "https://cs.tvl.fyi/depot/-/blob/users/wpcarro"; }; @@ -23,10 +23,11 @@ let withBrand = contentHtml: renderTemplate ./fragments/template.html { inherit contentHtml; }; -in { +in +{ inherit domain renderTemplate withBrand; - root = pkgs.runCommandNoCC "wpcarro.dev" {} '' + root = pkgs.runCommandNoCC "wpcarro.dev" { } '' mkdir -p $out # / diff --git a/users/wpcarro/website/habit-screens/default.nix b/users/wpcarro/website/habit-screens/default.nix index 345e6f010d48..3036ba1821cb 100644 --- a/users/wpcarro/website/habit-screens/default.nix +++ b/users/wpcarro/website/habit-screens/default.nix @@ -8,7 +8,7 @@ let , src , name , srcdir ? "./src" - , targets ? [] + , targets ? [ ] , registryDat ? ./registry.dat , outputJavaScript ? false }: @@ -24,33 +24,36 @@ let inherit registryDat; }; - installPhase = let - elmfile = module: "${srcdir}/${builtins.replaceStrings ["."] ["/"] module}.elm"; - extension = if outputJavaScript then "js" else "html"; - in '' - mkdir -p $out/share/doc - ${lib.concatStrings (map (module: '' - echo "compiling ${elmfile module}" - elm make ${elmfile module} --output $out/${module}.${extension} --docs $out/share/doc/${module}.json - ${lib.optionalString outputJavaScript '' - echo "minifying ${elmfile module}" - uglifyjs $out/${module}.${extension} --compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' \ - | uglifyjs --mangle --output $out/${module}.min.${extension} - ''} - '') targets)} - ''; + installPhase = + let + elmfile = module: "${srcdir}/${builtins.replaceStrings ["."] ["/"] module}.elm"; + extension = if outputJavaScript then "js" else "html"; + in + '' + mkdir -p $out/share/doc + ${lib.concatStrings (map (module: '' + echo "compiling ${elmfile module}" + elm make ${elmfile module} --output $out/${module}.${extension} --docs $out/share/doc/${module}.json + ${lib.optionalString outputJavaScript '' + echo "minifying ${elmfile module}" + uglifyjs $out/${module}.${extension} --compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' \ + | uglifyjs --mangle --output $out/${module}.min.${extension} + ''} + '') targets)} + ''; }; mainDotElm = mkDerivation { name = "elm-app-0.1.0"; srcs = ./elm-srcs.nix; src = ./.; - targets = ["Main"]; + targets = [ "Main" ]; srcdir = "./src"; outputJavaScript = true; }; -in stdenv.mkDerivation { +in +stdenv.mkDerivation { name = "habit-screens"; - buildInputs = []; + buildInputs = [ ]; src = builtins.path { path = ./.; name = "habit-screens"; }; buildPhase = '' mkdir -p $out diff --git a/users/wpcarro/website/habit-screens/elm-srcs.nix b/users/wpcarro/website/habit-screens/elm-srcs.nix index 167708e072b0..7f6f77741a9c 100644 --- a/users/wpcarro/website/habit-screens/elm-srcs.nix +++ b/users/wpcarro/website/habit-screens/elm-srcs.nix @@ -1,77 +1,77 @@ { - "elm-community/maybe-extra" = { - sha256 = "0qslmgswa625d218djd3p62pnqcrz38f5p558mbjl6kc1ss0kzv3"; - version = "5.2.0"; - }; + "elm-community/maybe-extra" = { + sha256 = "0qslmgswa625d218djd3p62pnqcrz38f5p558mbjl6kc1ss0kzv3"; + version = "5.2.0"; + }; - "elm/html" = { - sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k"; - version = "1.0.0"; - }; + "elm/html" = { + sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k"; + version = "1.0.0"; + }; - "elm-community/random-extra" = { - sha256 = "1dg2nz77w2cvp16xazbdsxkkw0xc9ycqpkd032faqdyky6gmz9g6"; - version = "3.1.0"; - }; + "elm-community/random-extra" = { + sha256 = "1dg2nz77w2cvp16xazbdsxkkw0xc9ycqpkd032faqdyky6gmz9g6"; + version = "3.1.0"; + }; - "elm/svg" = { - sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k"; - version = "1.0.1"; - }; + "elm/svg" = { + sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k"; + version = "1.0.1"; + }; - "justinmimbs/date" = { - sha256 = "1f0wcl8yhlvp3x4rj53rdy4r4ga7lkl6n8fdfh6b96scz2rnxmd4"; - version = "3.2.1"; - }; + "justinmimbs/date" = { + sha256 = "1f0wcl8yhlvp3x4rj53rdy4r4ga7lkl6n8fdfh6b96scz2rnxmd4"; + version = "3.2.1"; + }; - "elm/browser" = { - sha256 = "0nagb9ajacxbbg985r4k9h0jadqpp0gp84nm94kcgbr5sf8i9x13"; - version = "1.0.2"; - }; + "elm/browser" = { + sha256 = "0nagb9ajacxbbg985r4k9h0jadqpp0gp84nm94kcgbr5sf8i9x13"; + version = "1.0.2"; + }; - "elm/core" = { - sha256 = "19w0iisdd66ywjayyga4kv2p1v9rxzqjaxhckp8ni6n8i0fb2dvf"; - version = "1.0.5"; - }; + "elm/core" = { + sha256 = "19w0iisdd66ywjayyga4kv2p1v9rxzqjaxhckp8ni6n8i0fb2dvf"; + version = "1.0.5"; + }; - "elm-community/list-extra" = { - sha256 = "1ayv3148drynqnxdfwpjxal8vwzgsjqanjg7yxp6lhdcbkxgd3vd"; - version = "8.2.3"; - }; + "elm-community/list-extra" = { + sha256 = "1ayv3148drynqnxdfwpjxal8vwzgsjqanjg7yxp6lhdcbkxgd3vd"; + version = "8.2.3"; + }; - "elm/random" = { - sha256 = "138n2455wdjwa657w6sjq18wx2r0k60ibpc4frhbqr50sncxrfdl"; - version = "1.0.0"; - }; + "elm/random" = { + sha256 = "138n2455wdjwa657w6sjq18wx2r0k60ibpc4frhbqr50sncxrfdl"; + version = "1.0.0"; + }; - "elm/time" = { - sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1"; - version = "1.0.0"; - }; + "elm/time" = { + sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1"; + version = "1.0.0"; + }; - "elm/json" = { - sha256 = "0kjwrz195z84kwywaxhhlnpl3p251qlbm5iz6byd6jky2crmyqyh"; - version = "1.1.3"; - }; + "elm/json" = { + sha256 = "0kjwrz195z84kwywaxhhlnpl3p251qlbm5iz6byd6jky2crmyqyh"; + version = "1.1.3"; + }; - "elm/parser" = { - sha256 = "0a3cxrvbm7mwg9ykynhp7vjid58zsw03r63qxipxp3z09qks7512"; - version = "1.1.0"; - }; + "elm/parser" = { + sha256 = "0a3cxrvbm7mwg9ykynhp7vjid58zsw03r63qxipxp3z09qks7512"; + version = "1.1.0"; + }; - "owanturist/elm-union-find" = { - sha256 = "13gm7msnp0gr1lqia5m7m4lhy3m6kvjg37d304whb3psn88wqhj5"; - version = "1.0.0"; - }; + "owanturist/elm-union-find" = { + sha256 = "13gm7msnp0gr1lqia5m7m4lhy3m6kvjg37d304whb3psn88wqhj5"; + version = "1.0.0"; + }; - "elm/url" = { - sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4"; - version = "1.0.0"; - }; + "elm/url" = { + sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4"; + version = "1.0.0"; + }; - "elm/virtual-dom" = { - sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg"; - version = "1.0.2"; - }; + "elm/virtual-dom" = { + sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg"; + version = "1.0.2"; + }; } diff --git a/users/wpcarro/website/sandbox/learnpianochords/default.nix b/users/wpcarro/website/sandbox/learnpianochords/default.nix index 934fbd70ac17..7cfdf7c45137 100644 --- a/users/wpcarro/website/sandbox/learnpianochords/default.nix +++ b/users/wpcarro/website/sandbox/learnpianochords/default.nix @@ -8,7 +8,7 @@ let , src , name , srcdir ? "./src" - , targets ? [] + , targets ? [ ] , registryDat ? ./registry.dat , outputJavaScript ? false }: @@ -24,33 +24,36 @@ let inherit registryDat; }; - installPhase = let - elmfile = module: "${srcdir}/${builtins.replaceStrings ["."] ["/"] module}.elm"; - extension = if outputJavaScript then "js" else "html"; - in '' - mkdir -p $out/share/doc - ${lib.concatStrings (map (module: '' - echo "compiling ${elmfile module}" - elm make ${elmfile module} --output $out/${module}.${extension} --docs $out/share/doc/${module}.json - ${lib.optionalString outputJavaScript '' - echo "minifying ${elmfile module}" - uglifyjs $out/${module}.${extension} --compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' \ - | uglifyjs --mangle --output $out/${module}.min.${extension} - ''} - '') targets)} - ''; + installPhase = + let + elmfile = module: "${srcdir}/${builtins.replaceStrings ["."] ["/"] module}.elm"; + extension = if outputJavaScript then "js" else "html"; + in + '' + mkdir -p $out/share/doc + ${lib.concatStrings (map (module: '' + echo "compiling ${elmfile module}" + elm make ${elmfile module} --output $out/${module}.${extension} --docs $out/share/doc/${module}.json + ${lib.optionalString outputJavaScript '' + echo "minifying ${elmfile module}" + uglifyjs $out/${module}.${extension} --compress 'pure_funcs="F2,F3,F4,F5,F6,F7,F8,F9,A2,A3,A4,A5,A6,A7,A8,A9",pure_getters,keep_fargs=false,unsafe_comps,unsafe' \ + | uglifyjs --mangle --output $out/${module}.min.${extension} + ''} + '') targets)} + ''; }; mainDotElm = mkDerivation { name = "elm-app-0.1.0"; srcs = ./elm-srcs.nix; src = builtins.path { path = ./.; name = "learnpianochords"; }; - targets = ["Main"]; + targets = [ "Main" ]; srcdir = "./src"; outputJavaScript = true; }; -in stdenv.mkDerivation { +in +stdenv.mkDerivation { name = "learn-piano-chords"; - buildInputs = []; + buildInputs = [ ]; src = builtins.path { path = ./.; name = "learnpianochords"; }; buildPhase = '' mkdir -p $out diff --git a/users/wpcarro/website/sandbox/learnpianochords/elm-srcs.nix b/users/wpcarro/website/sandbox/learnpianochords/elm-srcs.nix index 2823b430f887..c62262e6835a 100644 --- a/users/wpcarro/website/sandbox/learnpianochords/elm-srcs.nix +++ b/users/wpcarro/website/sandbox/learnpianochords/elm-srcs.nix @@ -1,67 +1,67 @@ { - "elm-community/maybe-extra" = { - sha256 = "0qslmgswa625d218djd3p62pnqcrz38f5p558mbjl6kc1ss0kzv3"; - version = "5.2.0"; - }; + "elm-community/maybe-extra" = { + sha256 = "0qslmgswa625d218djd3p62pnqcrz38f5p558mbjl6kc1ss0kzv3"; + version = "5.2.0"; + }; - "elm/html" = { - sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k"; - version = "1.0.0"; - }; + "elm/html" = { + sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k"; + version = "1.0.0"; + }; - "elm-community/random-extra" = { - sha256 = "1dg2nz77w2cvp16xazbdsxkkw0xc9ycqpkd032faqdyky6gmz9g6"; - version = "3.1.0"; - }; + "elm-community/random-extra" = { + sha256 = "1dg2nz77w2cvp16xazbdsxkkw0xc9ycqpkd032faqdyky6gmz9g6"; + version = "3.1.0"; + }; - "elm/svg" = { - sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k"; - version = "1.0.1"; - }; + "elm/svg" = { + sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k"; + version = "1.0.1"; + }; - "elm/browser" = { - sha256 = "0nagb9ajacxbbg985r4k9h0jadqpp0gp84nm94kcgbr5sf8i9x13"; - version = "1.0.2"; - }; + "elm/browser" = { + sha256 = "0nagb9ajacxbbg985r4k9h0jadqpp0gp84nm94kcgbr5sf8i9x13"; + version = "1.0.2"; + }; - "elm/core" = { - sha256 = "19w0iisdd66ywjayyga4kv2p1v9rxzqjaxhckp8ni6n8i0fb2dvf"; - version = "1.0.5"; - }; + "elm/core" = { + sha256 = "19w0iisdd66ywjayyga4kv2p1v9rxzqjaxhckp8ni6n8i0fb2dvf"; + version = "1.0.5"; + }; - "elm-community/list-extra" = { - sha256 = "1ayv3148drynqnxdfwpjxal8vwzgsjqanjg7yxp6lhdcbkxgd3vd"; - version = "8.2.3"; - }; + "elm-community/list-extra" = { + sha256 = "1ayv3148drynqnxdfwpjxal8vwzgsjqanjg7yxp6lhdcbkxgd3vd"; + version = "8.2.3"; + }; - "elm/random" = { - sha256 = "138n2455wdjwa657w6sjq18wx2r0k60ibpc4frhbqr50sncxrfdl"; - version = "1.0.0"; - }; + "elm/random" = { + sha256 = "138n2455wdjwa657w6sjq18wx2r0k60ibpc4frhbqr50sncxrfdl"; + version = "1.0.0"; + }; - "elm/time" = { - sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1"; - version = "1.0.0"; - }; + "elm/time" = { + sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1"; + version = "1.0.0"; + }; - "elm/json" = { - sha256 = "0kjwrz195z84kwywaxhhlnpl3p251qlbm5iz6byd6jky2crmyqyh"; - version = "1.1.3"; - }; + "elm/json" = { + sha256 = "0kjwrz195z84kwywaxhhlnpl3p251qlbm5iz6byd6jky2crmyqyh"; + version = "1.1.3"; + }; - "owanturist/elm-union-find" = { - sha256 = "13gm7msnp0gr1lqia5m7m4lhy3m6kvjg37d304whb3psn88wqhj5"; - version = "1.0.0"; - }; + "owanturist/elm-union-find" = { + sha256 = "13gm7msnp0gr1lqia5m7m4lhy3m6kvjg37d304whb3psn88wqhj5"; + version = "1.0.0"; + }; - "elm/url" = { - sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4"; - version = "1.0.0"; - }; + "elm/url" = { + sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4"; + version = "1.0.0"; + }; - "elm/virtual-dom" = { - sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg"; - version = "1.0.2"; - }; + "elm/virtual-dom" = { + sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg"; + version = "1.0.2"; + }; } |