summary refs log tree commit diff
path: root/pkgs/os-specific/linux/ena
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-07-11 11:03:41 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-07-11 14:32:18 +0200
commit871067222562bbb8616eb4ce97d595425e688c00 (patch)
tree767c9f8a58d113968199f8a5b9cf2436a743d449 /pkgs/os-specific/linux/ena
parent5789f5875fc4f90058b67ae501fa0588c7e1e221 (diff)
downloadnixpkgs-871067222562bbb8616eb4ce97d595425e688c00.tar
nixpkgs-871067222562bbb8616eb4ce97d595425e688c00.tar.gz
nixpkgs-871067222562bbb8616eb4ce97d595425e688c00.tar.bz2
nixpkgs-871067222562bbb8616eb4ce97d595425e688c00.tar.lz
nixpkgs-871067222562bbb8616eb4ce97d595425e688c00.tar.xz
nixpkgs-871067222562bbb8616eb4ce97d595425e688c00.tar.zst
nixpkgs-871067222562bbb8616eb4ce97d595425e688c00.zip
ena: Init at 20160629
This adds the Amazon Elastic Network Adapter kernel module required by
EC2 x1.* instances.
Diffstat (limited to 'pkgs/os-specific/linux/ena')
-rw-r--r--pkgs/os-specific/linux/ena/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/ena/default.nix b/pkgs/os-specific/linux/ena/default.nix
new file mode 100644
index 00000000000..7a047e9f233
--- /dev/null
+++ b/pkgs/os-specific/linux/ena/default.nix
@@ -0,0 +1,34 @@
+{ lib, stdenv, fetchFromGitHub, kernel, kmod }:
+
+stdenv.mkDerivation rec {
+  name = "ena-20160629-${kernel.version}";
+
+  src = fetchFromGitHub {
+    owner = "amzn";
+    repo = "amzn-drivers";
+    rev = "b594ac1ea9e0c70e8e95803a0cfd9f5f06ac097e";
+    sha256 = "03w6xgv3lfn28n38mj9cdi3px5zjyrbxnflpd3ggivkv6grf9fp7";
+  };
+
+  configurePhase =
+    ''
+      cd kernel/linux/ena
+      substituteInPlace Makefile --replace '/lib/modules/$(BUILD_KERNEL)' ${kernel.dev}/lib/modules/${kernel.modDirVersion}
+    '';
+
+  installPhase =
+    ''
+      strip -S ena.ko
+      dest=$out/lib/modules/${kernel.modDirVersion}/misc
+      mkdir -p $dest
+      cp ena.ko $dest/
+      xz $dest/ena.ko
+    '';
+
+  meta = {
+    description = "Amazon Elastic Network Adapter (ENA) driver for Linux";
+    homepage = https://github.com/amzn/amzn-drivers;
+    license = lib.licenses.gpl2;
+    maintainers = [ lib.maintainers.eelco ];
+  };
+}