Skip to content

Commit 2927bb2

Browse files
authored
Merge pull request #35 from dfinity-lab/paulyoung/fix-nix-shell
Add top-level overlay, fix nix-shell
2 parents f70ddce + f24258a commit 2927bb2

File tree

4 files changed

+21
-11
lines changed

4 files changed

+21
-11
lines changed

nix/overlays/default.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@
1010
(import ./dfinity.nix)
1111
(import ./dfinity-sdk.nix)
1212
(import ./mkCiShell.nix)
13+
# This file must be the last mentioned as it uses outputs from most other files
14+
# and lifts them to the top-level package set
15+
(import ./top-level.nix)
1316
]

nix/overlays/dfinity-sdk.nix

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,6 @@ self: super:
22

33
let dfx = super.callPackage ../../dfx/package.nix {
44
inherit (self) actorscript dfinity runCommand;
5-
6-
libressl = self.libressl_2_9;
7-
8-
# rustfmt needs to be compatible with rustc. The rust repo actually
9-
# specifies the compatible rustfmt src using a git submodule.
10-
# self.pkgsUnstable.rustfmt is a derivation for rustfmt based on that
11-
# src. See: https://github.com/NixOS/nixpkgs/pull/66713
12-
rustfmt = self.pkgsUnstable.rustfmt;
13-
rls = self.pkgsUnstable.rls;
145
}; in
156

167
{

nix/overlays/top-level.nix

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# A nixpkgs overlay adding the top-level tools/packages
2+
self: super:
3+
rec {
4+
rustc = self.rustPackages.rustc;
5+
cargo = self.rustPackages.cargo;
6+
7+
# These are used by various targets
8+
libressl = super.libressl_2_9;
9+
10+
# rustfmt needs to be compatible with rustc. The rust repo actually specifies
11+
# the compatible rustfmt src using a git submodule.
12+
# self.pkgsUnstable.rustfmt is a derivation for rustfmt based on that src.
13+
# See: https://github.com/NixOS/nixpkgs/pull/66713
14+
rustfmt = super.pkgsUnstable.rustfmt;
15+
rls = super.pkgsUnstable.rls;
16+
}

nix/sources.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"homepage": "https://github.com/NixOS/nixpkgs",
4141
"owner": "basvandijk",
4242
"repo": "nixpkgs",
43-
"rev": "6938a95bd7da5fed8d32ee1b70177e0e2ee03647",
44-
"sha256": "1nv9gr277vfl2hjsmwyibl3r3dr3v208cq54jyx8agyls3zdp0nq",
43+
"rev": "37831d6d350d606194d4fbad8e29de48cdb4c426",
44+
"sha256": "1a4m1rf5nrq9qs972svclylz9m2nn001klk1b3zr4mry706ph5qp",
4545
"type": "tarball",
4646
"url": "https://github.com/basvandijk/nixpkgs/archive/6938a95bd7da5fed8d32ee1b70177e0e2ee03647.tar.gz",
4747
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"

0 commit comments

Comments
 (0)