Skip to content

Commit

Permalink
Remove extra defaults for input in inputs_spec
Browse files Browse the repository at this point in the history
It's already defaults to `"nixpkgs"` in NickelInputSpec, so no need to
repeat ourselves.

Fixes #86
  • Loading branch information
YorikSar committed Jun 29, 2023
1 parent 00169fe commit 7c6c418
Showing 1 changed file with 27 additions and 31 deletions.
58 changes: 27 additions & 31 deletions builders.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ let { NickelDerivation, .. } = import "contracts.ncl" in

BashShell = {
inputs_spec = {
bash.input | default = "nixpkgs",
bash = {},
# Setting the following as a default value conflicts with InputsSpec's
# contract default value (`"nixpkgs"`). Maybe InputsSpec shouldn't set a
# default value at all?
Expand Down Expand Up @@ -86,10 +86,10 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
cargo.input | default = "nixpkgs",
rustc.input | default = "nixpkgs",
rustfmt.input | default = "nixpkgs",
rust-analyzer.input | default = "nixpkgs",
cargo = {},
rustc = {},
rustfmt = {},
rust-analyzer = {},
},
inputs,

Expand All @@ -107,8 +107,8 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
go.input | default = "nixpkgs",
gopls.input | default = "nixpkgs",
go = {},
gopls = {},
},
inputs,

Expand All @@ -124,8 +124,8 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
clojure.input | default = "nixpkgs",
clojure-lsp.input | default = "nixpkgs",
clojure = {},
clojure-lsp = {},
},
inputs,

Expand All @@ -141,8 +141,8 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
clang.input | default = "nixpkgs",
clang-tools.input | default = "nixpkgs",
clang = {},
clang-tools = {},
},
inputs,

Expand All @@ -159,10 +159,9 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
php.input | default = "nixpkgs",
php = {},
intelephense = {
path = "nodePackages"."intelephense",
input | default = "nixpkgs",
},
},
inputs,
Expand All @@ -179,8 +178,8 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
zig.input | default = "nixpkgs",
zls.input | default = "nixpkgs",
zig = {},
zls = {},
},
inputs,

Expand All @@ -197,10 +196,9 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
nodejs.input | default = "nixpkgs",
nodejs = {},
typescript-language-server = {
path = "nodePackages_latest.typescript-language-server",
input | default = "nixpkgs",
}
},
inputs,
Expand All @@ -217,7 +215,7 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
racket.input | default = "nixpkgs",
racket = {},
},
inputs,

Expand All @@ -232,8 +230,8 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
scala.input | default = "nixpkgs",
metals.input | default = "nixpkgs",
scala = {},
metals = {},
},
inputs,

Expand All @@ -251,10 +249,9 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
python310.input | default = "nixpkgs",
python310 = {},
python-lsp-server = {
path = "python310Packages.python-lsp-server",
input | default = "nixpkgs",
}
},
inputs,
Expand All @@ -271,8 +268,8 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
BashShell
& {
inputs_spec = {
erlang.input | default = "nixpkgs",
erlang-ls.input | default = "nixpkgs",
erlang = {},
erlang-ls = {},
},
inputs,

Expand All @@ -289,17 +286,16 @@ let { NickelDerivation, .. } = import "contracts.ncl" in
& {
ghcVersion, # User-defined. To keep in sync with the one used by stack
inputs_spec = {
stack.input | default = "nixpkgs",
ormolu.input | default = "nixpkgs",
nix.input | default = "nixpkgs",
git.input | default = "nixpkgs",
coreutils.input | default = "nixpkgs",
stack = {},
ormolu = {},
nix = {},
git = {},
coreutils = {},
haskell-language-server = {
input = "nixpkgs",
path = "haskell.packages.ghc%{ghcVersion}.haskell-language-server",
},
# This will point to a copy of nixpkgs in nix store
path.input | default = "nixpkgs",
path = {},
},
inputs,

Expand Down

0 comments on commit 7c6c418

Please sign in to comment.