Merge pull request #232068 from figsoda/shuttle

This commit is contained in:
figsoda 2023-05-16 12:42:38 -04:00 committed by GitHub
commit f1006a6b78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7678 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,73 @@
{ lib
, rustPlatform
, fetchFromGitHub
, fetchpatch
, pkg-config
, curl
, libgit2_1_5
, openssl
, zlib
, stdenv
, darwin
}:
rustPlatform.buildRustPackage rec {
pname = "shuttle";
version = "0.16.0";
src = fetchFromGitHub {
owner = "shuttle-hq";
repo = "shuttle";
rev = "v${version}";
hash = "sha256-lDRT3M6LfQrts9X2erRVyqTFWVqOwWQ/JFB1ZlK6Lo8=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"hyper-reverse-proxy-0.5.2-dev" = "sha256-R1ZXGgWvwHWRHmKX823QLqM6ZJW+tzWUXigKkAyI5OE=";
"tokiotest-httpserver-0.2.1" = "sha256-IPUaglIDwCUoczCCnX+R1IBqtc0s8b8toKEL8zN3/i8=";
};
};
patches = [
# make sure to have only one revision of hyper-reverse-proxy
# necessary to make `importCargoLock` work
# https://github.com/shuttle-hq/shuttle/pull/921
(fetchpatch {
name = "chore-promote-hyper-reverse-proxy-to-a-workspace-dependency.patch";
url = "https://github.com/shuttle-hq/shuttle/commit/5c398427229f1358bd26ec81a2a22d01adf11b3d.patch";
hash = "sha256-fJBz/0StMALtJYh/Ec/KGCwCGLtch+HH/oYlibE8xcw=";
})
];
nativeBuildInputs = [
curl
pkg-config
];
buildInputs = [
curl
libgit2_1_5
openssl
zlib
] ++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.CoreServices
darwin.apple_sdk.frameworks.SystemConfiguration
];
cargoBuildFlags = [ "-p" "cargo-shuttle" ];
cargoTestFlags = cargoBuildFlags ++ [
# other tests are failing for different reasons
"init::shuttle_init_tests::"
];
meta = with lib; {
description = "A cargo command for the shuttle platform";
homepage = "https://shuttle.rs";
changelog = "https://github.com/shuttle-hq/shuttle/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ figsoda ];
};
}

View file

@ -16381,6 +16381,7 @@ with pkgs;
cargo-semver-checks = callPackage ../development/tools/rust/cargo-semver-checks { };
cargo-show-asm = callPackage ../development/tools/rust/cargo-show-asm { };
cargo-shuttle = callPackage ../development/tools/rust/cargo-shuttle { };
cargo-sort = callPackage ../development/tools/rust/cargo-sort { };
cargo-spellcheck = callPackage ../development/tools/rust/cargo-spellcheck {