diff --git a/pkgs/by-name/gi/gitlab/package.nix b/pkgs/by-name/gi/gitlab/package.nix index ddeb9be9bbdb..aa70fd9bb534 100644 --- a/pkgs/by-name/gi/gitlab/package.nix +++ b/pkgs/by-name/gi/gitlab/package.nix @@ -23,6 +23,9 @@ rustc, rustPlatform, + # gitlab-glaz + buildPackages, + # gpgme pkg-config, @@ -67,46 +70,57 @@ let buildFlags = [ "--enable-system-libraries" ]; }; - gitlab-glaz = attrs: { - cargoDeps = rustPlatform.fetchCargoVendor { - src = stdenv.mkDerivation { - inherit (buildRubyGem { inherit (attrs) gemName version source; }) - name - src - unpackPhase - nativeBuildInputs - ; - dontBuilt = true; - installPhase = '' - cp -R ext/glaz $out - cp Cargo.lock $out - ''; + gitlab-glaz = + attrs: + { + cargoDeps = rustPlatform.fetchCargoVendor { + src = stdenv.mkDerivation { + inherit (buildRubyGem { inherit (attrs) gemName version source; }) + name + src + unpackPhase + nativeBuildInputs + ; + dontBuilt = true; + installPhase = '' + cp -R ext/glaz $out + cp Cargo.lock $out + ''; + }; + hash = "sha256-5fGoW6TpkIQ8OIXjt2fLGzG9xhZ2TT+v2zLH1ecItII="; }; - hash = "sha256-5fGoW6TpkIQ8OIXjt2fLGzG9xhZ2TT+v2zLH1ecItII="; + + dontBuild = false; + + nativeBuildInputs = [ + cargo + rustc + rustPlatform.cargoSetupHook + rustPlatform.bindgenHook + ]; + + disallowedReferences = [ + rustc.unwrapped + ]; + + preInstall = '' + export CARGO_HOME="$PWD/../.cargo/" + ''; + + postInstall = '' + find $out -type f -name .rustc_info.json -delete + ''; + } + // lib.optionalAttrs stdenv.hostPlatform.isRiscV64 { + # protoc-bin-vendored ships no riscv64 protoc + postPatch = '' + substituteInPlace $cargoDepsCopy/source-*/glaz-proto-*/build.rs \ + --replace-fail 'protoc_bin_vendored::protoc_bin_path()?' \ + 'std::path::PathBuf::from(std::env::var("PROTOC")?)' + ''; + PROTOC = lib.getExe' buildPackages.protobuf "protoc"; }; - dontBuild = false; - - nativeBuildInputs = [ - cargo - rustc - rustPlatform.cargoSetupHook - rustPlatform.bindgenHook - ]; - - disallowedReferences = [ - rustc.unwrapped - ]; - - preInstall = '' - export CARGO_HOME="$PWD/../.cargo/" - ''; - - postInstall = '' - find $out -type f -name .rustc_info.json -delete - ''; - }; - gitlab-glfm-markdown = attrs: { cargoDeps = rustPlatform.fetchCargoVendor { src = stdenv.mkDerivation { diff --git a/pkgs/development/ruby-modules/gem-config/default.nix b/pkgs/development/ruby-modules/gem-config/default.nix index 422c973fe2de..31f930ef1086 100644 --- a/pkgs/development/ruby-modules/gem-config/default.nix +++ b/pkgs/development/ruby-modules/gem-config/default.nix @@ -1045,6 +1045,20 @@ in buildFlags = [ "--with-ssh" ]; }; + rbtrace = + attrs: + # unpack the vendored msgpack so the gnu-config hook can refresh its old config.{guess,sub} + lib.optionalAttrs (stdenv.hostPlatform.isRiscV64 || stdenv.hostPlatform.isLoongArch64) { + dontBuild = false; + postPatch = '' + tar -xzf ext/src/msgpack-1.1.0.tar.gz -C ext/src + ''; + preConfigure = '' + tar -czf ext/src/msgpack-1.1.0.tar.gz -C ext/src msgpack-1.1.0 + rm -r ext/src/msgpack-1.1.0 + ''; + }; + sassc = attrs: { nativeBuildInputs = [ rake ]; dontBuild = false;