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
3 changed files with 2 additions and 25 deletions
14
crane.nix
14
crane.nix
|
@ -8,7 +8,6 @@
|
||||||
{ stdenv
|
{ stdenv
|
||||||
, lib
|
, lib
|
||||||
, craneLib
|
, craneLib
|
||||||
, llvmPackages
|
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, runCommand
|
, runCommand
|
||||||
, writeReferencesToFile
|
, writeReferencesToFile
|
||||||
|
@ -33,6 +32,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
rustPlatform.bindgenHook
|
||||||
pkg-config
|
pkg-config
|
||||||
installShellFiles
|
installShellFiles
|
||||||
];
|
];
|
||||||
|
@ -68,12 +68,6 @@ let
|
||||||
|
|
||||||
cargoExtraArgs = "-p attic-client -p attic-server";
|
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) ''
|
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
|
||||||
if [[ -f $out/bin/attic ]]; then
|
if [[ -f $out/bin/attic ]]; then
|
||||||
installShellCompletion --cmd attic \
|
installShellCompletion --cmd attic \
|
||||||
|
@ -135,12 +129,6 @@ let
|
||||||
|
|
||||||
doCheck = true;
|
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 = "";
|
buildPhaseCargoCommand = "";
|
||||||
checkPhaseCargoCommand = "cargoWithProfile test --no-run --message-format=json >cargo-test.json";
|
checkPhaseCargoCommand = "cargoWithProfile test --no-run --message-format=json >cargo-test.json";
|
||||||
doInstallCargoArtifacts = false;
|
doInstallCargoArtifacts = false;
|
||||||
|
|
|
@ -117,11 +117,6 @@
|
||||||
RUST_SRC_PATH = "${pkgs.rustPlatform.rustcSrc}/library";
|
RUST_SRC_PATH = "${pkgs.rustPlatform.rustcSrc}/library";
|
||||||
|
|
||||||
ATTIC_DISTRIBUTOR = "dev";
|
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 {
|
demo = pkgs.mkShell {
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
{ lib, stdenv, rustPlatform
|
{ lib, stdenv, rustPlatform
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, llvmPackages
|
|
||||||
, nix
|
, nix
|
||||||
, boost
|
, boost
|
||||||
, darwin
|
, darwin
|
||||||
|
@ -32,6 +31,7 @@ in rustPlatform.buildRustPackage rec {
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
rustPlatform.bindgenHook
|
||||||
pkg-config
|
pkg-config
|
||||||
installShellFiles
|
installShellFiles
|
||||||
];
|
];
|
||||||
|
@ -50,12 +50,6 @@ in rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
ATTIC_DISTRIBUTOR = "attic";
|
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
|
# Recursive Nix is not stable yet
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue