diff --git a/pkgs/os-specific/linux/ax99100/default.nix b/pkgs/os-specific/linux/ax99100/default.nix new file mode 100644 index 000000000000..9167b4e5f89d --- /dev/null +++ b/pkgs/os-specific/linux/ax99100/default.nix @@ -0,0 +1,29 @@ +{ kernel, stdenv, kmod, lib, fetchzip }: +stdenv.mkDerivation +{ + pname = "ax99100"; + version = "1.8.0"; + nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; + src = fetchzip { + url = "https://www.asix.com.tw/en/support/download/file/1229"; + sha256 = "1rbp1m01qr6b3nbr72vpbw89pjh8mddc60im78z2yjd951xkbcjh"; + extension = "tar.bz2"; + }; + + makeFlags = [ "KDIR='${kernel.dev}/lib/modules/${kernel.modDirVersion}/build'" ]; + + installPhase = '' + mkdir -p $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/tty/serial + cp ax99100.ko $out/lib/modules/${kernel.modDirVersion}/kernel/drivers/tty/serial + ''; + + meta = { + description = "ASIX AX99100 Serial and Parralel Port driver"; + homepage = "https://www.asix.com.tw/en/product/Interface/PCIe_Bridge/AX99100"; + # According to the source code in the tarball, the license is gpl2. + license = lib.licenses.gpl2; + platforms = lib.platforms.linux; + # currently, the build fails with kernels newer than 5.17 + broken = lib.versionAtLeast kernel.version "5.18.0"; + }; +} diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 6e9f5fd5fc09..fe8969b43add 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -282,6 +282,8 @@ in { apfs = callPackage ../os-specific/linux/apfs { }; + ax99100 = callPackage ../os-specific/linux/ax99100 {}; + batman_adv = callPackage ../os-specific/linux/batman-adv {}; bbswitch = callPackage ../os-specific/linux/bbswitch {};