From d3b425a258337520474b7bec34f92a0348b5583f Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Mon, 12 Dec 2022 08:18:29 -0800 Subject: [PATCH] We didn't need openssl anyways (#111) * We didn't need openssl anyways * Fmt * We don't need pkg-config either * Add trivial rust-toolchain.toml * fmt --- flake.nix | 26 ++++---------------------- rust-toolchain.toml | 3 +++ 2 files changed, 7 insertions(+), 22 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/flake.nix b/flake.nix index 8625543..af7a387 100644 --- a/flake.nix +++ b/flake.nix @@ -59,28 +59,18 @@ RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library"; - nativeBuildInputs = with pkgs; [ - pkg-config - ]; + nativeBuildInputs = with pkgs; [ ]; buildInputs = with pkgs; [ toolchain - openssl rust-analyzer cargo-outdated - - # CI dependencies - jq - codespell - findutils # for xargs - git nixpkgs-fmt - eclint check.check-rustfmt check.check-spelling check.check-nixpkgs-fmt check.check-editorconfig ] - ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [ libiconv darwin.apple_sdk.frameworks.Security ]); + ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [ libiconv ]); }; }); @@ -129,12 +119,8 @@ version = "0.0.0-unreleased"; src = self; - nativeBuildInputs = with pkgs; [ - pkg-config - ]; - buildInputs = with pkgs; [ - openssl - ] ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs.darwin.apple_sdk.frameworks; [ + nativeBuildInputs = with pkgs; [ ]; + buildInputs = with pkgs; [ ] ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs.darwin.apple_sdk.frameworks; [ SystemConfiguration ]); @@ -160,16 +146,12 @@ harmonicStatic = naerskLib.buildPackage (sharedAttrs // { CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl"; - OPENSSL_LIB_DIR = "${pkgs.pkgsStatic.openssl.out}/lib"; - OPENSSL_INCLUDE_DIR = "${pkgs.pkgsStatic.openssl.dev}"; }); } // lib.optionalAttrs (system == "aarch64-linux") rec { default = harmonicStatic; harmonicStatic = naerskLib.buildPackage (sharedAttrs // { CARGO_BUILD_TARGET = "aarch64-unknown-linux-musl"; - OPENSSL_LIB_DIR = "${pkgs.pkgsStatic.openssl.out}/lib"; - OPENSSL_INCLUDE_DIR = "${pkgs.pkgsStatic.openssl.dev}"; }); }); }; diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..ffa1197 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "stable" +components = [ "rustfmt" ] \ No newline at end of file