-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshell.nix
27 lines (22 loc) · 885 Bytes
/
shell.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
let
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
# Look here for information about how to generate `nixpkgs-version.json`.
# → https://nixos.wiki/wiki/FAQ/Pinning_Nixpkgs
pinnedVersion = builtins.fromJSON (builtins.readFile ./.nixpkgs-version.json);
pinnedPkgs = import (builtins.fetchGit {
inherit (pinnedVersion) url rev;
ref = "nixos-unstable";
}) { overlays = [ moz_overlay ]; };
rustChannel = pinnedPkgs.rustChannelOf { channel = "1.43.0"; };
deps = with pinnedPkgs; [ libdrm ];
in
# This allows overriding pkgs by passing `--arg pkgs ...`
{ pkgs ? pinnedPkgs }:
with pkgs;
mkShell {
buildInputs = [ cacert
rustChannel.cargo
rustChannel.rust
] ++ deps;
LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath deps}:$LD_LIBRARY_PATH";
}