diff options
author | William Carroll <wpcarro@gmail.com> | 2021-12-14T03·51-0800 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2021-12-15T15·49+0000 |
commit | b6d143e5d225e6aa293c23512336b7136ac58dcf (patch) | |
tree | 5cb070270342957f39415ab396a1d5f18a8a1fee /users | |
parent | 38ec27e834b3d177b846d35064bba58fd70f41df (diff) |
fix(wpcarro/nix): Remove <briefcase> references r/3249
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 <wpcarro@gmail.com> Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users')
53 files changed, 151 insertions, 172 deletions
diff --git a/users/wpcarro/.skip-subtree b/users/wpcarro/.skip-subtree deleted file mode 100644 index 968b9b74d7be..000000000000 --- 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 886ba87e1caf..536e54d3650a 100644 --- a/users/wpcarro/assessments/brilliant/default.nix +++ b/users/wpcarro/assessments/brilliant/default.nix @@ -1,6 +1,6 @@ -let - briefcase = import <briefcase> {}; -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 d0a6c7e5e6f5..e08399c093e1 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 87eb23d731e2..868668ca501c 100644 --- a/users/wpcarro/assessments/dotted-squares/shell.nix +++ b/users/wpcarro/assessments/dotted-squares/shell.nix @@ -1,6 +1,6 @@ -let - briefcase = import <briefcase> {}; -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 29452eac250c..000000000000 --- 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 5c3ae08870b0..000000000000 --- 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 15ac040b9462..78f55385db9a 100644 --- a/users/wpcarro/assessments/tt/client/shell.nix +++ b/users/wpcarro/assessments/tt/client/shell.nix @@ -1,6 +1,6 @@ -let - pkgs = import <nixpkgs> {}; -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 567b71060b7b..88761e539920 100644 --- a/users/wpcarro/assessments/tt/shell.nix +++ b/users/wpcarro/assessments/tt/shell.nix @@ -1,5 +1,6 @@ +{ pkgs, depot, ... }: + let - pkgs = import <nixpkgs> {}; 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 efa854422eae..8b92b592e1ac 100644 --- a/users/wpcarro/boilerplate/clojure/shell.nix +++ b/users/wpcarro/boilerplate/clojure/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 00bb4b0b3edc..afcc0f4d3645 100644 --- a/users/wpcarro/boilerplate/elm/shell.nix +++ b/users/wpcarro/boilerplate/elm/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 14a39dee1785..d27162d345a7 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 083254beefd0..a3ae929ef446 100644 --- a/users/wpcarro/boilerplate/typescript/shell.nix +++ b/users/wpcarro/boilerplate/typescript/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 456d546af7da..ee4850aa8b72 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 ab0afe9bf19d..000000000000 --- 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 45cb24e2b9e3..b5eb5a244721 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 <briefcase> {}; - 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 574162fbfd82..5b147dc77d8f 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 4c50d3294cfa..b25968ecbf72 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 e14bffae487c..f777c13fefae 100644 --- a/users/wpcarro/go/shell.nix +++ b/users/wpcarro/go/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 c89e002139e2..72aae7827ba1 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 5955fa4cfbde..25321f50a042 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 4d5b412a0884..7682e8246cac 100644 --- a/users/wpcarro/haskell-file/shell.nix +++ b/users/wpcarro/haskell-file/shell.nix @@ -1,5 +1,5 @@ -let - briefcase = import <briefcase> {}; -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 f64bfcc5f0d1..a71c8f887a41 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 8b762a56de5f..6284977af69f 100644 --- a/users/wpcarro/nixos/socrates/default.nix +++ b/users/wpcarro/nixos/socrates/default.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 6080171bb835..f1b02c4d2ed5 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 <briefcase> {}; - 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 4d5b412a0884..7682e8246cac 100644 --- a/users/wpcarro/scratch/groceries/shell.nix +++ b/users/wpcarro/scratch/groceries/shell.nix @@ -1,5 +1,5 @@ -let - briefcase = import <briefcase> {}; -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 b594a4207e48..49dbe746d364 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 <briefcase> {}; -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 000000000000..8db1f814f653 --- /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 1e10751012e2..c2c8baab3b45 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 06f1944eab70..f40c70ce27d1 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 910d7c1829e2..f777c13fefae 100644 --- a/users/wpcarro/tools/monzo_ynab/shell.nix +++ b/users/wpcarro/tools/monzo_ynab/shell.nix @@ -1,10 +1,9 @@ -let - briefcase = import <briefcase> {}; - 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 97de09d741e9..b58c272bde02 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 8fb93c3bb5b8..4ea271943950 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 7d772c3f9079..807a75c28450 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 e14bffae487c..f777c13fefae 100644 --- a/users/wpcarro/tools/run/shell.nix +++ b/users/wpcarro/tools/run/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 f8f965f2c024..6631fdfff5da 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 16bb26bb3c2e..4e261d730932 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 1adc566c0121..aa5c906edc90 100644 --- a/users/wpcarro/tools/url-blocker/shell.nix +++ b/users/wpcarro/tools/url-blocker/shell.nix @@ -1,6 +1,6 @@ -let - briefcase = import <briefcase> {}; -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 db01702a1fec..59aa322076b4 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 7ca3a9713ebf..2c685a1c1475 100644 --- a/users/wpcarro/website/blog/shell.nix +++ b/users/wpcarro/website/blog/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 bd4bd7f85228..9480c38e9fe2 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 083254beefd0..a3ae929ef446 100644 --- a/users/wpcarro/website/goals/shell.nix +++ b/users/wpcarro/website/goals/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 c042dc8c8021..345e6f010d48 100644 --- a/users/wpcarro/website/habit-screens/default.nix +++ b/users/wpcarro/website/habit-screens/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? <nixpkgs> , ... }: +{ 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 00bb4b0b3edc..afcc0f4d3645 100644 --- a/users/wpcarro/website/habit-screens/shell.nix +++ b/users/wpcarro/website/habit-screens/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 f7125655ccdc..6b0151afaedc 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 083254beefd0..a3ae929ef446 100644 --- a/users/wpcarro/website/sandbox/contentful/shell.nix +++ b/users/wpcarro/website/sandbox/contentful/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 6442c39f9c47..f918c4033e2f 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 <briefcase> {}; - 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 4f86b49002a5..d7b4940a55b9 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 37dfd4d390f5..934fbd70ac17 100644 --- a/users/wpcarro/website/sandbox/learnpianochords/default.nix +++ b/users/wpcarro/website/sandbox/learnpianochords/default.nix @@ -1,4 +1,4 @@ -{ pkgs ? <nixpkgs>, ... }: +{ 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 00bb4b0b3edc..afcc0f4d3645 100644 --- a/users/wpcarro/website/sandbox/learnpianochords/shell.nix +++ b/users/wpcarro/website/sandbox/learnpianochords/shell.nix @@ -1,7 +1,6 @@ -let - briefcase = import <briefcase> {}; - 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 87de69cbd627..262693ae821e 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 <briefcase> {}; -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 ab470841e6c1..6ec8264470db 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 <briefcase> {}; -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 35de24d9c2cc..312a6cbd7689 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 944c5acc7f28..5978d5b4d04a 100644 --- a/users/wpcarro/zoo/shell.nix +++ b/users/wpcarro/zoo/shell.nix @@ -1,6 +1,6 @@ -let - briefcase = import <briefcase> {}; -in briefcase.buildHaskell.shell { +{ depot, ... }: + +depot.users.wpcarro.buildHaskell.shell { deps = hpkgs: with hpkgs; [ servant-server aeson |