fix: got everything to compile
This commit is contained in:
+15
-8
@@ -1,5 +1,5 @@
|
||||
{ pkgs, buildTools, buildEnvironment, craneLib, advisory-db, winpcap-libs
|
||||
, winpcap-drivers, freebsd-libs, libnl, libcap, libpcap-linux-musl
|
||||
, winpcap-drivers, win-openssl, freebsd-libs, libnl, libcap, libpcap-linux-musl
|
||||
, libpcap-linux-gnu, libpcap-freebsd }:
|
||||
let
|
||||
patch-elf = header: drv: path:
|
||||
@@ -103,7 +103,7 @@ let
|
||||
linuxArgs = commonArgs // {
|
||||
nativeBuildInputs = buildTools.linux ++ (with pkgs; [ musl ]);
|
||||
|
||||
#RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
};
|
||||
|
||||
freebsdArgs = commonArgs // {
|
||||
@@ -123,9 +123,11 @@ let
|
||||
doCheck = false;
|
||||
|
||||
nativeBuildInputs = buildTools.linux ++ buildTools.windows;
|
||||
|
||||
OPENSSL_DIR = win-openssl;
|
||||
};
|
||||
|
||||
gnuLinuxCargoArtifacts = craneLib.buildDepsOnly (linuxArgs // {
|
||||
gnuLinuxCargoArtifacts = craneLib.buildDepsOnly (commonArgs // {
|
||||
nativeBuildInputs = buildTools.linux ++ (with pkgs; [ glibc.static ]);
|
||||
name = "sparse-deps-gnu-linux";
|
||||
cargoExtraArgs =
|
||||
@@ -135,6 +137,7 @@ let
|
||||
name = "sparse-deps-linux";
|
||||
cargoExtraArgs =
|
||||
"--target=x86_64-unknown-linux-musl --locked -p sparse-unix-beacon -p sparse-unix-installer";
|
||||
RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
});
|
||||
freebsdCargoArtifacts = craneLib.buildDepsOnly (freebsdArgs // {
|
||||
name = "sparse-deps-freebsd";
|
||||
@@ -180,7 +183,7 @@ let
|
||||
fileSetForBeaconCrate ./sparse-windows-beacon ./sparse-windows-infector;
|
||||
|
||||
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
# CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
});
|
||||
|
||||
sparse-beacon-windows-svc = craneLib.buildPackage (windowsArgs // {
|
||||
@@ -191,7 +194,7 @@ let
|
||||
fileSetForBeaconCrate ./sparse-windows-beacon ./sparse-windows-infector;
|
||||
|
||||
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
# CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
});
|
||||
|
||||
linux-loader = pkgs.stdenv.mkDerivation {
|
||||
@@ -286,14 +289,14 @@ let
|
||||
SPARSE_LIBRARY = "${sparse-beacon-windows}/lib/sparse_windows_beacon.dll";
|
||||
});
|
||||
|
||||
sparse-server = craneLib.mkCargoDerivation (commonArgs // {
|
||||
sparse-server = craneLib.mkCargoDerivation (linuxArgs // {
|
||||
src = fileSetForWebCrate;
|
||||
|
||||
cargoArtifacts = gnuLinuxCargoArtifacts;
|
||||
|
||||
nativeBuildInputs = buildTools.linux ++ (with pkgs; [ glibc.static ]);
|
||||
name = "sparse-server-webclient";
|
||||
pname = "sparse-server-webclient";
|
||||
name = "sparse-server";
|
||||
pname = "sparse-server";
|
||||
|
||||
buildPhaseCargoCommand = ''
|
||||
cargo leptos build \
|
||||
@@ -309,6 +312,8 @@ let
|
||||
'';
|
||||
doCheck = false;
|
||||
|
||||
RUSTFLAGS = "";
|
||||
|
||||
SPARSE_INSTALLER_LINUX =
|
||||
"${sparse-installer-linux}/bin/sparse-unix-installer";
|
||||
SPARSE_INSTALLER_FREEBSD =
|
||||
@@ -342,6 +347,8 @@ let
|
||||
linux-loader freebsd-loader-sysv sparse-installer-linux
|
||||
sparse-installer-freebsd sparse-installer-windows;
|
||||
|
||||
inherit freebsd-zig-libc;
|
||||
|
||||
default = sparse-server;
|
||||
};
|
||||
checks = outputs.packages // {
|
||||
|
||||
Reference in New Issue
Block a user