nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 openssl,
7 zlib,
8 versionCheckHook,
9 nix-update-script,
10}:
11
12rustPlatform.buildRustPackage (finalAttrs: {
13 pname = "cargo-shuttle";
14 version = "0.57.3";
15
16 src = fetchFromGitHub {
17 owner = "shuttle-hq";
18 repo = "shuttle";
19 tag = "v${finalAttrs.version}";
20 hash = "sha256-qPevl75wmOYVhTgMiJOi+6j8LBWKzM7HPhd5mdf2B+8=";
21 };
22
23 cargoHash = "sha256-H2fy2NQvLQEzbQik+nrUvoYZaWQRXX6PpO9LcYfiF2I=";
24
25 nativeBuildInputs = [ pkg-config ];
26
27 buildInputs = [
28 openssl
29 zlib
30 ];
31
32 cargoBuildFlags = [
33 "-p"
34 "cargo-shuttle"
35 ];
36
37 cargoTestFlags = finalAttrs.cargoBuildFlags ++ [
38 # other tests are failing for different reasons
39 "init::shuttle_init_tests::"
40 ];
41
42 doInstallCheck = true;
43 nativeInstallCheckInputs = [ versionCheckHook ];
44 versionCheckProgramArg = "--version";
45
46 passthru.updateScript = nix-update-script { };
47
48 meta = {
49 description = "Cargo command for the shuttle platform";
50 mainProgram = "cargo-shuttle";
51 homepage = "https://shuttle.rs";
52 changelog = "https://github.com/shuttle-hq/shuttle/releases/tag/v${finalAttrs.version}";
53 license = lib.licenses.asl20;
54 maintainers = [ lib.maintainers.progrm_jarvis ];
55 };
56})