diff --git a/flake.lock b/flake.lock index ff42753..93c4c70 100644 --- a/flake.lock +++ b/flake.lock @@ -51,11 +51,27 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1651773324, + "narHash": "sha256-+tzXzgZQMCxacRmEDRjdbYulorD40BI+YK6aWBwgCcM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "a1439bc96590dae913369f4515ca3df6ca1a1556", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", "naersk": "naersk", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" } } }, diff --git a/flake.nix b/flake.nix index df1aea0..8cb2a0e 100644 --- a/flake.nix +++ b/flake.nix @@ -2,13 +2,15 @@ description = "A discord bot for Dự Tuyển Tổng Hợp server"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/21.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs"; naersk.url = "github:nix-community/naersk"; naersk.inputs.nixpkgs.follows = "nixpkgs"; flake-utils.url = "github:numtide/flake-utils"; }; - outputs = { self, nixpkgs, naersk, flake-utils }: flake-utils.lib.eachDefaultSystem (system: + outputs = { self, nixpkgs, nixpkgs-unstable, naersk, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}"; + pkgs-unstable = nixpkgs-unstable.legacyPackages."${system}"; naersk-lib = naersk.lib."${system}"; in rec { @@ -38,7 +40,8 @@ devShell = pkgs.mkShell { nativeBuildInputs = - (with pkgs; [ rustc cargo rust-analyzer rustfmt ]) + (with pkgs; [ rustc cargo ]) + ++ (with pkgs-unstable; [ rust-analyzer rustfmt ]) ++ nixpkgs.lib.optionals (nixpkgs.lib.strings.hasSuffix "darwin" system) (with pkgs; [ libiconv darwin.apple_sdk.frameworks.Security