fix(wpcarro/nix): Remove <briefcase> 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 <wpcarro@gmail.com> Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: wpcarro <wpcarro@gmail.com>
This commit is contained in:
parent
38ec27e834
commit
b6d143e5d2
53 changed files with 151 additions and 172 deletions
|
@ -1,2 +0,0 @@
|
||||||
Do not recurse from top-level readTree, while this is being refactored
|
|
||||||
we have a nested tree.
|
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.program {
|
depot.users.wpcarro.buildHaskell.program {
|
||||||
name = "transform-keyboard";
|
name = "transform-keyboard";
|
||||||
srcs = builtins.path {
|
srcs = builtins.path {
|
||||||
path = ./.;
|
path = ./.;
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
pkgs = import (builtins.fetchGit {
|
|
||||||
url = "https://github.com/NixOS/nixpkgs-channels";
|
pkgs.mkShell {
|
||||||
ref = "nixos-20.03";
|
|
||||||
rev = "afa9ca61924f05aacfe495a7ad0fd84709d236cc";
|
|
||||||
}) {};
|
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
(haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
|
(haskellPackages.ghcWithPackages (hpkgs: with hpkgs; [
|
||||||
hspec
|
hspec
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.shell {
|
depot.users.wpcarro.buildHaskell.shell {
|
||||||
deps = hpkgs: with hpkgs; [
|
deps = hpkgs: with hpkgs; [
|
||||||
hspec
|
hspec
|
||||||
unordered-containers
|
unordered-containers
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# stubbed
|
|
|
@ -1,3 +0,0 @@
|
||||||
let
|
|
||||||
briefcase = import /home/wpcarro/briefcase {};
|
|
||||||
in briefcase.utils.nixBufferFromShell ./shell.nix
|
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
pkgs = import <nixpkgs> {};
|
|
||||||
in pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
elmPackages.elm
|
elmPackages.elm
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
{ pkgs, depot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
pkgs = import <nixpkgs> {};
|
|
||||||
hailgun-src = builtins.fetchGit {
|
hailgun-src = builtins.fetchGit {
|
||||||
url = "https://bitbucket.org/echo_rm/hailgun.git";
|
url = "https://bitbucket.org/echo_rm/hailgun.git";
|
||||||
rev = "9d5da7c902b2399e0fcf3d494ee04cf2bbfe7c9e";
|
rev = "9d5da7c902b2399e0fcf3d494ee04cf2bbfe7c9e";
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
leiningen
|
leiningen
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs.elmPackages; [
|
buildInputs = with pkgs.elmPackages; [
|
||||||
elm
|
elm
|
||||||
elm-format
|
elm-format
|
||||||
|
|
|
@ -11,9 +11,13 @@ pkgs.stdenv.mkDerivation {
|
||||||
# parcel.js needs number of CPUs
|
# parcel.js needs number of CPUs
|
||||||
PARCEL_WORKERS = "1";
|
PARCEL_WORKERS = "1";
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
export HOME="."
|
||||||
npx parcel build src/index.html --public-url ./
|
npx parcel build src/index.html --public-url ./
|
||||||
'';
|
'';
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mv dist $out
|
mv dist $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# TODO(wpcarro): This doesn't build at all.
|
||||||
|
meta.ci = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
yarn
|
yarn
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ briefcase, pkgs, ... }:
|
{ pkgs, depot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) fetchGit path toJSON;
|
inherit (builtins) fetchGit path toJSON;
|
||||||
inherit (briefcase.emacs) initEl runScript;
|
inherit (depot.users.wpcarro.emacs) initEl runScript;
|
||||||
|
|
||||||
elispLintSrc = fetchGit {
|
elispLintSrc = fetchGit {
|
||||||
url = "https://github.com/gonewest818/elisp-lint";
|
url = "https://github.com/gonewest818/elisp-lint";
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
_: {
|
|
||||||
# temporarily commented out while briefcase is being integrated in
|
|
||||||
# depot.
|
|
||||||
}
|
|
|
@ -2,12 +2,11 @@
|
||||||
# name: shell.nix boilerplate
|
# name: shell.nix boilerplate
|
||||||
# key: import
|
# key: import
|
||||||
# --
|
# --
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = with import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.stdenv.mkDerivation {
|
||||||
in stdenv.mkDerivation {
|
|
||||||
name = "$1";
|
name = "$1";
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
$2
|
$2
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,10 +294,6 @@
|
||||||
:config
|
:config
|
||||||
(add-hook 'lsp-mode-hook #'lsp-ui-mode))
|
(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
|
;; Wilfred/suggest.el - Tool for discovering functions basesd on declaring your
|
||||||
;; desired inputs and outputs.
|
;; desired inputs and outputs.
|
||||||
(use-package suggest)
|
(use-package suggest)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) path;
|
inherit (builtins) path;
|
||||||
inherit (depot.third_party) emacsPackagesGen emacs27;
|
inherit (depot.third_party.nixpkgs) emacsPackagesGen emacs27;
|
||||||
inherit (pkgs) writeShellScript writeShellScriptBin;
|
inherit (pkgs) writeShellScript writeShellScriptBin;
|
||||||
inherit (pkgs.lib.strings) concatStringsSep makeBinPath;
|
inherit (pkgs.lib.strings) concatStringsSep makeBinPath;
|
||||||
|
|
||||||
|
@ -49,7 +49,6 @@ let
|
||||||
clipmon # TODO: Prefer an Emacs client for clipmenud.
|
clipmon # TODO: Prefer an Emacs client for clipmenud.
|
||||||
evil
|
evil
|
||||||
evil-collection
|
evil-collection
|
||||||
evil-magit
|
|
||||||
evil-commentary
|
evil-commentary
|
||||||
evil-surround
|
evil-surround
|
||||||
key-chord
|
key-chord
|
||||||
|
@ -103,7 +102,6 @@ let
|
||||||
eglot
|
eglot
|
||||||
dap-mode
|
dap-mode
|
||||||
lsp-ui
|
lsp-ui
|
||||||
company-lsp
|
|
||||||
suggest
|
suggest
|
||||||
paradox
|
paradox
|
||||||
flymake-shellcheck
|
flymake-shellcheck
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
go
|
go
|
||||||
goimports
|
goimports
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
depot.buildGo.package {
|
depot.nix.buildGo.package {
|
||||||
name = "kv";
|
name = "kv";
|
||||||
srcs = [
|
srcs = [
|
||||||
./kv.go
|
./kv.go
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ depot, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
depot.buildGo.package {
|
depot.nix.buildGo.package {
|
||||||
name = "utils";
|
name = "utils";
|
||||||
srcs = [
|
srcs = [
|
||||||
./utils.go
|
./utils.go
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.shell {
|
depot.users.wpcarro.buildHaskell.shell {
|
||||||
deps = hpkgs: [];
|
deps = hpkgs: [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
{ depot, briefcase, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
depot.nix.buildLisp.library {
|
depot.nix.buildLisp.library {
|
||||||
name = "f";
|
name = "f";
|
||||||
deps = with briefcase.lisp; [
|
deps = with depot.users.wpcarro.lisp; [
|
||||||
prelude
|
prelude
|
||||||
];
|
];
|
||||||
srcs = [
|
srcs = [
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
{
|
||||||
in {
|
|
||||||
imports = [ ./hardware.nix ];
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
@ -117,7 +116,7 @@ in {
|
||||||
systemd.services.zoo = {
|
systemd.services.zoo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "Run my monoserver";
|
description = "Run my monoserver";
|
||||||
script = "${briefcase.zoo}/zoo";
|
script = "${depot.users.wpcarro.zoo}/zoo";
|
||||||
environment = {};
|
environment = {};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
@ -175,12 +174,12 @@ in {
|
||||||
"wpcarro.dev" = {
|
"wpcarro.dev" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
root = briefcase.website;
|
root = depot.users.wpcarro.website;
|
||||||
};
|
};
|
||||||
"learn.wpcarro.dev" = {
|
"learn.wpcarro.dev" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
root = briefcase.website.learn;
|
root = depot.users.wpcarro.website.learn;
|
||||||
};
|
};
|
||||||
"git.wpcarro.dev" = {
|
"git.wpcarro.dev" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
|
@ -192,17 +191,17 @@ in {
|
||||||
"blog.wpcarro.dev" = {
|
"blog.wpcarro.dev" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
root = briefcase.website.blog;
|
root = depot.users.wpcarro.website.blog;
|
||||||
};
|
};
|
||||||
# "sandbox.wpcarro.dev" = {
|
# "sandbox.wpcarro.dev" = {
|
||||||
# addSSL = true;
|
# addSSL = true;
|
||||||
# enableACME = true;
|
# enableACME = true;
|
||||||
# root = briefcase.website.sandbox;
|
# root = depot.users.wpcarro.website.sandbox;
|
||||||
# };
|
# };
|
||||||
# "learnpianochords.app" = {
|
# "learnpianochords.app" = {
|
||||||
# addSSL = true;
|
# addSSL = true;
|
||||||
# enableACME = true;
|
# enableACME = true;
|
||||||
# root = briefcase.website.sandbox.learnpianochords;
|
# root = depot.users.wpcarro.website.sandbox.learnpianochords;
|
||||||
# };
|
# };
|
||||||
"zoo.wpcarro.dev" = {
|
"zoo.wpcarro.dev" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
python3
|
python3
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.shell {
|
depot.users.wpcarro.buildHaskell.shell {
|
||||||
deps = hpkgs: [];
|
deps = hpkgs: [];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.shell {
|
depot.users.wpcarro.buildHaskell.shell {
|
||||||
deps = hpkgs: with hpkgs; [
|
deps = hpkgs: with hpkgs; [
|
||||||
quickcheck-simple
|
quickcheck-simple
|
||||||
checkers
|
checkers
|
||||||
|
|
2
users/wpcarro/tools/monzo_ynab/.skip-subtree
Normal file
2
users/wpcarro/tools/monzo_ynab/.skip-subtree
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Subdirectories of this folder should not be imported since they are
|
||||||
|
internal to buildGo.nix and incompatible with readTree.
|
|
@ -1,11 +1,13 @@
|
||||||
{ depot, briefcase, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
depot.buildGo.program {
|
let
|
||||||
|
inherit (depot.users.wpcarro) gopkgs;
|
||||||
|
in depot.nix.buildGo.program {
|
||||||
name = "job";
|
name = "job";
|
||||||
srcs = [
|
srcs = [
|
||||||
./main.go
|
./main.go
|
||||||
];
|
];
|
||||||
deps = with briefcase.gopkgs; [
|
deps = with gopkgs; [
|
||||||
kv
|
kv
|
||||||
utils
|
utils
|
||||||
];
|
];
|
||||||
|
|
|
@ -10,7 +10,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"os"
|
||||||
|
"monzoSerde"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -34,7 +35,7 @@ func toYnab(tx monzoSerde.Transaction) ynabSerde.Transaction {
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
txs := monzo.TransactionsLast24Hours()
|
txs := monzo.TransactionsLast24Hours()
|
||||||
var ynabTxs []ynabSerde.Transaction{}
|
var ynabTxs []ynabSerde.Transaction
|
||||||
for tx := range txs {
|
for tx := range txs {
|
||||||
append(ynabTxs, toYnab(tx))
|
append(ynabTxs, toYnab(tx))
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
buildInputs = with pkgs; [
|
||||||
buildInputs = [
|
go
|
||||||
pkgs.go
|
goimports
|
||||||
pkgs.goimports
|
godef
|
||||||
pkgs.godef
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,23 @@
|
||||||
{ depot, briefcase, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
auth = depot.buildGo.package {
|
inherit (depot.users.wpcarro) gopkgs;
|
||||||
|
|
||||||
|
auth = depot.nix.buildGo.package {
|
||||||
name = "auth";
|
name = "auth";
|
||||||
srcs = [
|
srcs = [
|
||||||
./auth.go
|
./auth.go
|
||||||
];
|
];
|
||||||
deps = with briefcase.gopkgs; [
|
deps = with gopkgs; [
|
||||||
utils
|
utils
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in depot.buildGo.program {
|
in depot.nix.buildGo.program {
|
||||||
name = "token-server";
|
name = "token-server";
|
||||||
srcs = [
|
srcs = [
|
||||||
./tokens.go
|
./tokens.go
|
||||||
];
|
];
|
||||||
deps = with briefcase.gopkgs; [
|
deps = with gopkgs; [
|
||||||
kv
|
kv
|
||||||
utils
|
utils
|
||||||
auth
|
auth
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# TODO: This doesn't depend on `sendgmr` at the moment, but it should. As such,
|
# TODO: This doesn't depend on `sendgmr` at the moment, but it should. As such,
|
||||||
# it's an imcomplete packaging.
|
# it's an imcomplete packaging.
|
||||||
depot.buildGo.program {
|
depot.nix.buildGo.program {
|
||||||
name = "rfcToKindle";
|
name = "rfcToKindle";
|
||||||
srcs = [
|
srcs = [
|
||||||
./main.go
|
./main.go
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ pkgs, depot, briefcase, ... }:
|
{ pkgs, depot, ... }:
|
||||||
|
|
||||||
depot.buildGo.program {
|
depot.nix.buildGo.program {
|
||||||
name = "run";
|
name = "run";
|
||||||
srcs = [
|
srcs = [
|
||||||
./main.go
|
./main.go
|
||||||
];
|
];
|
||||||
deps = with briefcase.gopkgs; [
|
deps = with depot.users.wpcarro.gopkgs; [
|
||||||
utils
|
utils
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
go
|
go
|
||||||
goimports
|
goimports
|
||||||
|
|
|
@ -6,10 +6,6 @@ let
|
||||||
name = "config.vim";
|
name = "config.vim";
|
||||||
};
|
};
|
||||||
|
|
||||||
script = pkgs.writeShellScriptBin "simple_vim" ''
|
in pkgs.writeShellScriptBin "simple_vim" ''
|
||||||
${pkgs.vim}/bin/vim -u ${configVim}
|
${pkgs.vim}/bin/vim -u ${configVim}
|
||||||
'';
|
''
|
||||||
in pkgs.stdenv.mkDerivation {
|
|
||||||
name = "simple_vim";
|
|
||||||
buildInputs = [ script ];
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
{ depot, briefcase, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
depot.buildGo.program {
|
let
|
||||||
|
inherit (depot.users.wpcarro) gopkgs;
|
||||||
|
in depot.nix.buildGo.program {
|
||||||
name = "symlink-mgr";
|
name = "symlink-mgr";
|
||||||
srcs = [
|
srcs = [
|
||||||
./main.go
|
./main.go
|
||||||
];
|
];
|
||||||
deps = with briefcase.gopkgs; [
|
deps = with gopkgs; [
|
||||||
utils
|
utils
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.shell {
|
depot.users.wpcarro.buildHaskell.shell {
|
||||||
deps = hpkgs: with hpkgs; [
|
deps = hpkgs: with hpkgs; [
|
||||||
time
|
time
|
||||||
aeson
|
aeson
|
||||||
|
|
|
@ -3,7 +3,7 @@ args@{ pkgs, ... }:
|
||||||
# This top-level module exposes all of my utility functions for Nix. It should
|
# This top-level module exposes all of my utility functions for Nix. It should
|
||||||
# be used like:
|
# be used like:
|
||||||
# ```nix
|
# ```nix
|
||||||
# inherit (briefcase.utils) fs;
|
# inherit (depot.users.wpcarro.utils) fs;
|
||||||
# ```
|
# ```
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
hugo
|
hugo
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, briefcase, ... }:
|
{ pkgs, depot, ... }:
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "wpcarro.dev";
|
name = "wpcarro.dev";
|
||||||
|
@ -8,6 +8,6 @@ pkgs.stdenv.mkDerivation {
|
||||||
cp $src/index.html $out
|
cp $src/index.html $out
|
||||||
|
|
||||||
mkdir -p $out/habits
|
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
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
yarn
|
yarn
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs ? <nixpkgs> , ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ let
|
||||||
inherit name src;
|
inherit name src;
|
||||||
|
|
||||||
buildInputs = [ elmPackages.elm ]
|
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;
|
elmPackages = import srcs;
|
||||||
elmVersion = "0.19.1";
|
elmVersion = "0.19.1";
|
||||||
inherit registryDat;
|
inherit registryDat;
|
||||||
|
@ -35,7 +35,7 @@ let
|
||||||
${lib.optionalString outputJavaScript ''
|
${lib.optionalString outputJavaScript ''
|
||||||
echo "minifying ${elmfile module}"
|
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 $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)}
|
'') targets)}
|
||||||
'';
|
'';
|
||||||
|
@ -58,4 +58,3 @@ in stdenv.mkDerivation {
|
||||||
'';
|
'';
|
||||||
dontInstall = true;
|
dontInstall = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs.elmPackages; [
|
buildInputs = with pkgs.elmPackages; [
|
||||||
elm
|
elm
|
||||||
elm-format
|
elm-format
|
||||||
|
|
|
@ -11,9 +11,14 @@ pkgs.stdenv.mkDerivation {
|
||||||
# parcel.js needs number of CPUs
|
# parcel.js needs number of CPUs
|
||||||
PARCEL_WORKERS = "1";
|
PARCEL_WORKERS = "1";
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
export HOME="."
|
||||||
npx parcel build index.html
|
npx parcel build index.html
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mv dist $out
|
mv dist $out
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# TODO(wpcarro): This doesn't build at all.
|
||||||
|
meta.ci = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
nodejs
|
nodejs
|
||||||
yarn
|
yarn
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
yarn
|
yarn
|
||||||
nodejs
|
nodejs
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, briefcase, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "covid-uk";
|
name = "covid-uk";
|
||||||
|
@ -7,7 +7,7 @@ pkgs.stdenv.mkDerivation {
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp $src/index.html $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;
|
dontInstall = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs ? <nixpkgs>, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
with pkgs;
|
with pkgs;
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ let
|
||||||
inherit name src;
|
inherit name src;
|
||||||
|
|
||||||
buildInputs = [ elmPackages.elm ]
|
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;
|
elmPackages = import srcs;
|
||||||
elmVersion = "0.19.1";
|
elmVersion = "0.19.1";
|
||||||
inherit registryDat;
|
inherit registryDat;
|
||||||
|
@ -35,7 +35,7 @@ let
|
||||||
${lib.optionalString outputJavaScript ''
|
${lib.optionalString outputJavaScript ''
|
||||||
echo "minifying ${elmfile module}"
|
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 $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)}
|
'') targets)}
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
let
|
{ pkgs, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
pkgs = briefcase.third_party.pkgs;
|
pkgs.mkShell {
|
||||||
in pkgs.mkShell {
|
|
||||||
buildInputs = with pkgs.elmPackages; [
|
buildInputs = with pkgs.elmPackages; [
|
||||||
elm
|
elm
|
||||||
elm-format
|
elm-format
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.program {
|
depot.users.wpcarro.buildHaskell.program {
|
||||||
name = "server";
|
name = "server";
|
||||||
srcs = builtins.path {
|
srcs = builtins.path {
|
||||||
path = ./.;
|
path = ./.;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.shell {
|
depot.users.wpcarro.buildHaskell.shell {
|
||||||
deps = hpkgs: with hpkgs; [
|
deps = hpkgs: with hpkgs; [
|
||||||
hspec
|
hspec
|
||||||
servant-server
|
servant-server
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ briefcase, ... }:
|
{ depot, ... }:
|
||||||
|
|
||||||
briefcase.buildHaskell.program {
|
depot.users.wpcarro.buildHaskell.program {
|
||||||
name = "zoo";
|
name = "zoo";
|
||||||
srcs = builtins.path {
|
srcs = builtins.path {
|
||||||
path = ./.;
|
path = ./.;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
let
|
{ depot, ... }:
|
||||||
briefcase = import <briefcase> {};
|
|
||||||
in briefcase.buildHaskell.shell {
|
depot.users.wpcarro.buildHaskell.shell {
|
||||||
deps = hpkgs: with hpkgs; [
|
deps = hpkgs: with hpkgs; [
|
||||||
servant-server
|
servant-server
|
||||||
aeson
|
aeson
|
||||||
|
|
Loading…
Reference in a new issue