From b6d143e5d225e6aa293c23512336b7136ac58dcf Mon Sep 17 00:00:00 2001 From: William Carroll Date: Mon, 13 Dec 2021 19:51:48 -0800 Subject: [PATCH] fix(wpcarro/nix): Remove references Angle-bracketed references are a Nix anti-pattern, and thankfully this repository enforces this as a standard. TL;DR: - Drop angle-bracketed references - Change `briefcase` -> `users.wpcarro` - Fix any resulting regressions - Fix //users/wpcarro/tools/simple_vim - Mark //users/wpcarro/boilerplate/typescript and related projects as broken - drop .skip-subtree file, enabling depot CI Change-Id: I7153cbabafa617bfd6b199370cbec65cb75441f6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4325 Tested-by: BuildkiteCI Reviewed-by: wpcarro Reviewed-by: tazjin Reviewed-by: grfn Autosubmit: wpcarro --- users/wpcarro/.skip-subtree | 2 -- .../wpcarro/assessments/brilliant/default.nix | 6 +++--- users/wpcarro/assessments/brilliant/shell.nix | 10 +++------- .../assessments/dotted-squares/shell.nix | 6 +++--- .../assessments/semiprimes/default.nix | 1 - .../assessments/tt/client/dir-locals.nix | 3 --- users/wpcarro/assessments/tt/client/shell.nix | 6 +++--- users/wpcarro/assessments/tt/shell.nix | 3 ++- users/wpcarro/boilerplate/clojure/shell.nix | 7 +++---- users/wpcarro/boilerplate/elm/shell.nix | 7 +++---- .../boilerplate/typescript/default.nix | 4 ++++ .../wpcarro/boilerplate/typescript/shell.nix | 7 +++---- users/wpcarro/ci/pipelines/post-receive.nix | 4 ++-- users/wpcarro/default.nix | 4 ---- .../.emacs.d/snippets/nix-mode/shell-nix | 9 ++++----- users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el | 4 ---- users/wpcarro/emacs/default.nix | 4 +--- users/wpcarro/go/shell.nix | 7 +++---- users/wpcarro/gopkgs/kv/default.nix | 2 +- users/wpcarro/gopkgs/utils/default.nix | 2 +- users/wpcarro/haskell-file/shell.nix | 6 +++--- users/wpcarro/lisp/f/default.nix | 4 ++-- users/wpcarro/nixos/socrates/default.nix | 19 +++++++++---------- .../scratch/deepmind/part_two/shell.nix | 7 +++---- users/wpcarro/scratch/groceries/shell.nix | 6 +++--- .../shell.nix | 6 +++--- users/wpcarro/tools/monzo_ynab/.skip-subtree | 2 ++ users/wpcarro/tools/monzo_ynab/job.nix | 8 +++++--- users/wpcarro/tools/monzo_ynab/main.go | 5 +++-- users/wpcarro/tools/monzo_ynab/shell.nix | 15 +++++++-------- users/wpcarro/tools/monzo_ynab/tokens.nix | 12 +++++++----- users/wpcarro/tools/rfcToKindle/default.nix | 2 +- users/wpcarro/tools/run/default.nix | 6 +++--- users/wpcarro/tools/run/shell.nix | 7 +++---- users/wpcarro/tools/simple_vim/default.nix | 10 +++------- .../wpcarro/tools/symlinkManager/default.nix | 8 +++++--- users/wpcarro/tools/url-blocker/shell.nix | 6 +++--- users/wpcarro/utils/default.nix | 2 +- users/wpcarro/website/blog/shell.nix | 7 +++---- users/wpcarro/website/default.nix | 4 ++-- users/wpcarro/website/goals/shell.nix | 7 +++---- .../wpcarro/website/habit-screens/default.nix | 9 ++++----- users/wpcarro/website/habit-screens/shell.nix | 7 +++---- .../website/sandbox/contentful/default.nix | 5 +++++ .../website/sandbox/contentful/shell.nix | 7 +++---- .../website/sandbox/covid-uk/shell.nix | 7 +++---- .../website/sandbox/default.nix.ignore | 4 ++-- .../sandbox/learnpianochords/default.nix | 8 ++++---- .../sandbox/learnpianochords/shell.nix | 7 +++---- .../learnpianochords/src/server/default.nix | 6 +++--- .../learnpianochords/src/server/shell.nix | 6 +++--- users/wpcarro/zoo/default.nix | 4 ++-- users/wpcarro/zoo/shell.nix | 6 +++--- 53 files changed, 151 insertions(+), 172 deletions(-) delete mode 100644 users/wpcarro/.skip-subtree delete mode 100644 users/wpcarro/assessments/semiprimes/default.nix delete mode 100644 users/wpcarro/assessments/tt/client/dir-locals.nix delete mode 100644 users/wpcarro/default.nix create mode 100644 users/wpcarro/tools/monzo_ynab/.skip-subtree diff --git a/users/wpcarro/.skip-subtree b/users/wpcarro/.skip-subtree deleted file mode 100644 index 968b9b74d..000000000 --- a/users/wpcarro/.skip-subtree +++ /dev/null @@ -1,2 +0,0 @@ -Do not recurse from top-level readTree, while this is being refactored -we have a nested tree. diff --git a/users/wpcarro/assessments/brilliant/default.nix b/users/wpcarro/assessments/brilliant/default.nix index 886ba87e1..536e54d36 100644 --- a/users/wpcarro/assessments/brilliant/default.nix +++ b/users/wpcarro/assessments/brilliant/default.nix @@ -1,6 +1,6 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.program { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.program { name = "transform-keyboard"; srcs = builtins.path { path = ./.; diff --git a/users/wpcarro/assessments/brilliant/shell.nix b/users/wpcarro/assessments/brilliant/shell.nix index d0a6c7e5e..e08399c09 100644 --- a/users/wpcarro/assessments/brilliant/shell.nix +++ b/users/wpcarro/assessments/brilliant/shell.nix @@ -1,10 +1,6 @@ -let - pkgs = import (builtins.fetchGit { - url = "https://github.com/NixOS/nixpkgs-channels"; - ref = "nixos-20.03"; - rev = "afa9ca61924f05aacfe495a7ad0fd84709d236cc"; - }) {}; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ (haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [ hspec diff --git a/users/wpcarro/assessments/dotted-squares/shell.nix b/users/wpcarro/assessments/dotted-squares/shell.nix index 87eb23d73..868668ca5 100644 --- a/users/wpcarro/assessments/dotted-squares/shell.nix +++ b/users/wpcarro/assessments/dotted-squares/shell.nix @@ -1,6 +1,6 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.shell { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.shell { deps = hpkgs: with hpkgs; [ hspec unordered-containers diff --git a/users/wpcarro/assessments/semiprimes/default.nix b/users/wpcarro/assessments/semiprimes/default.nix deleted file mode 100644 index 29452eac2..000000000 --- a/users/wpcarro/assessments/semiprimes/default.nix +++ /dev/null @@ -1 +0,0 @@ -# stubbed diff --git a/users/wpcarro/assessments/tt/client/dir-locals.nix b/users/wpcarro/assessments/tt/client/dir-locals.nix deleted file mode 100644 index 5c3ae0887..000000000 --- a/users/wpcarro/assessments/tt/client/dir-locals.nix +++ /dev/null @@ -1,3 +0,0 @@ -let - briefcase = import /home/wpcarro/briefcase {}; -in briefcase.utils.nixBufferFromShell ./shell.nix diff --git a/users/wpcarro/assessments/tt/client/shell.nix b/users/wpcarro/assessments/tt/client/shell.nix index 15ac040b9..78f55385d 100644 --- a/users/wpcarro/assessments/tt/client/shell.nix +++ b/users/wpcarro/assessments/tt/client/shell.nix @@ -1,6 +1,6 @@ -let - pkgs = import {}; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ nodejs elmPackages.elm diff --git a/users/wpcarro/assessments/tt/shell.nix b/users/wpcarro/assessments/tt/shell.nix index 567b71060..88761e539 100644 --- a/users/wpcarro/assessments/tt/shell.nix +++ b/users/wpcarro/assessments/tt/shell.nix @@ -1,5 +1,6 @@ +{ pkgs, depot, ... }: + let - pkgs = import {}; hailgun-src = builtins.fetchGit { url = "https://bitbucket.org/echo_rm/hailgun.git"; rev = "9d5da7c902b2399e0fcf3d494ee04cf2bbfe7c9e"; diff --git a/users/wpcarro/boilerplate/clojure/shell.nix b/users/wpcarro/boilerplate/clojure/shell.nix index efa854422..8b92b592e 100644 --- a/users/wpcarro/boilerplate/clojure/shell.nix +++ b/users/wpcarro/boilerplate/clojure/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ leiningen ]; diff --git a/users/wpcarro/boilerplate/elm/shell.nix b/users/wpcarro/boilerplate/elm/shell.nix index 00bb4b0b3..afcc0f4d3 100644 --- a/users/wpcarro/boilerplate/elm/shell.nix +++ b/users/wpcarro/boilerplate/elm/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs.elmPackages; [ elm elm-format diff --git a/users/wpcarro/boilerplate/typescript/default.nix b/users/wpcarro/boilerplate/typescript/default.nix index 14a39dee1..d27162d34 100644 --- a/users/wpcarro/boilerplate/typescript/default.nix +++ b/users/wpcarro/boilerplate/typescript/default.nix @@ -11,9 +11,13 @@ pkgs.stdenv.mkDerivation { # parcel.js needs number of CPUs PARCEL_WORKERS = "1"; buildPhase = '' + export HOME="." npx parcel build src/index.html --public-url ./ ''; installPhase = '' mv dist $out ''; + + # TODO(wpcarro): This doesn't build at all. + meta.ci = false; } diff --git a/users/wpcarro/boilerplate/typescript/shell.nix b/users/wpcarro/boilerplate/typescript/shell.nix index 083254bee..a3ae929ef 100644 --- a/users/wpcarro/boilerplate/typescript/shell.nix +++ b/users/wpcarro/boilerplate/typescript/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ nodejs yarn diff --git a/users/wpcarro/ci/pipelines/post-receive.nix b/users/wpcarro/ci/pipelines/post-receive.nix index 456d546af..ee4850aa8 100644 --- a/users/wpcarro/ci/pipelines/post-receive.nix +++ b/users/wpcarro/ci/pipelines/post-receive.nix @@ -1,8 +1,8 @@ -{ briefcase, pkgs, ... }: +{ pkgs, depot, ... }: let inherit (builtins) fetchGit path toJSON; - inherit (briefcase.emacs) initEl runScript; + inherit (depot.users.wpcarro.emacs) initEl runScript; elispLintSrc = fetchGit { url = "https://github.com/gonewest818/elisp-lint"; diff --git a/users/wpcarro/default.nix b/users/wpcarro/default.nix deleted file mode 100644 index ab0afe9bf..000000000 --- a/users/wpcarro/default.nix +++ /dev/null @@ -1,4 +0,0 @@ -_: { - # temporarily commented out while briefcase is being integrated in - # depot. -} diff --git a/users/wpcarro/emacs/.emacs.d/snippets/nix-mode/shell-nix b/users/wpcarro/emacs/.emacs.d/snippets/nix-mode/shell-nix index 45cb24e2b..b5eb5a244 100644 --- a/users/wpcarro/emacs/.emacs.d/snippets/nix-mode/shell-nix +++ b/users/wpcarro/emacs/.emacs.d/snippets/nix-mode/shell-nix @@ -2,12 +2,11 @@ # name: shell.nix boilerplate # key: import # -- -let - briefcase = with import {}; - pkgs = briefcase.third_party.pkgs; -in stdenv.mkDerivation { +{ pkgs, ... }: + +pkgs.stdenv.mkDerivation { name = "$1"; buildInputs = [ $2 ]; -} \ No newline at end of file +} diff --git a/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el b/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el index 574162fbf..5b147dc77 100644 --- a/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el +++ b/users/wpcarro/emacs/.emacs.d/wpc/wpc-misc.el @@ -294,10 +294,6 @@ :config (add-hook 'lsp-mode-hook #'lsp-ui-mode)) -(use-package company-lsp - :config - (push 'company-lsp company-backends)) - ;; Wilfred/suggest.el - Tool for discovering functions basesd on declaring your ;; desired inputs and outputs. (use-package suggest) diff --git a/users/wpcarro/emacs/default.nix b/users/wpcarro/emacs/default.nix index 4c50d3294..b25968ecb 100644 --- a/users/wpcarro/emacs/default.nix +++ b/users/wpcarro/emacs/default.nix @@ -2,7 +2,7 @@ let inherit (builtins) path; - inherit (depot.third_party) emacsPackagesGen emacs27; + inherit (depot.third_party.nixpkgs) emacsPackagesGen emacs27; inherit (pkgs) writeShellScript writeShellScriptBin; inherit (pkgs.lib.strings) concatStringsSep makeBinPath; @@ -49,7 +49,6 @@ let clipmon # TODO: Prefer an Emacs client for clipmenud. evil evil-collection - evil-magit evil-commentary evil-surround key-chord @@ -103,7 +102,6 @@ let eglot dap-mode lsp-ui - company-lsp suggest paradox flymake-shellcheck diff --git a/users/wpcarro/go/shell.nix b/users/wpcarro/go/shell.nix index e14bffae4..f777c13fe 100644 --- a/users/wpcarro/go/shell.nix +++ b/users/wpcarro/go/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ go goimports diff --git a/users/wpcarro/gopkgs/kv/default.nix b/users/wpcarro/gopkgs/kv/default.nix index c89e00213..72aae7827 100644 --- a/users/wpcarro/gopkgs/kv/default.nix +++ b/users/wpcarro/gopkgs/kv/default.nix @@ -1,6 +1,6 @@ { depot, ... }: -depot.buildGo.package { +depot.nix.buildGo.package { name = "kv"; srcs = [ ./kv.go diff --git a/users/wpcarro/gopkgs/utils/default.nix b/users/wpcarro/gopkgs/utils/default.nix index 5955fa4cf..25321f50a 100644 --- a/users/wpcarro/gopkgs/utils/default.nix +++ b/users/wpcarro/gopkgs/utils/default.nix @@ -1,6 +1,6 @@ { depot, ... }: -depot.buildGo.package { +depot.nix.buildGo.package { name = "utils"; srcs = [ ./utils.go diff --git a/users/wpcarro/haskell-file/shell.nix b/users/wpcarro/haskell-file/shell.nix index 4d5b412a0..7682e8246 100644 --- a/users/wpcarro/haskell-file/shell.nix +++ b/users/wpcarro/haskell-file/shell.nix @@ -1,5 +1,5 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.shell { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.shell { deps = hpkgs: []; } diff --git a/users/wpcarro/lisp/f/default.nix b/users/wpcarro/lisp/f/default.nix index f64bfcc5f..a71c8f887 100644 --- a/users/wpcarro/lisp/f/default.nix +++ b/users/wpcarro/lisp/f/default.nix @@ -1,8 +1,8 @@ -{ depot, briefcase, ... }: +{ depot, ... }: depot.nix.buildLisp.library { name = "f"; - deps = with briefcase.lisp; [ + deps = with depot.users.wpcarro.lisp; [ prelude ]; srcs = [ diff --git a/users/wpcarro/nixos/socrates/default.nix b/users/wpcarro/nixos/socrates/default.nix index 8b762a56d..6284977af 100644 --- a/users/wpcarro/nixos/socrates/default.nix +++ b/users/wpcarro/nixos/socrates/default.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in { +{ pkgs, depot, ... }: + +{ imports = [ ./hardware.nix ]; # Use the systemd-boot EFI boot loader. @@ -117,7 +116,7 @@ in { systemd.services.zoo = { enable = true; description = "Run my monoserver"; - script = "${briefcase.zoo}/zoo"; + script = "${depot.users.wpcarro.zoo}/zoo"; environment = {}; serviceConfig = { Restart = "always"; @@ -175,12 +174,12 @@ in { "wpcarro.dev" = { addSSL = true; enableACME = true; - root = briefcase.website; + root = depot.users.wpcarro.website; }; "learn.wpcarro.dev" = { addSSL = true; enableACME = true; - root = briefcase.website.learn; + root = depot.users.wpcarro.website.learn; }; "git.wpcarro.dev" = { addSSL = true; @@ -192,17 +191,17 @@ in { "blog.wpcarro.dev" = { addSSL = true; enableACME = true; - root = briefcase.website.blog; + root = depot.users.wpcarro.website.blog; }; # "sandbox.wpcarro.dev" = { # addSSL = true; # enableACME = true; - # root = briefcase.website.sandbox; + # root = depot.users.wpcarro.website.sandbox; # }; # "learnpianochords.app" = { # addSSL = true; # enableACME = true; - # root = briefcase.website.sandbox.learnpianochords; + # root = depot.users.wpcarro.website.sandbox.learnpianochords; # }; "zoo.wpcarro.dev" = { addSSL = true; diff --git a/users/wpcarro/scratch/deepmind/part_two/shell.nix b/users/wpcarro/scratch/deepmind/part_two/shell.nix index 6080171bb..f1b02c4d2 100644 --- a/users/wpcarro/scratch/deepmind/part_two/shell.nix +++ b/users/wpcarro/scratch/deepmind/part_two/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ nodejs python3 diff --git a/users/wpcarro/scratch/groceries/shell.nix b/users/wpcarro/scratch/groceries/shell.nix index 4d5b412a0..7682e8246 100644 --- a/users/wpcarro/scratch/groceries/shell.nix +++ b/users/wpcarro/scratch/groceries/shell.nix @@ -1,5 +1,5 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.shell { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.shell { deps = hpkgs: []; } diff --git a/users/wpcarro/scratch/haskell-programming-from-first-principles/shell.nix b/users/wpcarro/scratch/haskell-programming-from-first-principles/shell.nix index b594a4207..49dbe746d 100644 --- a/users/wpcarro/scratch/haskell-programming-from-first-principles/shell.nix +++ b/users/wpcarro/scratch/haskell-programming-from-first-principles/shell.nix @@ -1,6 +1,6 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.shell { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.shell { deps = hpkgs: with hpkgs; [ quickcheck-simple checkers diff --git a/users/wpcarro/tools/monzo_ynab/.skip-subtree b/users/wpcarro/tools/monzo_ynab/.skip-subtree new file mode 100644 index 000000000..8db1f814f --- /dev/null +++ b/users/wpcarro/tools/monzo_ynab/.skip-subtree @@ -0,0 +1,2 @@ +Subdirectories of this folder should not be imported since they are +internal to buildGo.nix and incompatible with readTree. diff --git a/users/wpcarro/tools/monzo_ynab/job.nix b/users/wpcarro/tools/monzo_ynab/job.nix index 1e1075101..c2c8baab3 100644 --- a/users/wpcarro/tools/monzo_ynab/job.nix +++ b/users/wpcarro/tools/monzo_ynab/job.nix @@ -1,11 +1,13 @@ -{ depot, briefcase, ... }: +{ depot, ... }: -depot.buildGo.program { +let + inherit (depot.users.wpcarro) gopkgs; +in depot.nix.buildGo.program { name = "job"; srcs = [ ./main.go ]; - deps = with briefcase.gopkgs; [ + deps = with gopkgs; [ kv utils ]; diff --git a/users/wpcarro/tools/monzo_ynab/main.go b/users/wpcarro/tools/monzo_ynab/main.go index 06f1944ea..f40c70ce2 100644 --- a/users/wpcarro/tools/monzo_ynab/main.go +++ b/users/wpcarro/tools/monzo_ynab/main.go @@ -10,7 +10,8 @@ package main import ( - "fmt" + "os" + "monzoSerde" ) var ( @@ -34,7 +35,7 @@ func toYnab(tx monzoSerde.Transaction) ynabSerde.Transaction { func main() { txs := monzo.TransactionsLast24Hours() - var ynabTxs []ynabSerde.Transaction{} + var ynabTxs []ynabSerde.Transaction for tx := range txs { append(ynabTxs, toYnab(tx)) } diff --git a/users/wpcarro/tools/monzo_ynab/shell.nix b/users/wpcarro/tools/monzo_ynab/shell.nix index 910d7c182..f777c13fe 100644 --- a/users/wpcarro/tools/monzo_ynab/shell.nix +++ b/users/wpcarro/tools/monzo_ynab/shell.nix @@ -1,10 +1,9 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { - buildInputs = [ - pkgs.go - pkgs.goimports - pkgs.godef +{ pkgs, ... }: + +pkgs.mkShell { + buildInputs = with pkgs; [ + go + goimports + godef ]; } diff --git a/users/wpcarro/tools/monzo_ynab/tokens.nix b/users/wpcarro/tools/monzo_ynab/tokens.nix index 97de09d74..b58c272bd 100644 --- a/users/wpcarro/tools/monzo_ynab/tokens.nix +++ b/users/wpcarro/tools/monzo_ynab/tokens.nix @@ -1,21 +1,23 @@ -{ depot, briefcase, ... }: +{ depot, ... }: let - auth = depot.buildGo.package { + inherit (depot.users.wpcarro) gopkgs; + + auth = depot.nix.buildGo.package { name = "auth"; srcs = [ ./auth.go ]; - deps = with briefcase.gopkgs; [ + deps = with gopkgs; [ utils ]; }; -in depot.buildGo.program { +in depot.nix.buildGo.program { name = "token-server"; srcs = [ ./tokens.go ]; - deps = with briefcase.gopkgs; [ + deps = with gopkgs; [ kv utils auth diff --git a/users/wpcarro/tools/rfcToKindle/default.nix b/users/wpcarro/tools/rfcToKindle/default.nix index 8fb93c3bb..4ea271943 100644 --- a/users/wpcarro/tools/rfcToKindle/default.nix +++ b/users/wpcarro/tools/rfcToKindle/default.nix @@ -2,7 +2,7 @@ # TODO: This doesn't depend on `sendgmr` at the moment, but it should. As such, # it's an imcomplete packaging. -depot.buildGo.program { +depot.nix.buildGo.program { name = "rfcToKindle"; srcs = [ ./main.go diff --git a/users/wpcarro/tools/run/default.nix b/users/wpcarro/tools/run/default.nix index 7d772c3f9..807a75c28 100644 --- a/users/wpcarro/tools/run/default.nix +++ b/users/wpcarro/tools/run/default.nix @@ -1,11 +1,11 @@ -{ pkgs, depot, briefcase, ... }: +{ pkgs, depot, ... }: -depot.buildGo.program { +depot.nix.buildGo.program { name = "run"; srcs = [ ./main.go ]; - deps = with briefcase.gopkgs; [ + deps = with depot.users.wpcarro.gopkgs; [ utils ]; } diff --git a/users/wpcarro/tools/run/shell.nix b/users/wpcarro/tools/run/shell.nix index e14bffae4..f777c13fe 100644 --- a/users/wpcarro/tools/run/shell.nix +++ b/users/wpcarro/tools/run/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ go goimports diff --git a/users/wpcarro/tools/simple_vim/default.nix b/users/wpcarro/tools/simple_vim/default.nix index f8f965f2c..6631fdfff 100644 --- a/users/wpcarro/tools/simple_vim/default.nix +++ b/users/wpcarro/tools/simple_vim/default.nix @@ -6,10 +6,6 @@ let name = "config.vim"; }; - script = pkgs.writeShellScriptBin "simple_vim" '' - ${pkgs.vim}/bin/vim -u ${configVim} - ''; -in pkgs.stdenv.mkDerivation { - name = "simple_vim"; - buildInputs = [ script ]; -} +in pkgs.writeShellScriptBin "simple_vim" '' + ${pkgs.vim}/bin/vim -u ${configVim} +'' diff --git a/users/wpcarro/tools/symlinkManager/default.nix b/users/wpcarro/tools/symlinkManager/default.nix index 16bb26bb3..4e261d730 100644 --- a/users/wpcarro/tools/symlinkManager/default.nix +++ b/users/wpcarro/tools/symlinkManager/default.nix @@ -1,11 +1,13 @@ -{ depot, briefcase, ... }: +{ depot, ... }: -depot.buildGo.program { +let + inherit (depot.users.wpcarro) gopkgs; +in depot.nix.buildGo.program { name = "symlink-mgr"; srcs = [ ./main.go ]; - deps = with briefcase.gopkgs; [ + deps = with gopkgs; [ utils ]; } diff --git a/users/wpcarro/tools/url-blocker/shell.nix b/users/wpcarro/tools/url-blocker/shell.nix index 1adc566c0..aa5c906ed 100644 --- a/users/wpcarro/tools/url-blocker/shell.nix +++ b/users/wpcarro/tools/url-blocker/shell.nix @@ -1,6 +1,6 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.shell { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.shell { deps = hpkgs: with hpkgs; [ time aeson diff --git a/users/wpcarro/utils/default.nix b/users/wpcarro/utils/default.nix index db01702a1..59aa32207 100644 --- a/users/wpcarro/utils/default.nix +++ b/users/wpcarro/utils/default.nix @@ -3,7 +3,7 @@ args@{ pkgs, ... }: # This top-level module exposes all of my utility functions for Nix. It should # be used like: # ```nix -# inherit (briefcase.utils) fs; +# inherit (depot.users.wpcarro.utils) fs; # ``` let diff --git a/users/wpcarro/website/blog/shell.nix b/users/wpcarro/website/blog/shell.nix index 7ca3a9713..2c685a1c1 100644 --- a/users/wpcarro/website/blog/shell.nix +++ b/users/wpcarro/website/blog/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ hugo ]; diff --git a/users/wpcarro/website/default.nix b/users/wpcarro/website/default.nix index bd4bd7f85..9480c38e9 100644 --- a/users/wpcarro/website/default.nix +++ b/users/wpcarro/website/default.nix @@ -1,4 +1,4 @@ -{ pkgs, briefcase, ... }: +{ pkgs, depot, ... }: pkgs.stdenv.mkDerivation { name = "wpcarro.dev"; @@ -8,6 +8,6 @@ pkgs.stdenv.mkDerivation { cp $src/index.html $out mkdir -p $out/habits - cp -r ${briefcase.website.habit-screens} $out/habits/index.html + cp -r ${depot.users.wpcarro.website.habit-screens} $out/habits/index.html ''; } diff --git a/users/wpcarro/website/goals/shell.nix b/users/wpcarro/website/goals/shell.nix index 083254bee..a3ae929ef 100644 --- a/users/wpcarro/website/goals/shell.nix +++ b/users/wpcarro/website/goals/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ nodejs yarn diff --git a/users/wpcarro/website/habit-screens/default.nix b/users/wpcarro/website/habit-screens/default.nix index c042dc8c8..345e6f010 100644 --- a/users/wpcarro/website/habit-screens/default.nix +++ b/users/wpcarro/website/habit-screens/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? , ... }: +{ pkgs, ... }: with pkgs; @@ -16,9 +16,9 @@ let inherit name src; buildInputs = [ elmPackages.elm ] - ++ lib.optional outputJavaScript nodePackages_10_x.uglify-js; + ++ lib.optional outputJavaScript nodePackages.uglify-js; - buildPhase = pkgs.elmPackages.fetchElmDeps { + buildPhase = elmPackages.fetchElmDeps { elmPackages = import srcs; elmVersion = "0.19.1"; inherit registryDat; @@ -35,7 +35,7 @@ let ${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} + | uglifyjs --mangle --output $out/${module}.min.${extension} ''} '') targets)} ''; @@ -58,4 +58,3 @@ in stdenv.mkDerivation { ''; dontInstall = true; } - diff --git a/users/wpcarro/website/habit-screens/shell.nix b/users/wpcarro/website/habit-screens/shell.nix index 00bb4b0b3..afcc0f4d3 100644 --- a/users/wpcarro/website/habit-screens/shell.nix +++ b/users/wpcarro/website/habit-screens/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs.elmPackages; [ elm elm-format diff --git a/users/wpcarro/website/sandbox/contentful/default.nix b/users/wpcarro/website/sandbox/contentful/default.nix index f7125655c..6b0151afa 100644 --- a/users/wpcarro/website/sandbox/contentful/default.nix +++ b/users/wpcarro/website/sandbox/contentful/default.nix @@ -11,9 +11,14 @@ pkgs.stdenv.mkDerivation { # parcel.js needs number of CPUs PARCEL_WORKERS = "1"; buildPhase = '' + export HOME="." npx parcel build index.html ''; + installPhase = '' mv dist $out ''; + + # TODO(wpcarro): This doesn't build at all. + meta.ci = false; } diff --git a/users/wpcarro/website/sandbox/contentful/shell.nix b/users/wpcarro/website/sandbox/contentful/shell.nix index 083254bee..a3ae929ef 100644 --- a/users/wpcarro/website/sandbox/contentful/shell.nix +++ b/users/wpcarro/website/sandbox/contentful/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ nodejs yarn diff --git a/users/wpcarro/website/sandbox/covid-uk/shell.nix b/users/wpcarro/website/sandbox/covid-uk/shell.nix index 6442c39f9..f918c4033 100644 --- a/users/wpcarro/website/sandbox/covid-uk/shell.nix +++ b/users/wpcarro/website/sandbox/covid-uk/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs; [ yarn nodejs diff --git a/users/wpcarro/website/sandbox/default.nix.ignore b/users/wpcarro/website/sandbox/default.nix.ignore index 4f86b4900..d7b4940a5 100644 --- a/users/wpcarro/website/sandbox/default.nix.ignore +++ b/users/wpcarro/website/sandbox/default.nix.ignore @@ -1,4 +1,4 @@ -{ pkgs, briefcase, ... }: +{ pkgs, ... }: pkgs.stdenv.mkDerivation { name = "covid-uk"; @@ -7,7 +7,7 @@ pkgs.stdenv.mkDerivation { buildPhase = '' mkdir -p $out cp $src/index.html $out - cp -r ${briefcase.website.sandbox.covid-uk} $out/covid-uk + cp -r ${depot.users.wpcarro.website.sandbox.covid-uk} $out/covid-uk ''; dontInstall = true; } diff --git a/users/wpcarro/website/sandbox/learnpianochords/default.nix b/users/wpcarro/website/sandbox/learnpianochords/default.nix index 37dfd4d39..934fbd70a 100644 --- a/users/wpcarro/website/sandbox/learnpianochords/default.nix +++ b/users/wpcarro/website/sandbox/learnpianochords/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? , ... }: +{ pkgs, ... }: with pkgs; @@ -16,9 +16,9 @@ let inherit name src; buildInputs = [ elmPackages.elm ] - ++ lib.optional outputJavaScript nodePackages_10_x.uglify-js; + ++ lib.optional outputJavaScript nodePackages.uglify-js; - buildPhase = pkgs.elmPackages.fetchElmDeps { + buildPhase = elmPackages.fetchElmDeps { elmPackages = import srcs; elmVersion = "0.19.1"; inherit registryDat; @@ -35,7 +35,7 @@ let ${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} + | uglifyjs --mangle --output $out/${module}.min.${extension} ''} '') targets)} ''; diff --git a/users/wpcarro/website/sandbox/learnpianochords/shell.nix b/users/wpcarro/website/sandbox/learnpianochords/shell.nix index 00bb4b0b3..afcc0f4d3 100644 --- a/users/wpcarro/website/sandbox/learnpianochords/shell.nix +++ b/users/wpcarro/website/sandbox/learnpianochords/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import {}; - pkgs = briefcase.third_party.pkgs; -in pkgs.mkShell { +{ pkgs, ... }: + +pkgs.mkShell { buildInputs = with pkgs.elmPackages; [ elm elm-format diff --git a/users/wpcarro/website/sandbox/learnpianochords/src/server/default.nix b/users/wpcarro/website/sandbox/learnpianochords/src/server/default.nix index 87de69cbd..262693ae8 100644 --- a/users/wpcarro/website/sandbox/learnpianochords/src/server/default.nix +++ b/users/wpcarro/website/sandbox/learnpianochords/src/server/default.nix @@ -1,6 +1,6 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.program { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.program { name = "server"; srcs = builtins.path { path = ./.; diff --git a/users/wpcarro/website/sandbox/learnpianochords/src/server/shell.nix b/users/wpcarro/website/sandbox/learnpianochords/src/server/shell.nix index ab470841e..6ec826447 100644 --- a/users/wpcarro/website/sandbox/learnpianochords/src/server/shell.nix +++ b/users/wpcarro/website/sandbox/learnpianochords/src/server/shell.nix @@ -1,6 +1,6 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.shell { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.shell { deps = hpkgs: with hpkgs; [ hspec servant-server diff --git a/users/wpcarro/zoo/default.nix b/users/wpcarro/zoo/default.nix index 35de24d9c..312a6cbd7 100644 --- a/users/wpcarro/zoo/default.nix +++ b/users/wpcarro/zoo/default.nix @@ -1,6 +1,6 @@ -{ briefcase, ... }: +{ depot, ... }: -briefcase.buildHaskell.program { +depot.users.wpcarro.buildHaskell.program { name = "zoo"; srcs = builtins.path { path = ./.; diff --git a/users/wpcarro/zoo/shell.nix b/users/wpcarro/zoo/shell.nix index 944c5acc7..5978d5b4d 100644 --- a/users/wpcarro/zoo/shell.nix +++ b/users/wpcarro/zoo/shell.nix @@ -1,6 +1,6 @@ -let - briefcase = import {}; -in briefcase.buildHaskell.shell { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.shell { deps = hpkgs: with hpkgs; [ servant-server aeson