diff --git a/.gitignore b/.gitignore index 34525b2..5691e8f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # Generated by Cargo # will have compiled files and executables /target/ +result # These are backup files generated by rustfmt **/*.rs.bk diff --git a/Cargo.lock b/Cargo.lock index 0bcac51..8be0874 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2335,9 +2335,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.34" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", "itoa", @@ -2356,9 +2356,9 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" dependencies = [ "num-conv", "time-core", diff --git a/flake.nix b/flake.nix index 8dac1af..5dea345 100644 --- a/flake.nix +++ b/flake.nix @@ -7,38 +7,41 @@ 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; }; - rusttoolchain = - pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; - cargoToml = (builtins.fromTOML (builtins.readFile ./Cargo.toml)); - - in rec { - # `nix build` - packages = { - ironhide = pkgs.rustPlatform.buildRustPackage { - pname = cargoToml.package.name; - version = cargoToml.package.version; - src = ./.; - cargoLock.lockFile = ./Cargo.lock; - nativeBuildInputs = with pkgs; - [ rusttoolchain ] - ++ pkgs.lib.optionals pkgs.stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.Security ]; - }; - default = packages.ironhide; - }; - - # nix develop - devShells.default = pkgs.mkShell { - buildInputs = with pkgs; - [ rusttoolchain] + outputs = { + self, + nixpkgs, + rust-overlay, + flake-utils, + ... + }: + flake-utils.lib.eachDefaultSystem (system: let + overlays = [(import rust-overlay)]; + pkgs = import nixpkgs {inherit system overlays;}; + rusttoolchain = + pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; + cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml); + in rec { + # `nix build` + packages = { + ironhide = pkgs.rustPlatform.buildRustPackage { + pname = cargoToml.package.name; + version = cargoToml.package.version; + src = ./.; + cargoLock.lockFile = ./Cargo.lock; + nativeBuildInputs = with pkgs; + [rusttoolchain] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin - [ pkgs.darwin.apple_sdk.frameworks.Security ]; + (with pkgs.darwin.apple_sdk.frameworks; [Security SystemConfiguration]); }; + default = packages.ironhide; + }; - }); + # nix develop + devShells.default = pkgs.mkShell { + buildInputs = with pkgs; + [rusttoolchain] + ++ pkgs.lib.optionals pkgs.stdenv.isDarwin + (with pkgs.darwin.apple_sdk.frameworks; [Security SystemConfiguration]); + }; + }); }