Commit da7a6ed8 authored by K900's avatar K900
Browse files

Merge remote-tracking branch 'origin/master' into staging-next

parents bc06ca7d 09cd0b16
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
# This file is used by .github/workflows/labels.yml
# This version is only run for Pull Requests from protected branches like staging-next, haskell-updates or python-updates.

"4.workflow: package set update":
  - any:
    - head-branch:
      - '-updates$'

"4.workflow: staging":
  - any:
    - head-branch:
      - '^staging-next$'
      - '^staging-next-'

"6.topic: haskell":
  - any:
    - head-branch:
      - '^haskell-updates$'

"6.topic: python":
  - any:
    - head-branch:
      - '^python-updates$'
+6 −0
Original line number Diff line number Diff line
@@ -3,6 +3,12 @@

# keep-sorted start case=no numeric=yes newline_separated=yes skip_lines=1

"4.workflow: backport":
  - any:
    - base-branch:
      - '^release-'
      - '^staging-'

# NOTE: bsd, darwin and cross-compilation labels are handled by ofborg
"6.topic: agda":
  - any:
+11 −0
Original line number Diff line number Diff line
@@ -20,12 +20,23 @@ jobs:
    if: "github.repository_owner == 'NixOS' && !contains(github.event.pull_request.title, '[skip treewide]')"
    steps:
      - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
        if: "!(github.pull_request.head.repo == 'NixOS' && github.ref_protected)"
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          configuration-path: .github/labeler.yml # default
          sync-labels: true
      - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
        if: "!(github.pull_request.head.repo == 'NixOS' && github.ref_protected)"
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          configuration-path: .github/labeler-no-sync.yml
          sync-labels: false
      - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 # v5.0.0
        # Protected branches like staging-next, haskell-updates and python-updates get special labels.
        # This is to avoid the mass of labels there, which is mostly useless - and really annoying for
        # the backport labels.
        if: "github.pull_request.head.repo == 'NixOS' && github.ref_protected"
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          configuration-path: .github/labeler-protected-branches.yml
          sync-labels: true
+13 −21
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@
  libevent,
  libsodium,
  makeWrapper,
  rustc,
  rustPlatform,
  pkg-config,
  stdenv,
@@ -24,7 +25,7 @@
  zeromq,
}:

rustPlatform.buildRustPackage.override { inherit stdenv; } rec {
stdenv.mkDerivation rec {
  pname = "zcash";
  version = "5.4.2";

@@ -35,14 +36,16 @@ rustPlatform.buildRustPackage.override { inherit stdenv; } rec {
    hash = "sha256-XGq/cYUo43FcpmRDO2YiNLCuEQLsTFLBFC4M1wM29l8=";
  };

  prePatch = lib.optionalString stdenv.hostPlatform.isAarch64 ''
    substituteInPlace .cargo/config.offline \
      --replace "[target.aarch64-unknown-linux-gnu]" "" \
      --replace "linker = \"aarch64-linux-gnu-gcc\"" ""
  '';
  patches = [
    # upstream has a custom way of specifying a cargo vendor-directory
    # we'll remove that logic, since cargoSetupHook from nixpkgs works better
    ./dont-use-custom-vendoring-logic.patch
  ];

  useFetchCargoVendor = true;
  cargoHash = "sha256-VBqasLpxqI4kr73Mr7OVuwb2OIhUwnY9CTyZZOyEElU=";
  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit pname version src;
    hash = "sha256-VBqasLpxqI4kr73Mr7OVuwb2OIhUwnY9CTyZZOyEElU=";
  };

  nativeBuildInputs = [
    autoreconfHook
@@ -52,6 +55,8 @@ rustPlatform.buildRustPackage.override { inherit stdenv; } rec {
    hexdump
    makeWrapper
    pkg-config
    rustc
    rustPlatform.cargoSetupHook
  ];

  buildInputs = [
@@ -64,19 +69,6 @@ rustPlatform.buildRustPackage.override { inherit stdenv; } rec {
    zeromq
  ];

  # Use the stdenv default phases (./configure; make) instead of the
  # ones from buildRustPackage.
  configurePhase = "configurePhase";
  dontCargoBuild = true;
  dontCargoCheck = true;
  dontCargoInstall = true;

  postPatch = ''
    # Have to do this here instead of in preConfigure because
    # cargoDepsCopy gets unset after postPatch.
    configureFlagsArray+=("RUST_VENDORED_SOURCES=$cargoDepsCopy")
  '';

  CXXFLAGS = [
    "-I${lib.getDev utf8cpp}/include/utf8cpp"
    "-I${lib.getDev cxx-rs}/include"
+16 −0
Original line number Diff line number Diff line
diff --git a/src/Makefile.am b/src/Makefile.am
index 8b14284..e614755 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -121,10 +121,7 @@ else
 RUST_BUILD_OPTS += --locked --offline
 
 CARGO_CONFIGURED = $(top_srcdir)/.cargo/.configured-for-offline
-$(CARGO_CONFIGURED): $(top_srcdir)/.cargo/config.offline
-	$(AM_V_at)rm -f $(top_srcdir)/.cargo/.configured-for-online
-	$(AM_V_at)cp $< $(top_srcdir)/.cargo/config
-	$(AM_V_at)echo "directory = \"$(RUST_VENDORED_SOURCES)\"" >>$(top_srcdir)/.cargo/config
+$(CARGO_CONFIGURED):
 	$(AM_V_at)touch $@
 endif
 if ENABLE_SHANI
Loading