From aa122cbae78ce97d60c0c98ba14df753d97e40b1 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Sun, 30 Jan 2022 19:06:58 +0300 Subject: style: format entire depot with nixpkgs-fmt 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 Reviewed-by: lukegb Reviewed-by: wpcarro Reviewed-by: Profpatsch Reviewed-by: kanepyork Reviewed-by: tazjin Reviewed-by: cynthia Reviewed-by: edef Reviewed-by: eta Reviewed-by: grfn --- third_party/lisp/bordeaux-threads.nix | 3 ++- third_party/lisp/cl-fad.nix | 4 ++-- third_party/lisp/cl-json.nix | 23 ++++++++++++----------- third_party/lisp/cl-plus-ssl.nix | 14 ++++++++------ third_party/lisp/cl-unicode.nix | 6 +++--- third_party/lisp/cl-yacc.nix | 6 ++++-- third_party/lisp/closure-common.nix | 11 ++++++----- third_party/lisp/easy-routes.nix | 3 ++- third_party/lisp/flexi-streams.nix | 2 +- third_party/lisp/global-vars.nix | 2 +- third_party/lisp/hunchentoot.nix | 5 +++-- third_party/lisp/ironclad.nix | 5 +++-- third_party/lisp/lass.nix | 3 ++- third_party/lisp/lisp-binary.nix | 16 +++++++++------- third_party/lisp/local-time.nix | 3 ++- third_party/lisp/nibbles.nix | 3 ++- third_party/lisp/postmodern.nix | 3 ++- third_party/lisp/routes.nix | 3 ++- third_party/lisp/s-xml/default.nix | 18 ++++++++++-------- third_party/lisp/trivial-ldap.nix | 6 ++++-- third_party/lisp/trivial-mimes.nix | 5 +++-- third_party/lisp/uax-15.nix | 5 +++-- third_party/lisp/unix-opts.nix | 2 +- third_party/lisp/usocket-server.nix | 3 ++- third_party/lisp/usocket.nix | 3 ++- 25 files changed, 91 insertions(+), 66 deletions(-) (limited to 'third_party/lisp') diff --git a/third_party/lisp/bordeaux-threads.nix b/third_party/lisp/bordeaux-threads.nix index 17ee6e539ef8..8a2e09950887 100644 --- a/third_party/lisp/bordeaux-threads.nix +++ b/third_party/lisp/bordeaux-threads.nix @@ -5,7 +5,8 @@ let src = with pkgs; srcOnly lispPackages.bordeaux-threads; getSrc = f: "${src}/src/${f}"; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "bordeaux-threads"; deps = [ depot.third_party.lisp.alexandria ]; diff --git a/third_party/lisp/cl-fad.nix b/third_party/lisp/cl-fad.nix index ec1170bf1661..9350abe2e3a3 100644 --- a/third_party/lisp/cl-fad.nix +++ b/third_party/lisp/cl-fad.nix @@ -1,5 +1,5 @@ # Portable pathname library -{ depot, pkgs, ...}: +{ depot, pkgs, ... }: with depot.nix; @@ -18,7 +18,7 @@ in buildLisp.library { srcs = map (f: src + ("/" + f)) [ "packages.lisp" ] ++ [ - { ccl = "${src}/openmcl.lisp"; } + { ccl = "${src}/openmcl.lisp"; } ] ++ map (f: src + ("/" + f)) [ "fad.lisp" "path.lisp" diff --git a/third_party/lisp/cl-json.nix b/third_party/lisp/cl-json.nix index 5d1450a3e9a1..0230f274afc0 100644 --- a/third_party/lisp/cl-json.nix +++ b/third_party/lisp/cl-json.nix @@ -10,19 +10,20 @@ let rev = "6dfebb9540bfc3cc33582d0c03c9ec27cb913e79"; sha256 = "0fx3m3x3s5ji950yzpazz4s0img3l6b3d6l3jrfjv0lr702496lh"; }; -in buildLisp.library { +in +buildLisp.library { name = "cl-json"; deps = [ (buildLisp.bundled "asdf") ]; srcs = [ "${src}/cl-json.asd" ] ++ - (map (f: src + ("/src/" + f)) [ - "package.lisp" - "common.lisp" - "objects.lisp" - "camel-case.lisp" - "decoder.lisp" - "encoder.lisp" - "utils.lisp" - "json-rpc.lisp" - ]); + (map (f: src + ("/src/" + f)) [ + "package.lisp" + "common.lisp" + "objects.lisp" + "camel-case.lisp" + "decoder.lisp" + "encoder.lisp" + "utils.lisp" + "json-rpc.lisp" + ]); } diff --git a/third_party/lisp/cl-plus-ssl.nix b/third_party/lisp/cl-plus-ssl.nix index bec5d5b3a205..dc0a95944fe7 100644 --- a/third_party/lisp/cl-plus-ssl.nix +++ b/third_party/lisp/cl-plus-ssl.nix @@ -3,12 +3,14 @@ with depot.nix; -let src = pkgs.fetchgit { - url = "https://github.com/cl-plus-ssl/cl-plus-ssl.git"; - rev = "29081992f6d7b4e3aa2c5eeece4cd92b745071f4"; - hash = "sha256:16lyrixl98b7vy29dbbzkbq0xaz789350dajrr1gdny5i55rkjq0"; -}; -in buildLisp.library { +let + src = pkgs.fetchgit { + url = "https://github.com/cl-plus-ssl/cl-plus-ssl.git"; + rev = "29081992f6d7b4e3aa2c5eeece4cd92b745071f4"; + hash = "sha256:16lyrixl98b7vy29dbbzkbq0xaz789350dajrr1gdny5i55rkjq0"; + }; +in +buildLisp.library { name = "cl-plus-ssl"; deps = with depot.third_party.lisp; [ alexandria diff --git a/third_party/lisp/cl-unicode.nix b/third_party/lisp/cl-unicode.nix index 5fff1fbe6bb2..815d99c2dc8e 100644 --- a/third_party/lisp/cl-unicode.nix +++ b/third_party/lisp/cl-unicode.nix @@ -40,7 +40,7 @@ let "char-info.lisp" "read.lisp" ]) ++ [ - (runCommand "dump.lisp" {} '' + (runCommand "dump.lisp" { } '' substitute ${src}/build/dump.lisp $out \ --replace ':defaults *this-file*' ":defaults (uiop:getcwd)" '') @@ -55,7 +55,7 @@ let }; - generated = runCommand "cl-unicode-generated" {} '' + generated = runCommand "cl-unicode-generated" { } '' mkdir -p $out/build mkdir -p $out/test cd $out/build @@ -66,7 +66,7 @@ let in depot.nix.buildLisp.library { name = "cl-unicode"; - deps = [cl-unicode-base]; + deps = [ cl-unicode-base ]; srcs = [ "${src}/conditions.lisp" "${generated}/lists.lisp" diff --git a/third_party/lisp/cl-yacc.nix b/third_party/lisp/cl-yacc.nix index d2ceb81103e2..b40d5d0601b2 100644 --- a/third_party/lisp/cl-yacc.nix +++ b/third_party/lisp/cl-yacc.nix @@ -1,12 +1,14 @@ { depot, pkgs, ... }: -let src = pkgs.fetchFromGitHub { +let + src = pkgs.fetchFromGitHub { owner = "jech"; repo = "cl-yacc"; rev = "1334f5469251ffb3f8738a682dc8ee646cb26635"; sha256 = "16946pzf8vvadnyfayvj8rbh4zjzw90h0azz2qk1mxrvhh5wklib"; }; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "cl-yacc"; srcs = map (f: src + ("/" + f)) [ diff --git a/third_party/lisp/closure-common.nix b/third_party/lisp/closure-common.nix index 0856fc9e52d8..7f7f79f8551b 100644 --- a/third_party/lisp/closure-common.nix +++ b/third_party/lisp/closure-common.nix @@ -3,7 +3,8 @@ let src = with pkgs; srcOnly lispPackages.closure-common; getSrcs = builtins.map (p: "${src}/${p}"); -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "closure-common"; # closure-common.asd surpresses some warnings otherwise breaking @@ -18,12 +19,12 @@ in depot.nix.buildLisp.library { "closure-common.asd" "package.lisp" "definline.lisp" - "characters.lisp" #+rune-is-character + "characters.lisp" #+rune-is-character "syntax.lisp" - "encodings.lisp" #-x&y-streams-are-stream + "encodings.lisp" #-x&y-streams-are-stream "encodings-data.lisp" #-x&y-streams-are-stream - "xstream.lisp" #-x&y-streams-are-stream - "ystream.lisp" #-x&y-streams-are-stream + "xstream.lisp" #-x&y-streams-are-stream + "ystream.lisp" #-x&y-streams-are-stream "hax.lisp" ]; diff --git a/third_party/lisp/easy-routes.nix b/third_party/lisp/easy-routes.nix index 93aed8a66765..5caf8261fa1c 100644 --- a/third_party/lisp/easy-routes.nix +++ b/third_party/lisp/easy-routes.nix @@ -9,7 +9,8 @@ let sha256 = "06lnipwc6mmg0v5gybcnr7wn5xmn5xfd1gs19vbima777245bfka"; }; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "easy-routes"; deps = with depot.third_party.lisp; [ hunchentoot diff --git a/third_party/lisp/flexi-streams.nix b/third_party/lisp/flexi-streams.nix index 4b8880902458..a6a06d4ad057 100644 --- a/third_party/lisp/flexi-streams.nix +++ b/third_party/lisp/flexi-streams.nix @@ -28,6 +28,6 @@ in depot.nix.buildLisp.library { "input.lisp" "io.lisp" "strings.lisp" - ]; + ]; } diff --git a/third_party/lisp/global-vars.nix b/third_party/lisp/global-vars.nix index 0f6630f721de..a3d27a09b6a0 100644 --- a/third_party/lisp/global-vars.nix +++ b/third_party/lisp/global-vars.nix @@ -3,5 +3,5 @@ let src = with pkgs; srcOnly lispPackages.global-vars; in depot.nix.buildLisp.library { name = "global-vars"; - srcs = [ "${src}/global-vars.lisp" ] ; + srcs = [ "${src}/global-vars.lisp" ]; } diff --git a/third_party/lisp/hunchentoot.nix b/third_party/lisp/hunchentoot.nix index 5b953d94b29e..e2480cd349f1 100644 --- a/third_party/lisp/hunchentoot.nix +++ b/third_party/lisp/hunchentoot.nix @@ -1,5 +1,5 @@ # Hunchentoot is a web framework for Common Lisp. -{ depot, pkgs, ...}: +{ depot, pkgs, ... }: let src = with pkgs; srcOnly lispPackages.hunchentoot; @@ -15,7 +15,8 @@ let "url-rewrite.lisp" ]; }; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "hunchentoot"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/ironclad.nix b/third_party/lisp/ironclad.nix index 3436776b7da6..324c5da265d8 100644 --- a/third_party/lisp/ironclad.nix +++ b/third_party/lisp/ironclad.nix @@ -1,4 +1,4 @@ -{ depot, pkgs, ...}: +{ depot, pkgs, ... }: let inherit (pkgs) runCommand; @@ -6,7 +6,8 @@ let src = with pkgs; srcOnly lispPackages.ironclad; getSrc = f: "${src}/src/${f}"; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "ironclad"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/lass.nix b/third_party/lisp/lass.nix index 457e25c7e532..00f66c1fe314 100644 --- a/third_party/lisp/lass.nix +++ b/third_party/lisp/lass.nix @@ -8,7 +8,8 @@ let sha256 = "11mxzyx34ynsfsrs8pgrarqi9s442vkpmh7kdpzvarhj7i97g8yx"; }; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "lass"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/lisp-binary.nix b/third_party/lisp/lisp-binary.nix index 3e7a43b8ac67..8deba4546fe6 100644 --- a/third_party/lisp/lisp-binary.nix +++ b/third_party/lisp/lisp-binary.nix @@ -1,13 +1,15 @@ # A library to easily read and write complex binary formats. { depot, pkgs, ... }: -let src = pkgs.fetchFromGitHub { - owner = "j3pic"; - repo = "lisp-binary"; - rev = "052df578900dea59bf951e0a6749281fa73432e4"; - sha256 = "1i1s5g01aimfq6lndcl1pnw7ly5hdh0wmjp2dj9cjjwbkz9lnwcf"; -}; -in depot.nix.buildLisp.library { +let + src = pkgs.fetchFromGitHub { + owner = "j3pic"; + repo = "lisp-binary"; + rev = "052df578900dea59bf951e0a6749281fa73432e4"; + sha256 = "1i1s5g01aimfq6lndcl1pnw7ly5hdh0wmjp2dj9cjjwbkz9lnwcf"; + }; +in +depot.nix.buildLisp.library { name = "lisp-binary"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/local-time.nix b/third_party/lisp/local-time.nix index 8e96c5e51714..1358408d387c 100644 --- a/third_party/lisp/local-time.nix +++ b/third_party/lisp/local-time.nix @@ -4,7 +4,8 @@ let inherit (depot.nix) buildLisp; src = with pkgs; srcOnly lispPackages.local-time; -in buildLisp.library { +in +buildLisp.library { name = "local-time"; deps = [ depot.third_party.lisp.cl-fad diff --git a/third_party/lisp/nibbles.nix b/third_party/lisp/nibbles.nix index 3c0a75e46dc7..b71f439c939a 100644 --- a/third_party/lisp/nibbles.nix +++ b/third_party/lisp/nibbles.nix @@ -3,7 +3,8 @@ let inherit (depot.nix.buildLisp) bundled; src = with pkgs; srcOnly lispPackages.nibbles; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "nibbles"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/postmodern.nix b/third_party/lisp/postmodern.nix index b2ea318f8a40..25e0625c20bc 100644 --- a/third_party/lisp/postmodern.nix +++ b/third_party/lisp/postmodern.nix @@ -88,6 +88,7 @@ let ]; }; -in postmodern // { +in +postmodern // { inherit s-sql cl-postgres; } diff --git a/third_party/lisp/routes.nix b/third_party/lisp/routes.nix index a76912c651a9..fc7d4e306713 100644 --- a/third_party/lisp/routes.nix +++ b/third_party/lisp/routes.nix @@ -20,7 +20,8 @@ let ]; }; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "routes"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/s-xml/default.nix b/third_party/lisp/s-xml/default.nix index 3cd13ffb6b67..486e1c1ac8d3 100644 --- a/third_party/lisp/s-xml/default.nix +++ b/third_party/lisp/s-xml/default.nix @@ -1,15 +1,17 @@ # XML serialiser for Common Lisp. { depot, pkgs, ... }: -let src = pkgs.applyPatches { - name = "s-xml-source"; - src = pkgs.lispPackages.s-xml.src; +let + src = pkgs.applyPatches { + name = "s-xml-source"; + src = pkgs.lispPackages.s-xml.src; - patches = [ - ./0001-fix-definition-order-in-xml.lisp.patch - ]; -}; -in depot.nix.buildLisp.library { + patches = [ + ./0001-fix-definition-order-in-xml.lisp.patch + ]; + }; +in +depot.nix.buildLisp.library { name = "s-xml"; srcs = map (f: src + ("/src/" + f)) [ diff --git a/third_party/lisp/trivial-ldap.nix b/third_party/lisp/trivial-ldap.nix index c8a27431c687..c85fe2accbb9 100644 --- a/third_party/lisp/trivial-ldap.nix +++ b/third_party/lisp/trivial-ldap.nix @@ -1,12 +1,14 @@ { depot, pkgs, ... }: -let src = pkgs.fetchFromGitHub { +let + src = pkgs.fetchFromGitHub { owner = "rwiker"; repo = "trivial-ldap"; rev = "3b8f1ff85f29ea63e6ab2d0d27029d68b046faf8"; sha256 = "1zaa4wnk5y5ff211pkg6dl27j4pjwh56hq0246slxsdxv6kvp1z9"; }; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "trivial-ldap"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/trivial-mimes.nix b/third_party/lisp/trivial-mimes.nix index 04e8b5ef5d10..b097a3d0ee67 100644 --- a/third_party/lisp/trivial-mimes.nix +++ b/third_party/lisp/trivial-mimes.nix @@ -3,7 +3,7 @@ let src = with pkgs; srcOnly lispPackages.trivial-mimes; - mime-types = pkgs.runCommand "mime-types.lisp" {} '' + mime-types = pkgs.runCommand "mime-types.lisp" { } '' substitute ${src}/mime-types.lisp $out \ --replace /etc/mime.types ${src}/mime.types \ --replace "(asdf:system-source-directory :trivial-mimes)" '"/bogus-dir"' @@ -11,7 +11,8 @@ let # generally fail — we are not using ASDF after all. ''; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "trivial-mimes"; deps = [ diff --git a/third_party/lisp/uax-15.nix b/third_party/lisp/uax-15.nix index 1e44f88d5cb7..f98c029d3688 100644 --- a/third_party/lisp/uax-15.nix +++ b/third_party/lisp/uax-15.nix @@ -4,7 +4,8 @@ let inherit (pkgs) runCommand; inherit (depot.nix.buildLisp) bundled; src = with pkgs; srcOnly lispPackages.uax-15; -in depot.nix.buildLisp.library { +in +depot.nix.buildLisp.library { name = "uax-15"; deps = with depot.third_party.lisp; [ @@ -23,7 +24,7 @@ in depot.nix.buildLisp.library { # # additionally there are some wonky variable usages of variables # that are never defined, for which we patch in defvar statements. - (runCommand "precomputed-tables.lisp" {} '' + (runCommand "precomputed-tables.lisp" { } '' substitute ${src}/src/precomputed-tables.lisp precomputed-tables.lisp \ --replace "(asdf:system-source-directory (asdf:find-system 'uax-15 nil))" \ '"${src}/"' diff --git a/third_party/lisp/unix-opts.nix b/third_party/lisp/unix-opts.nix index e52eab959d3e..248296113263 100644 --- a/third_party/lisp/unix-opts.nix +++ b/third_party/lisp/unix-opts.nix @@ -1,5 +1,5 @@ # unix-opts is a portable command line argument parser -{ depot, pkgs, ...}: +{ depot, pkgs, ... }: let src = with pkgs; srcOnly lispPackages.unix-opts; diff --git a/third_party/lisp/usocket-server.nix b/third_party/lisp/usocket-server.nix index f2f11d7a17c8..5d6d04535f0c 100644 --- a/third_party/lisp/usocket-server.nix +++ b/third_party/lisp/usocket-server.nix @@ -4,7 +4,8 @@ let inherit (depot.nix) buildLisp; src = with pkgs; srcOnly lispPackages.usocket-server; -in buildLisp.library { +in +buildLisp.library { name = "usocket-server"; deps = with depot.third_party.lisp; [ diff --git a/third_party/lisp/usocket.nix b/third_party/lisp/usocket.nix index 335954978494..589a3a0cfc92 100644 --- a/third_party/lisp/usocket.nix +++ b/third_party/lisp/usocket.nix @@ -4,7 +4,8 @@ let inherit (depot.nix) buildLisp; src = with pkgs; srcOnly lispPackages.usocket; -in buildLisp.library { +in +buildLisp.library { name = "usocket"; deps = with depot.third_party.lisp; [ (buildLisp.bundled "asdf") -- cgit 1.4.1