aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2021-05-13 18:01:12 +0100
committerAkshay <[email protected]>2021-05-13 18:01:12 +0100
commitbf30b22665ef596f8627559bd8378d7ab6fbbd47 (patch)
treefd762fbf2018e5fbebafdb68bcf7e09df041c2db
parentbe6e0e35200ade0dc1d1f169896c0b69364c1c38 (diff)
update env
-rw-r--r--flake.nix91
1 files changed, 47 insertions, 44 deletions
diff --git a/flake.nix b/flake.nix
index d910720..6e9f56b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -9,49 +9,52 @@
9 }; 9 };
10 10
11 outputs = { self, nixpkgs, utils, naersk, mozillapkgs }: 11 outputs = { self, nixpkgs, utils, naersk, mozillapkgs }:
12 utils.lib.eachDefaultSystem (system: let 12 utils.lib.eachDefaultSystem (system:
13 pkgs = nixpkgs.legacyPackages."${system}"; 13 let
14 pkgs = nixpkgs.legacyPackages."${system}";
14 15
15 # Get a specific rust version 16 # Get a specific rust version
16 mozilla = pkgs.callPackage (mozillapkgs + "/package-set.nix") {}; 17 mozilla = pkgs.callPackage (mozillapkgs + "/package-set.nix") { };
17 rust = (mozilla.rustChannelOf { 18 chanspec = {
18 date = "2020-12-23"; 19 date = "2021-03-31";
19 channel = "nightly"; 20 channel = "nightly";
20 sha256 = "LbKHsCOFXWpg/SEyACfzZuWjKbkXdH6EJKOPSGoO01E="; # set zeros after modifying channel or date 21 sha256 = "oK5ebje09MRn988saJMT3Zze/tRE7u9zTeFPV1CEeLc="; # set zeros after modifying channel or date
21 }).rust; 22 };
22 rust-src = (mozilla.rustChannelOf {
23 date = "2020-12-23";
24 channel = "nightly";
25 sha256 = "LbKHsCOFXWpg/SEyACfzZuWjKbkXdH6EJKOPSGoO01E="; # set zeros after modifying channel or date
26 }).rust-src;
27 23
28 naersk-lib = naersk.lib."${system}".override { 24 rustChannel = mozilla.rustChannelOf chanspec;
29 cargo = rust; 25 rust = rustChannel.rust;
30 rustc = rust; 26 rust-src = rustChannel.rust-src;
31 }; 27
32 in rec { 28
33 packages.my-project = naersk-lib.buildPackage { 29 naersk-lib = naersk.lib."${system}".override {
34 pname = "dijo"; 30 cargo = rust;
35 version = "0.2.7"; 31 rustc = rust;
36 root = ./.; 32 };
37 }; 33 in
38 defaultPackage = packages.my-project; 34 rec {
39 apps.my-project = utils.lib.mkApp { 35 packages.my-project = naersk-lib.buildPackage {
40 drv = packages.my-project; 36 pname = "dijo";
41 }; 37 version = "0.2.7";
42 defaultApp = apps.my-project; 38 root = ./.;
43 devShell = pkgs.mkShell { 39 };
44 nativeBuildInputs = [ 40 defaultPackage = packages.my-project;
45 rust 41 apps.my-project = utils.lib.mkApp {
46 rust-src 42 drv = packages.my-project;
47 pkgs.rust-analyzer 43 };
48 pkgs.cargo 44 defaultApp = apps.my-project;
49 pkgs.openssl 45 devShell = pkgs.mkShell {
50 pkgs.ncurses 46 nativeBuildInputs = [
51 ]; 47 rust
52 shellHook = '' 48 rust-src
53 export RUST_SRC_PATH="${rust-src}/lib/rustlib/src/rust/library" 49 pkgs.rust-analyzer
54 ''; 50 pkgs.cargo
55 }; 51 pkgs.openssl
56 }); 52 pkgs.ncurses
57 } 53 ];
54 RUST_SRC_PATH = "${rust-src}/lib/rustlib/src/rust/library";
55 RUST_LOG = "info";
56 RUST_BACKTRACE = 1;
57
58 };
59 });
60}