Skip to content

Commit 4679e36

Browse files
committed
Add doc buildInput when bootstrapping a minimal project
1 parent f698d79 commit 4679e36

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

.last-exported-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Last exported commit from parent repo: feecef05e61bf44eb9046aa4965a0e524c030b49
1+
Last exported commit from parent repo: c58d54d0c146e49fa02187ecd9ba2a524818de66

nix-bootstrap.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ cabal-version: 2.0
55
-- see: https://github.com/sol/hpack
66

77
name: nix-bootstrap
8-
version: 2.2.2.2
8+
version: 2.2.3.0
99
author: gchquser
1010
maintainer: 48051938+sd234678@users.noreply.github.com
1111
copyright: Crown Copyright

package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
name: nix-bootstrap
15-
version: 2.2.2.2
15+
version: 2.2.3.0
1616
author: gchquser
1717
maintainer: 48051938+sd234678@users.noreply.github.com
1818
copyright: Crown Copyright

src/Bootstrap/Nix/Expr/BuildInputs.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Bootstrap.Nix.Expr
1616
Expr (EGrouping, EList, EWith),
1717
IsNixExpr (toNixExpr),
1818
nix,
19+
nixbinding,
1920
nixproperty,
2021
(|++),
2122
(|=),
@@ -57,7 +58,11 @@ buildInputsBindings :: (HasProjectSuperType t) => BuildInputSpec t -> [Binding]
5758
buildInputsBindings spec@BuildInputSpec {bisNativeNixpkgsPackages} =
5859
catMaybes
5960
[ case buildInputGroupExprs of
60-
[] -> Nothing
61+
[] ->
62+
Just
63+
[nixbinding|buildInputs = [
64+
# Insert any dependencies that should exist in the dev shell environment here
65+
];|]
6166
[buildInputGroupExpr1] ->
6267
Just $ [nixproperty|buildInputs|] |= buildInputGroupExpr1
6368
(buildInputGroupExpr1 : otherBuildInputGroupExprs) ->

test/Bootstrap/Nix/Expr/MkShellSpec.hs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ spec = do
2323
it "gives no shell hook when one isn't needed" do
2424
mkShell (BuildInputSpec [] [] (PreCommitHooksConfig False) Minimal [])
2525
`shouldBe` [nix|nixpkgs.mkShell {
26+
buildInputs = [
27+
# Insert any dependencies that should exist in the dev shell environment here
28+
];
2629
}|]
2730
it "gives a proper shell hook for projects with pre-commit hooks" do
2831
mkShell (BuildInputSpec [] [] (PreCommitHooksConfig True) Minimal [])
@@ -33,6 +36,9 @@ spec = do
3336
it "gives a proper shell hook for Rust projects" do
3437
mkShell (BuildInputSpec [] [] (PreCommitHooksConfig False) Rust [])
3538
`shouldBe` [nix|nixpkgs.mkShell {
39+
buildInputs = [
40+
# Insert any dependencies that should exist in the dev shell environment here
41+
];
3642
shellHook = ''
3743
export RUST_SRC_PATH=${nixpkgs.rustPlatform.rustLibSrc}
3844
'';

0 commit comments

Comments
 (0)