forked from nrabulinski/attic
Revert bindgenHook workarounds
Fixed in https://github.com/NixOS/nixpkgs/pull/215060. This reverts commit365d739bca
. This reverts commitdb443f1932
. This reverts commit9869ab4a85
.
This commit is contained in:
parent
1a3b6513b0
commit
63f64ee8c4
14
crane.nix
14
crane.nix
|
@ -8,7 +8,6 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, craneLib
|
||||
, llvmPackages
|
||||
, rustPlatform
|
||||
, runCommand
|
||||
, writeReferencesToFile
|
||||
|
@ -33,6 +32,7 @@ let
|
|||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
rustPlatform.bindgenHook
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
@ -68,12 +68,6 @@ let
|
|||
|
||||
cargoExtraArgs = "-p attic-client -p attic-server";
|
||||
|
||||
# Temporary workaround for https://github.com/NixOS/nixpkgs/pull/207352#issuecomment-1418363441
|
||||
preBuild = ''
|
||||
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
|
||||
export BINDGEN_EXTRA_CLANG_ARGS="$(< ${llvmPackages.clang}/nix-support/cc-cflags) $(< ${llvmPackages.clang}/nix-support/libc-cflags) $(< ${llvmPackages.clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||
if [[ -f $out/bin/attic ]]; then
|
||||
installShellCompletion --cmd attic \
|
||||
|
@ -135,12 +129,6 @@ let
|
|||
|
||||
doCheck = true;
|
||||
|
||||
# Temporary workaround for https://github.com/NixOS/nixpkgs/pull/207352#issuecomment-1418363441
|
||||
preBuild = ''
|
||||
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
|
||||
export BINDGEN_EXTRA_CLANG_ARGS="$(< ${llvmPackages.clang}/nix-support/cc-cflags) $(< ${llvmPackages.clang}/nix-support/libc-cflags) $(< ${llvmPackages.clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
|
||||
'';
|
||||
|
||||
buildPhaseCargoCommand = "";
|
||||
checkPhaseCargoCommand = "cargoWithProfile test --no-run --message-format=json >cargo-test.json";
|
||||
doInstallCargoArtifacts = false;
|
||||
|
|
|
@ -117,11 +117,6 @@
|
|||
RUST_SRC_PATH = "${pkgs.rustPlatform.rustcSrc}/library";
|
||||
|
||||
ATTIC_DISTRIBUTOR = "dev";
|
||||
|
||||
shellHook = ''
|
||||
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib"
|
||||
export BINDGEN_EXTRA_CLANG_ARGS="$(< ${pkgs.llvmPackages.clang}/nix-support/cc-cflags) $(< ${pkgs.llvmPackages.clang}/nix-support/libc-cflags) $(< ${pkgs.llvmPackages.clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
|
||||
'';
|
||||
};
|
||||
|
||||
demo = pkgs.mkShell {
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
{ lib, stdenv, rustPlatform
|
||||
, pkg-config
|
||||
, installShellFiles
|
||||
, llvmPackages
|
||||
, nix
|
||||
, boost
|
||||
, darwin
|
||||
|
@ -32,6 +31,7 @@ in rustPlatform.buildRustPackage rec {
|
|||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
rustPlatform.bindgenHook
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
@ -50,12 +50,6 @@ in rustPlatform.buildRustPackage rec {
|
|||
|
||||
ATTIC_DISTRIBUTOR = "attic";
|
||||
|
||||
# Temporary workaround for https://github.com/NixOS/nixpkgs/pull/207352#issuecomment-1418363441
|
||||
preBuild = ''
|
||||
export LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib"
|
||||
export BINDGEN_EXTRA_CLANG_ARGS="$(< ${llvmPackages.clang}/nix-support/cc-cflags) $(< ${llvmPackages.clang}/nix-support/libc-cflags) $(< ${llvmPackages.clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
|
||||
'';
|
||||
|
||||
# Recursive Nix is not stable yet
|
||||
doCheck = false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue