Remove default values for Nix expression parameters

I'm not sure if this commit breaks everything in my monorepo. I think it
will.

Why am I doing this? Perhaps it's a bad idea. I don't fully understand how
readTree works. My ignorance is costing me hours of time spent debugging. In an
effort to better understand readTree, I'm removing the default values for my Nix
expression parameters, which I believe have preventing errors from surfacing.
This commit is contained in:
William Carroll 2020-02-23 22:29:32 +00:00
parent fd720fbe4d
commit 9e0fdd3973
28 changed files with 36 additions and 97 deletions

View file

@ -1,15 +1,10 @@
{ { pkgs, depot, briefcase, ... }:
nixpkgs ? import <nixpkgs> {},
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
let let
injections = nixpkgs.writeText "injections.lisp" '' injections = pkgs.writeText "injections.lisp" ''
(in-package #:server) (in-package #:server)
(setq *path-to-posts* "${./posts}") (setq *path-to-posts* "${./posts}")
(setq *pandoc-bin* "${nixpkgs.pandoc}/bin/pandoc") (setq *pandoc-bin* "${pkgs.pandoc}/bin/pandoc")
(setq *html-template* "${./src/index.html}") (setq *html-template* "${./src/index.html}")
''; '';
in depot.nix.buildLisp.program { in depot.nix.buildLisp.program {

View file

@ -1,8 +1,4 @@
{ { pkgs, briefcase, ... }:
pkgs ? import <nixpkgs> {},
briefcase ? import <briefcase> {},
...
}:
pkgs.dockerTools.buildLayeredImage { pkgs.dockerTools.buildLayeredImage {
name = "blog"; name = "blog";

View file

@ -1,4 +1,4 @@
{ briefcase ? import <briefcase> {}, ... }: { briefcase, ... }:
briefcase.nix.buildClojure.program { briefcase.nix.buildClojure.program {
name = "test"; name = "test";

View file

@ -9,11 +9,14 @@ let
fix = f: let x = f x; in x; fix = f: let x = f x; in x;
# Global configuration that all packages are called with. # Global configuration that all packages are called with.
config = pkgs: { config = self: {
inherit pkgs; inherit self;
pkgs = import <nixpkgs> {};
depot = import <depot> {};
briefcase = import <briefcase> {};
}; };
readTree' = import ~/depot/nix/readTree {}; readTree' = import <depot/nix/readTree> {};
# TODO: Find a better way to expose entire monorepo without introducing # TODO: Find a better way to expose entire monorepo without introducing
# "infinite recursion". # "infinite recursion".
@ -27,12 +30,6 @@ let
}; };
in fix(self: { in fix(self: {
config = config self; config = config self;
# Expose readTree for downstream repo consumers.
readTree = {
__functor = x: (readTree' x.config);
config = self.config;
};
} }
# Add local packages as structured by readTree # Add local packages as structured by readTree

View file

@ -1,11 +1,7 @@
{ { pkgs, depot, ... }:
pkgs ? import <nixpkgs> {},
depot ? import <depot> {},
...
}:
let let
utils = import ~/briefcase/utils; utils = import <briefcase/utils>;
# NOTE: I'm trying to keep the list of dependencies herein constrained to a # NOTE: I'm trying to keep the list of dependencies herein constrained to a
# list of generic dependencies (i.e. not project or language specific). For # list of generic dependencies (i.e. not project or language specific). For
# language-specific tooling, I'm intending to use shell.nix alongside lorri # language-specific tooling, I'm intending to use shell.nix alongside lorri

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} , ... }: { pkgs, ... }:
# TODO: Is it appropriate to put programming language dependencies here? Should # TODO: Is it appropriate to put programming language dependencies here? Should
# I have a bin dependency for every fish `abbr` and `alias` that I use? What # I have a bin dependency for every fish `abbr` and `alias` that I use? What

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}, ... }: { pkgs, ... }:
pkgs.mkShell { pkgs.mkShell {
buildInputs = [ buildInputs = [

View file

@ -1,7 +1,4 @@
{ { depot, ... }:
depot ? import <depot> {},
...
}:
depot.buildGo.package { depot.buildGo.package {
name = "kv"; name = "kv";

View file

@ -1,7 +1,4 @@
{ { depot, ... }:
depot ? import <depot> {},
...
}:
depot.buildGo.package { depot.buildGo.package {
name = "utils"; name = "utils";

View file

@ -1,8 +1,4 @@
{ { depot, briefcase, ... }:
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
depot.nix.buildLisp.library { depot.nix.buildLisp.library {
name = "f"; name = "f";

View file

@ -1,4 +1,4 @@
{ depot ? import <depot> {}, ... }: { depot, ... }:
depot.nix.buildLisp.library { depot.nix.buildLisp.library {
name = "prelude"; name = "prelude";

View file

@ -1,4 +1,4 @@
{ depot ? import <depot> {}, ... }: { depot, ... }:
let let
inherit (builtins) fetchGit; inherit (builtins) fetchGit;

View file

@ -1,8 +1,4 @@
{ { depot, briefcase, ... }:
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
depot.buildGo.program { depot.buildGo.program {
name = "job"; name = "job";

View file

@ -1,8 +1,4 @@
{ { pkgs, briefcase, ... }:
pkgs ? import <nixpkgs> {},
briefcase ? import <briefcase> {},
...
}:
pkgs.mkShell { pkgs.mkShell {
buildInputs = [ buildInputs = [

View file

@ -1,8 +1,4 @@
{ { depot, briefcase, ... }:
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
let let
auth = depot.buildGo.package { auth = depot.buildGo.package {

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}, ... }: { pkgs, ... }:
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}, ... }: { pkgs, ... }:
pkgs.mkShell rec { pkgs.mkShell rec {
buildInputs = []; buildInputs = [];

View file

@ -1,4 +1,4 @@
{ depot ? import <depot> {}, ... }: { depot, ... }:
let let
src = builtins.fetchGit { src = builtins.fetchGit {

View file

@ -1,4 +1,4 @@
{ depot ? import <depot> {}, ... }: { depot, ... }:
let let
src = builtins.fetchGit { src = builtins.fetchGit {

View file

@ -1,8 +1,4 @@
{ { depot, briefcase, ... }:
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
let let
src = builtins.fetchGit { src = builtins.fetchGit {

View file

@ -1,8 +1,4 @@
{ { depot, briefcase, ... }:
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
let let
src = builtins.fetchGit { src = builtins.fetchGit {

View file

@ -1,4 +1,4 @@
{ depot ? import <depot> {}, ... }: { depot, ... }:
let let
src = builtins.fetchGit { src = builtins.fetchGit {

View file

@ -1,8 +1,4 @@
{ { depot, briefcase, ... }:
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
let let
src = builtins.fetchGit { src = builtins.fetchGit {

View file

@ -1,6 +1,4 @@
{ { depot, ... }:
depot ? import <depot> {}, ...
}:
# 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.

View file

@ -1,9 +1,4 @@
{ { pkgs, depot, briefcase, ... }:
pkgs ? import <nixpkgs> {},
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
depot.buildGo.program { depot.buildGo.program {
name = "run"; name = "run";

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}, ... }: { pkgs, ... }:
pkgs.mkShell { pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}, ... }: { pkgs, ... }:
let let
script = pkgs.writeShellScriptBin "simple_vim" '' script = pkgs.writeShellScriptBin "simple_vim" ''

View file

@ -1,8 +1,4 @@
{ { depot, briefcase, ... }:
depot ? import <depot> {},
briefcase ? import <briefcase> {},
...
}:
depot.buildGo.program { depot.buildGo.program {
name = "symlink-mgr"; name = "symlink-mgr";