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
This commit is contained in:
Ana Hobden 2022-12-12 08:18:29 -08:00 committed by GitHub
parent 148625c85f
commit d3b425a258
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 22 deletions

View file

@ -59,28 +59,18 @@
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library"; RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [ ];
pkg-config
];
buildInputs = with pkgs; [ buildInputs = with pkgs; [
toolchain toolchain
openssl
rust-analyzer rust-analyzer
cargo-outdated cargo-outdated
# CI dependencies
jq
codespell
findutils # for xargs
git
nixpkgs-fmt nixpkgs-fmt
eclint
check.check-rustfmt check.check-rustfmt
check.check-spelling check.check-spelling
check.check-nixpkgs-fmt check.check-nixpkgs-fmt
check.check-editorconfig 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"; version = "0.0.0-unreleased";
src = self; src = self;
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [ ];
pkg-config buildInputs = with pkgs; [ ] ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs.darwin.apple_sdk.frameworks; [
];
buildInputs = with pkgs; [
openssl
] ++ lib.optionals (pkgs.stdenv.isDarwin) (with pkgs.darwin.apple_sdk.frameworks; [
SystemConfiguration SystemConfiguration
]); ]);
@ -160,16 +146,12 @@
harmonicStatic = naerskLib.buildPackage harmonicStatic = naerskLib.buildPackage
(sharedAttrs // { (sharedAttrs // {
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl"; 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 { } // lib.optionalAttrs (system == "aarch64-linux") rec {
default = harmonicStatic; default = harmonicStatic;
harmonicStatic = naerskLib.buildPackage harmonicStatic = naerskLib.buildPackage
(sharedAttrs // { (sharedAttrs // {
CARGO_BUILD_TARGET = "aarch64-unknown-linux-musl"; CARGO_BUILD_TARGET = "aarch64-unknown-linux-musl";
OPENSSL_LIB_DIR = "${pkgs.pkgsStatic.openssl.out}/lib";
OPENSSL_INCLUDE_DIR = "${pkgs.pkgsStatic.openssl.dev}";
}); });
}); });
}; };

3
rust-toolchain.toml Normal file
View file

@ -0,0 +1,3 @@
[toolchain]
channel = "stable"
components = [ "rustfmt" ]