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