Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 42 lines 996 B view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 udevCheckHook, 6}: 7 8## Usage 9# In NixOS, simply add this package to services.udev.packages: 10# services.udev.packages = [ pkgs.android-udev-rules ]; 11 12stdenv.mkDerivation rec { 13 pname = "android-udev-rules"; 14 version = "20250525"; 15 16 src = fetchFromGitHub { 17 owner = "M0Rf30"; 18 repo = "android-udev-rules"; 19 rev = version; 20 hash = "sha256-4ODU9EoVYV+iSu6+M9ePed45QkOZgWkDUlFTlWJ8ttQ="; 21 }; 22 23 installPhase = '' 24 runHook preInstall 25 install -D 51-android.rules $out/lib/udev/rules.d/51-android.rules 26 runHook postInstall 27 ''; 28 29 nativeBuildInputs = [ 30 udevCheckHook 31 ]; 32 doInstallCheck = true; 33 34 meta = with lib; { 35 homepage = "https://github.com/M0Rf30/android-udev-rules"; 36 description = "Android udev rules list aimed to be the most comprehensive on the net"; 37 platforms = platforms.linux; 38 license = licenses.gpl3Plus; 39 maintainers = with maintainers; [ abbradar ]; 40 teams = [ lib.teams.android ]; 41 }; 42}