Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions pkgs/os-specific/linux/kernel/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
extraConfig ? ""

, # The version number used for the module directory
modDirVersion ? version
modVersion ? null

, # An attribute set whose attributes express the availability of
# certain features in this kernel. E.g. `{iwlwifi = true;}'
Expand Down Expand Up @@ -118,7 +118,7 @@ let
};

kernel = buildLinux {
inherit version modDirVersion src kernelPatches stdenv;
inherit version src kernelPatches stdenv;

configfile = configfile.nativeDrv or configfile;

Expand All @@ -127,6 +127,12 @@ let
config = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };

crossConfig = { CONFIG_MODULES = "y"; CONFIG_FW_LOADER = "m"; };

modDirVersion = if (modVersion == null) then
# modDirVersion needs to be x.y.z, will automatically add .0 if needed
with lib; (concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))))
else
modVersion;
};

passthru = {
Expand Down
1 change: 0 additions & 1 deletion pkgs/os-specific/linux/kernel/linux-4.13.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ./generic.nix (args // rec {
version = "4.13.15";
extraMeta.branch = "4.13";

src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
Expand Down
8 changes: 0 additions & 8 deletions pkgs/os-specific/linux/kernel/linux-4.14.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
{ stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args:

with stdenv.lib;

import ./generic.nix (args // rec {
version = "4.14.1";

# modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));

# branchVersion needs to be x.y
extraMeta.branch = concatStrings (intersperse "." (take 2 (splitString "." version)));

src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
sha256 = "1rsdrdapjw8lhm8dyckwxfihykirbkincm5k0lwwx1pr09qgdfbg";
Expand Down
1 change: 0 additions & 1 deletion pkgs/os-specific/linux/kernel/linux-4.4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ./generic.nix (args // rec {
version = "4.4.100";
extraMeta.branch = "4.4";

src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
Expand Down
1 change: 0 additions & 1 deletion pkgs/os-specific/linux/kernel/linux-4.9.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import ./generic.nix (args // rec {
version = "4.9.64";
extraMeta.branch = "4.9";

src = fetchurl {
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz";
Expand Down
7 changes: 4 additions & 3 deletions pkgs/os-specific/linux/kernel/linux-beagleboard.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{ stdenv, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:

let
modDirVersion = "4.9.61";
modVersion = "4.9.61";
tag = "r76";
in
import ./generic.nix (args // rec {
version = "${modDirVersion}-ti-${tag}";
inherit modDirVersion;
inherit modVersion;

version = "${modVersion}-ti-${tag}";

src = fetchFromGitHub {
owner = "beagleboard";
Expand Down
11 changes: 2 additions & 9 deletions pkgs/os-specific/linux/kernel/linux-hardened-copperhead.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@ let
revision = "a";
sha256 = "16bb1jvip50v62slp6cy96zncjhjzp3hvh29jc8ilcpxgyipmhlc";

# modVersion needs to be x.y.z, will automatically add .0 if needed
modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0")));

# branchVersion needs to be x.y
branchVersion = concatStrings (intersperse "." (take 2 (splitString "." version)));

modDirVersion = "${modVersion}-hardened";
modVersion = "${version}-hardened";
in
import ./generic.nix (args // {
inherit modDirVersion;
inherit modVersion;

version = "${version}-${revision}";
extraMeta.branch = "${branchVersion}";

src = fetchFromGitHub {
inherit sha256;
Expand Down
9 changes: 3 additions & 6 deletions pkgs/os-specific/linux/kernel/linux-mptcp.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@

import ./generic.nix (rec {
mptcpVersion = "0.93";
modDirVersion = "4.9.60";
version = "${modDirVersion}-mptcp_v${mptcpVersion}";
modVersion = "4.9.60";
version = "${modVersion}-mptcp_v${mptcpVersion}";

extraMeta = {
branch = "4.4";
maintainers = with stdenv.lib.maintainers; [ teto layus ];
};
extraMeta.maintainers = with stdenv.lib.maintainers; [ teto layus ];

src = fetchFromGitHub {
owner = "multipath-tcp";
Expand Down
7 changes: 4 additions & 3 deletions pkgs/os-specific/linux/kernel/linux-rpi.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{ stdenv, hostPlatform, fetchFromGitHub, perl, buildLinux, ... } @ args:

let
modDirVersion = "4.9.59";
modVersion = "4.9.59";
tag = "1.20171029";
in
stdenv.lib.overrideDerivation (import ./generic.nix (args // rec {
version = "${modDirVersion}-${tag}";
inherit modDirVersion;
inherit modVersion;

version = "${modVersion}-${tag}";

src = fetchFromGitHub {
owner = "raspberrypi";
Expand Down
4 changes: 2 additions & 2 deletions pkgs/os-specific/linux/kernel/linux-samus-4.12.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ assert stdenv.is64bit;

import ./generic.nix (args // rec {
version = "4.12.2";
extraMeta.branch = "4.12-2";
revision = "4.12-2";

src =
let upstream = fetchFromGitHub {
owner = "raphael";
repo = "linux-samus";
rev = "v${extraMeta.branch}";
rev = "v${revision}";
sha256 = "1dr74i79p8r13522w2ppi8gnjd9bhngc9d2hsn91ji6f5a8fbxx9";
}; in "${upstream}/build/linux";

Expand Down
2 changes: 1 addition & 1 deletion pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import ./generic.nix (args // rec {
version = "4.11.2017.08.23";
modDirVersion = "4.11.0";
modVersion = "4.11.0";
extraMeta.branch = "master";
extraMeta.maintainers = [ stdenv.lib.maintainers.davidak ];

Expand Down
3 changes: 1 addition & 2 deletions pkgs/os-specific/linux/kernel/linux-testing.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import ./generic.nix (args // rec {
version = "4.14-rc8";
modDirVersion = "4.14.0-rc8";
extraMeta.branch = "4.14";
modVersion = "4.14.0-rc8";

src = fetchurl {
url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz";
Expand Down
3 changes: 3 additions & 0 deletions pkgs/os-specific/linux/kernel/manual-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ let
maintainers.thoughtpolice
];
platforms = platforms.linux;

# branch needs to be x.y
branch = with stdenv.lib; concatStrings (intersperse "." (take 2 (splitString "." version)));
};
};
in
Expand Down