nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 78 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 rustPlatform, 6 pkg-config, 7 makeWrapper, 8 udev, 9 systemd, 10 btrfs-progs, 11 cloud-utils, 12 cryptsetup, 13 e2fsprogs, 14 util-linux, 15 xfsprogs, 16 versionCheckHook, 17 nix-update-script, 18}: 19 20rustPlatform.buildRustPackage (finalAttrs: { 21 pname = "hot-resize"; 22 version = "0.1.4"; 23 24 src = fetchFromGitHub { 25 owner = "liberodark"; 26 repo = "hot-resize"; 27 tag = "v${finalAttrs.version}"; 28 hash = "sha256-JB1U7mL3rkrsekmKt+0J1nnbtnlk/typIIfz3E+1moc="; 29 }; 30 31 cargoHash = "sha256-+POAqB0msStix5KNqVwy8ckLEQ/rUsD52BtyetuKt2I="; 32 33 nativeBuildInputs = [ 34 pkg-config 35 makeWrapper 36 ]; 37 38 buildInputs = [ 39 udev 40 systemd.dev 41 ]; 42 43 PKG_CONFIG_PATH = "${systemd.dev}/lib/pkgconfig"; 44 45 postInstall = '' 46 wrapProgram $out/bin/hot-resize \ 47 --prefix PATH : ${ 48 lib.makeBinPath [ 49 btrfs-progs 50 cloud-utils 51 cryptsetup 52 e2fsprogs 53 udev 54 util-linux 55 xfsprogs 56 ] 57 } 58 ''; 59 60 nativeInstallCheckInputs = [ 61 versionCheckHook 62 ]; 63 versionCheckProgramArg = "--version"; 64 doInstallCheck = true; 65 66 passthru = { 67 updateScript = nix-update-script { }; 68 }; 69 70 meta = { 71 description = "Tool for hot resizing disk partitions and filesystems without rebooting"; 72 homepage = "https://github.com/liberodark/hot-resize"; 73 license = lib.licenses.gpl3Only; 74 maintainers = with lib.maintainers; [ liberodark ]; 75 platforms = lib.platforms.linux; 76 mainProgram = "hot-resize"; 77 }; 78})