about summary refs log tree commit diff
path: root/flake.nix
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-10-19 20:39:47 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-10-19 20:39:49 +0200
commit50486b77ebdec2f2b92980d88acfd75c283a4f6d (patch)
tree4c58c0791620281e43ec1f112ab3f0dc18f159ff /flake.nix
parentMisc: Separate OSSE into components (diff)
downloadOSSE-50486b77ebdec2f2b92980d88acfd75c283a4f6d.tar.gz
OSSE-50486b77ebdec2f2b92980d88acfd75c283a4f6d.tar.bz2
OSSE-50486b77ebdec2f2b92980d88acfd75c283a4f6d.zip
Misc: Change to use "oxalica/rust-overlay" for the nix development shell
This fixes vscode not being able to find rust-analyzer and rust-src
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix40
1 files changed, 28 insertions, 12 deletions
diff --git a/flake.nix b/flake.nix
index 74fd650..e21c25b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,16 +1,32 @@
 {
-  description = "baitinq.github.io flake";
+  description = "OSSE devshell";
 
-  inputs.flake-utils.url = "github:numtide/flake-utils";
-
-  outputs = { self, nixpkgs, flake-utils }:
-
-    flake-utils.lib.eachDefaultSystem
-      (system:
-        let pkgs = nixpkgs.legacyPackages.${system}; in
-        {
-          devShells.default = import ./shell.nix { inherit pkgs; };
-        }
-      );
+  inputs = {
+    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
+    rust-overlay.url = "github:oxalica/rust-overlay";
+    flake-utils.url = "github:numtide/flake-utils";
+  };
 
+  outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
+    flake-utils.lib.eachDefaultSystem (system:
+      let
+        overlays = [ (import rust-overlay) ];
+        pkgs = import nixpkgs {
+          inherit system overlays;
+        };
+      in
+      with pkgs;
+      {
+        devShells.default = mkShell {
+          buildInputs = [
+            openssl
+            pkgconfig
+            (rust-bin.beta.latest.default.override {
+              extensions = [ "rust-src" ];
+              targets = [ "x86_64-unknown-linux-gnu" ];
+            })
+          ];
+        };
+      }
+    );
 }