mirror of
https://github.com/kittywitch/gw2buttplug-rs.git
synced 2026-02-09 09:19:17 -08:00
ops: ci
This commit is contained in:
parent
ceec8edd33
commit
b9d61ddee9
10 changed files with 515 additions and 0 deletions
43
package.nix
Normal file
43
package.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ lib, buildPackages, craneLib, stdenv, windows, pkg-config, features ? []}:
|
||||
|
||||
craneLib.buildPackage rec {
|
||||
src = ./.;
|
||||
strictDeps = true;
|
||||
cargoExtraArgs = if features != [] then lib.escapeShellArgs (["--features"] ++ features) else "";
|
||||
|
||||
buildInputs = [
|
||||
stdenv.cc
|
||||
windows.pthreads
|
||||
];
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
# libgit2 stuff is given as an example of how to provide libraries to the build process
|
||||
#LD_LIBRARY_PATH="${lib.makeLibraryPath [buildPackages.buildPackages.libgit2]}";
|
||||
|
||||
nativeBuildInputs = [
|
||||
buildPackages.stdenv.cc
|
||||
#libgit2
|
||||
];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
LIBGIT2_NO_VENDOR = 1;
|
||||
|
||||
# Tells Cargo that we're building for Windows.
|
||||
# (https://doc.rust-lang.org/cargo/reference/config.html#buildtarget)
|
||||
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
||||
|
||||
#TARGET_CC = "${pkgsCross.stdenv.cc}/bin/${pkgsCross.stdenv.cc.targetPrefix}cc";
|
||||
TARGET_CC = "${stdenv.cc.targetPrefix}cc";
|
||||
|
||||
# Build without a dependency not provided by wine
|
||||
CXXFLAGS_x86_64_pc_windows_gnu = "-Oz -shared -fno-threadsafe-statics";
|
||||
PROFILE="release";
|
||||
CARGO_BUILD_RUSTFLAGS = [
|
||||
"-C"
|
||||
"linker=${TARGET_CC}"
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue