mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-08 14:03:29 +00:00
571c71e6f7
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.
43 lines
981 B
Nix
43 lines
981 B
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchCrate
|
|
, docutils
|
|
, installShellFiles
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "mdevctl";
|
|
version = "1.3.0";
|
|
|
|
src = fetchCrate {
|
|
inherit pname version;
|
|
hash = "sha256-4K4NW3DOTtzZJ7Gg0mnRPr88YeqEjTtKX+C4P8i923E=";
|
|
};
|
|
|
|
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
|
|
|
|
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;
|
|
};
|
|
}
|