diff options
author | Rishi Desai <rishi@saronic.com> | 2023-07-20 19:58:50 -0500 |
---|---|---|
committer | Rishi Desai <rishi@saronic.com> | 2023-07-21 10:48:13 -0500 |
commit | 4c251b10d47c7ccef57b4a8fc683afac1137422c (patch) | |
tree | bbb78903837f5db4d3555e4418ffa071ac7308f3 | |
parent | 5715a24aed375e171945073cfe5b205644056fca (diff) | |
download | nixpkgs-4c251b10d47c7ccef57b4a8fc683afac1137422c.tar nixpkgs-4c251b10d47c7ccef57b4a8fc683afac1137422c.tar.gz nixpkgs-4c251b10d47c7ccef57b4a8fc683afac1137422c.tar.bz2 nixpkgs-4c251b10d47c7ccef57b4a8fc683afac1137422c.tar.lz nixpkgs-4c251b10d47c7ccef57b4a8fc683afac1137422c.tar.xz nixpkgs-4c251b10d47c7ccef57b4a8fc683afac1137422c.tar.zst nixpkgs-4c251b10d47c7ccef57b4a8fc683afac1137422c.zip |
fanout: init at unstable-2023-07-21
-rw-r--r-- | pkgs/os-specific/linux/fanout/default.nix | 37 | ||||
-rw-r--r-- | pkgs/os-specific/linux/fanout/remove_auto_mknod.patch | 13 | ||||
-rw-r--r-- | pkgs/top-level/linux-kernels.nix | 2 |
3 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/fanout/default.nix b/pkgs/os-specific/linux/fanout/default.nix new file mode 100644 index 00000000000..3352f59a05f --- /dev/null +++ b/pkgs/os-specific/linux/fanout/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchFromGitHub, kernel, kmod }: + +stdenv.mkDerivation rec { + pname = "fanout"; + version = "unstable-2022-10-17-${kernel.version}"; + + src = fetchFromGitHub { + owner = "bob-linuxtoys"; + repo = "fanout"; + rev = "69b1cc69bf425d1a5f83b4e84d41272f1caa0144"; + hash = "sha256-Q19c88KDFu0A6MejZgKYei9J2693EjRkKtR9hcRcHa0="; + }; + + preBuild = '' + substituteInPlace Makefile --replace "modules_install" "INSTALL_MOD_PATH=$out modules_install" + ''; + + patches = [ + ./remove_auto_mknod.patch + ]; + + hardeningDisable = [ "format" "pic" ]; + + nativeBuildInputs = [ kmod ] ++ kernel.moduleBuildDependencies; + + makeFlags = kernel.makeFlags ++ [ + "KERNELDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + ]; + + meta = with lib; { + description = "Kernel-based publish-subscribe system"; + homepage = "https://github.com/bob-linuxtoys/fanout"; + license = licenses.gpl2Only; + maintainers = with maintainers; [ therishidesai ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/os-specific/linux/fanout/remove_auto_mknod.patch b/pkgs/os-specific/linux/fanout/remove_auto_mknod.patch new file mode 100644 index 00000000000..1f62e2b4633 --- /dev/null +++ b/pkgs/os-specific/linux/fanout/remove_auto_mknod.patch @@ -0,0 +1,13 @@ +diff --git a/fanout.c b/fanout.c +index f5d2a55..87125f4 100644 +--- a/fanout.c ++++ b/fanout.c +@@ -13,7 +13,7 @@ + /* Comment out to forgo the creation of /dev entries + * The companion udev rules 'fanout.rules' sets the special file mode + */ +-#define DEV_MKNOD ++// #define DEV_MKNOD + + #include <linux/kernel.h> + #include <linux/module.h> diff --git a/pkgs/top-level/linux-kernels.nix b/pkgs/top-level/linux-kernels.nix index 8e144eac120..8a87f955480 100644 --- a/pkgs/top-level/linux-kernels.nix +++ b/pkgs/top-level/linux-kernels.nix @@ -349,6 +349,8 @@ in { evdi = callPackage ../os-specific/linux/evdi { }; + fanout = callPackage ../os-specific/linux/fanout { }; + fwts-efi-runtime = callPackage ../os-specific/linux/fwts/module.nix { }; gcadapter-oc-kmod = callPackage ../os-specific/linux/gcadapter-oc-kmod { }; |