nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, rustPlatform
3, fetchFromGitHub
4, pkg-config
5, curl
6, libgit2_1_5
7, openssl
8, zlib
9, stdenv
10, darwin
11}:
12
13rustPlatform.buildRustPackage rec {
14 pname = "cargo-shuttle";
15 version = "0.18.0";
16
17 src = fetchFromGitHub {
18 owner = "shuttle-hq";
19 repo = "shuttle";
20 rev = "v${version}";
21 hash = "sha256-8i7iYJ9j3NP7otA6d0ow9S6aV2TGxKtYlGS0FXTXUbM=";
22 };
23
24 cargoLock = {
25 lockFile = ./Cargo.lock;
26 outputHashes = {
27 "hyper-reverse-proxy-0.5.2-dev" = "sha256-R1ZXGgWvwHWRHmKX823QLqM6ZJW+tzWUXigKkAyI5OE=";
28 "tokiotest-httpserver-0.2.1" = "sha256-IPUaglIDwCUoczCCnX+R1IBqtc0s8b8toKEL8zN3/i8=";
29 };
30 };
31
32 nativeBuildInputs = [
33 curl
34 pkg-config
35 ];
36
37 buildInputs = [
38 curl
39 libgit2_1_5
40 openssl
41 zlib
42 ] ++ lib.optionals stdenv.isDarwin [
43 darwin.apple_sdk.frameworks.CoreServices
44 darwin.apple_sdk.frameworks.SystemConfiguration
45 ];
46
47 cargoBuildFlags = [ "-p" "cargo-shuttle" ];
48
49 cargoTestFlags = cargoBuildFlags ++ [
50 # other tests are failing for different reasons
51 "init::shuttle_init_tests::"
52 ];
53
54 meta = with lib; {
55 description = "A cargo command for the shuttle platform";
56 homepage = "https://shuttle.rs";
57 changelog = "https://github.com/shuttle-hq/shuttle/releases/tag/${src.rev}";
58 license = licenses.asl20;
59 maintainers = with maintainers; [ figsoda ];
60 };
61}