diff --git a/lib/maintainers.nix b/lib/maintainers.nix index c3ae1a5ef70c..cbf7e02d3f4d 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -349,6 +349,7 @@ tv = "Tomislav Viljetić "; tvestelind = "Tomas Vestelind "; twey = "James ‘Twey’ Kay "; + uralbash = "Svintsov Dmitry "; urkud = "Yury G. Kudryashov "; vandenoever = "Jos van den Oever "; vanzef = "Ivan Solyankin "; diff --git a/pkgs/os-specific/linux/mxu11x0/default.nix b/pkgs/os-specific/linux/mxu11x0/default.nix new file mode 100644 index 000000000000..4af404324039 --- /dev/null +++ b/pkgs/os-specific/linux/mxu11x0/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchFromGitHub, kernel }: + +# it doesn't compile anymore on 3.14 +assert stdenv.lib.versionAtLeast kernel.version "3.18"; + +stdenv.mkDerivation { + name = "mxu11x0-1.3.11-${kernel.version}"; + + src = fetchFromGitHub { + owner = "ellysh"; + repo = "mxu11x0"; + rev = "de54053d6f297785d77aba9e9c880001519ffddf"; + sha256 = "1zmqanw22pgaj3b3lnciq33w6svm5ngg6g0k5xxwwijixg8ri3lf"; + }; + + preBuild = '' + sed -i -e "s/\$(uname -r).*/${kernel.modDirVersion}/g" driver/mxconf + sed -i -e "s/\$(shell uname -r).*/${kernel.modDirVersion}/g" driver/Makefile + sed -i -e 's|/lib/modules|${kernel.dev}/lib/modules|' driver/mxconf + sed -i -e 's|/lib/modules|${kernel.dev}/lib/modules|' driver/Makefile + ''; + installPhase = '' + install -v -D -m 644 ./driver/mxu11x0.ko "$out/lib/modules/${kernel.modDirVersion}/kernel/drivers/usb/serial/mxu11x0.ko" + install -v -D -m 644 ./driver/mxu11x0.ko "$out/lib/modules/${kernel.modDirVersion}/misc/mxu11x0.ko" + ''; + + dontStrip = true; + + enableParallelBuilding = true; + + meta = with stdenv.lib; { + description = "MOXA UPort 11x0 USB to Serial Hub driver"; + homepage = "https://github.com/ellysh/mxu11x0"; + license = licenses.gpl1; + maintainers = with maintainers; [ uralbash ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d4687af1ef6c..83dd2b70a9f9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10661,6 +10661,8 @@ let mba6x_bl = callPackage ../os-specific/linux/mba6x_bl { }; + mxu11x0 = callPackage ../os-specific/linux/mxu11x0 { }; + /* compiles but has to be integrated into the kernel somehow Let's have it uncommented and finish it.. */