diff options
-rw-r--r-- | flake.lock | 70 | ||||
-rw-r--r-- | flake.nix | 40 | ||||
-rw-r--r-- | shell.nix | 6 |
3 files changed, 90 insertions, 26 deletions
diff --git a/flake.lock b/flake.lock index 2731fff..69029ba 100644 --- a/flake.lock +++ b/flake.lock @@ -15,23 +15,77 @@ "type": "github" } }, + "flake-utils_2": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1665940183, - "narHash": "sha256-cPe3F7CtnxU9YbJpc3Adl4d9kX+turqTv5FxM98i8vg=", - "path": "/nix/store/mrpx61vyrmhqhr2ms9svscyc1h523gf1-source", - "rev": "104e8082de1b20f9d0e1f05b1028795ed0e0e4bc", - "type": "path" + "lastModified": 1666109165, + "narHash": "sha256-BMLyNVkr0oONuq3lKlFCRVuYqF75CO68Z8EoCh81Zdk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "32096899af23d49010bd8cf6a91695888d9d9e73", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1665296151, + "narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "14ccaaedd95a488dd7ae142757884d8e125b3363", + "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" } }, "root": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1666148516, + "narHash": "sha256-pFgSJzUFsnCTulIzhn3HHImaZpqlMxAvXTrhg0qlMOE=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "3e41700ab6f585b9569112ee7516c74f8d072989", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" } } }, 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" ]; + }) + ]; + }; + } + ); } diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 2052aae..0000000 --- a/shell.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs ? import <nixpkgs> { } }: -pkgs.mkShell { - nativeBuildInputs = with pkgs; [ - cargo - ]; -} |