nixpkgs/pkgs/os-specific/linux/mdevctl/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

43 lines
983 B
Nix
Raw Normal View History

{ lib
, rustPlatform
, fetchCrate
, docutils
, installShellFiles
2022-11-07 09:40:53 +01:00
}:
rustPlatform.buildRustPackage rec {
2022-11-07 09:40:53 +01:00
pname = "mdevctl";
2024-01-30 20:21:35 +01:00
version = "1.3.0";
2022-11-07 09:40:53 +01:00
src = fetchCrate {
inherit pname version;
2024-01-30 20:21:35 +01:00
hash = "sha256-4K4NW3DOTtzZJ7Gg0mnRPr88YeqEjTtKX+C4P8i923E=";
2022-11-07 09:40:53 +01:00
};
2024-01-30 20:21:35 +01:00
cargoHash = "sha256-hCqNy32uPLsKfUJqiG2DRcXfqdvlp4bCutQmt+FieXc=";
nativeBuildInputs = [
docutils
installShellFiles
];
postInstall = ''
ln -s mdevctl $out/bin/lsmdev
install -Dm444 60-mdevctl.rules -t $out/lib/udev/rules.d
2022-11-07 09:40:53 +01:00
installManPage $releaseDir/build/mdevctl-*/out/mdevctl.8
ln -s mdevctl.8 $out/share/man/man8/lsmdev.8
2022-11-07 09:40:53 +01:00
installShellCompletion $releaseDir/build/mdevctl-*/out/{lsmdev,mdevctl}.bash
'';
2022-11-07 09:40:53 +01:00
meta = with lib; {
homepage = "https://github.com/mdevctl/mdevctl";
description = "A mediated device management utility for linux";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ edwtjo ];
platforms = platforms.linux;
};
}