depot/third_party/nixpkgs/pkgs/by-name/md/mdevctl/package.nix
Luke Granger-Brown f92e137cfb
Some checks failed
/ combine-systems (push) Blocked by required conditions
/ build (x86_64-linux) (push) Failing after 11m44s
/ build (aarch64-linux) (push) Failing after 11m50s
/ build (push) Failing after 16m42s
Merge commit '1e2ed035f4bebc9adad02b365508ad96f7df87c1' into HEAD
2025-03-02 02:23:32 +00:00

49 lines
1.1 KiB
Nix

{
lib,
rustPlatform,
fetchCrate,
docutils,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "mdevctl";
version = "1.4.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-Zh+Dj3X87tTpqT/weZMpf7f3obqikjPy9pi50ifp6wQ=";
};
# https://github.com/mdevctl/mdevctl/issues/111
patches = [
./script-dir.patch
];
useFetchCargoVendor = true;
cargoHash = "sha256-LG5UaSUTF6pVx7BBLiZ/OmAZNCKswFlTqHymg3bDkuc=";
nativeBuildInputs = [
docutils
installShellFiles
];
postInstall = ''
ln -s mdevctl $out/bin/lsmdev
install -Dm444 60-mdevctl.rules -t $out/lib/udev/rules.d
installManPage $releaseDir/build/mdevctl-*/out/mdevctl.8
ln -s mdevctl.8 $out/share/man/man8/lsmdev.8
installShellCompletion $releaseDir/build/mdevctl-*/out/{lsmdev,mdevctl}.bash
'';
meta = with lib; {
homepage = "https://github.com/mdevctl/mdevctl";
description = "Mediated device management utility for linux";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ edwtjo ];
platforms = platforms.linux;
};
}