nixpkgs/pkgs/by-name/gp/gptman/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

32 lines
923 B
Nix

{ 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";
};
}