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
46
shell.nix
Normal file
46
shell.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ fenix ? (import (builtins.fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz") { })
|
||||
, pkgs ? (import <nixpkgs> {
|
||||
crossSystem = {
|
||||
config = "x86_64-w64-mingw32";
|
||||
};
|
||||
})
|
||||
, system ? builtins.currentSystem
|
||||
}:
|
||||
let
|
||||
fenix' = fenix.packages.${system};
|
||||
in
|
||||
pkgs.callPackage
|
||||
({ mkShell, lib, buildPackages, stdenv, windows, libgit2, pkg-config }: mkShell rec {
|
||||
buildInputs = [
|
||||
stdenv.cc
|
||||
windows.pthreads
|
||||
];
|
||||
|
||||
depsBuildBuild = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH="${lib.makeLibraryPath [buildPackages.buildPackages.libgit2]}";
|
||||
nativeBuildInputs = [
|
||||
buildPackages.stdenv.cc
|
||||
libgit2
|
||||
(fenix'.combine [
|
||||
(fenix'.complete.withComponents [
|
||||
"cargo"
|
||||
"rust-src"
|
||||
"clippy"
|
||||
"rustc"
|
||||
])
|
||||
fenix'.rust-analyzer
|
||||
fenix'.latest.rustfmt
|
||||
fenix'.targets.x86_64-pc-windows-gnu.latest.rust-std
|
||||
])
|
||||
];
|
||||
|
||||
LIBGIT2_NO_VENDOR=1;
|
||||
CARGO_BUILD_TARGET = "x86_64-pc-windows-gnu";
|
||||
TARGET_CC = "${stdenv.cc.targetPrefix}cc";
|
||||
CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER = TARGET_CC;
|
||||
CXXFLAGS_x86_64_pc_windows_gnu = "-Oz -shared -fno-threadsafe-statics";
|
||||
})
|
||||
{ }
|
||||
Loading…
Add table
Add a link
Reference in a new issue