about summary refs log tree commit diff
path: root/pkgs/tools/system/gptman/default.nix
blob: 484ab05a85f2f48831d69f584df8d6efb2f4f31e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv, testers, gptman }:

rustPlatform.buildRustPackage rec {
  pname = "gptman";
  version = "1.1.0";

  src = fetchFromGitHub {
    owner = "rust-disk-partition-management";
    repo = pname;
    rev = "v${version}";
    hash = "sha256-ebV61EilGggix6JSN/MW4Ka0itkSpvikLDSO005TTYY=";
  };

  cargoHash = "sha256-P+qez0oVsHBiaBYban2o8MRvF8ElLf5zb+p+tYunWWA=";

  buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;

  buildFeatures = [ "cli" ];

  passthru.tests.version = testers.testVersion {
    package = gptman;
  };

  meta = with lib; {
    description = "GPT manager that allows you to copy partitions from one disk to another and more";
    homepage = "https://github.com/rust-disk-partition-management/gptman";
    license = with licenses; [ asl20 /* or */ mit ];
    maintainers = with maintainers; [ akshgpt7 ];
    mainProgram = "gptman";
  };
}