Got windows build working within a shell, with no features enabled
This commit is contained in:
parent
bd09a1ad7b
commit
7008e1653b
15
default.nix
15
default.nix
@ -40,10 +40,10 @@ let
|
||||
"x86_64-windows" = newBuildTarget {
|
||||
nixPkgsSystem = "x86_64-w64-mingw32";
|
||||
rustTarget = "x86_64-pc-windows-gnu";
|
||||
depsBuildBuild = pkgsCross: [
|
||||
pkgsCross.stdenv.cc
|
||||
pkgsCross.windows.pthreads
|
||||
];
|
||||
#depsBuildBuild = pkgsCross: [
|
||||
# pkgsCross.stdenv.cc
|
||||
# pkgsCross.windows.pthreads
|
||||
#];
|
||||
};
|
||||
};
|
||||
|
||||
@ -123,7 +123,6 @@ let
|
||||
"garage/kubernetes-discovery"
|
||||
"garage/metrics"
|
||||
"garage/telemetry-otlp"
|
||||
"garage/lmdb"
|
||||
"garage/sqlite"
|
||||
] else [ ]
|
||||
)
|
||||
@ -147,6 +146,8 @@ let
|
||||
nativeBuildInputs = (buildTarget.depsBuildBuild pkgsCross) ++ [
|
||||
toolchain
|
||||
pkgs.protobuf
|
||||
#pkgsCross.stdenv.cc
|
||||
#pkgsCross.windows.pthreads
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -154,10 +155,6 @@ let
|
||||
pkgsCross.windows.pthreads
|
||||
];
|
||||
|
||||
OPENSSL_STATIC = "1";
|
||||
OPENSSL_LIB_DIR = "${pkgsCross.pkgsStatic.openssl.out}/lib";
|
||||
OPENSSL_INCLUDE_DIR = "${pkgsCross.pkgsStatic.openssl.dev}/include";
|
||||
|
||||
SODIUM_LIB_DIR = "${libsodium}/lib";
|
||||
|
||||
# Required because ring crate is special. This also seems to have
|
||||
|
@ -80,10 +80,10 @@
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1682109806,
|
||||
"narHash": "sha256-d9g7RKNShMLboTWwukM+RObDWWpHKaqTYXB48clBWXI=",
|
||||
"narHash": "sha256-lHrKvEkCPTUO+7tPfjIcb7Trk6k31rz18vkyqmkeJfY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2362848adf8def2866fabbffc50462e929d7fffb",
|
||||
"rev": "ea4c80b39be4c09702b0cb3b42eab59e2ba4f24b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -978,6 +978,7 @@ impl NodeStatus {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
fn get_default_ip() -> Option<IpAddr> {
|
||||
pnet_datalink::interfaces()
|
||||
.iter()
|
||||
@ -986,6 +987,11 @@ fn get_default_ip() -> Option<IpAddr> {
|
||||
.map(|a| a.ip())
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
fn get_default_ip() -> Option<IpAddr> {
|
||||
None
|
||||
}
|
||||
|
||||
async fn resolve_peers(peers: &[String]) -> Vec<(NodeID, SocketAddr)> {
|
||||
let mut ret = vec![];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user