aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorvolth <volth@volth.com>2019-08-13 21:52:01 +0000
committervolth <volth@volth.com>2019-08-28 11:07:32 +0000
commit08f68313a47a2093dc0f408a706b2c125bc59c95 (patch)
treebb48188c0bf9fac152c038426146df518ef8c562 /lib
parent5061fe0c2c7743370e1d379d6fa60eed26ff1470 (diff)
treewide: remove redundant rec
Diffstat (limited to 'lib')
-rw-r--r--lib/deprecated.nix2
-rw-r--r--lib/kernel.nix2
-rw-r--r--lib/licenses.nix2
-rw-r--r--lib/systems/doubles.nix2
-rw-r--r--lib/systems/examples.nix18
-rw-r--r--lib/systems/parse.nix2
-rw-r--r--lib/types.nix6
-rw-r--r--lib/versions.nix2
8 files changed, 18 insertions, 18 deletions
diff --git a/lib/deprecated.nix b/lib/deprecated.nix
index 15de5045661..155d6f0c361 100644
--- a/lib/deprecated.nix
+++ b/lib/deprecated.nix
@@ -24,7 +24,7 @@ rec {
let arg = (merger init (defaultMergeArg init x));
# now add the function with composed args already applied to the final attrs
base = (setAttrMerge "passthru" {} (f arg)
- ( z: z // rec {
+ ( z: z // {
function = foldArgs merger f arg;
args = (lib.attrByPath ["passthru" "args"] {} z) // x;
} ));
diff --git a/lib/kernel.nix b/lib/kernel.nix
index 5923011774b..36ea3083828 100644
--- a/lib/kernel.nix
+++ b/lib/kernel.nix
@@ -1,7 +1,7 @@
{ lib, version }:
with lib;
-rec {
+{
# Common patterns/legacy
whenAtLeast = ver: mkIf (versionAtLeast version ver);
whenOlder = ver: mkIf (versionOlder version ver);
diff --git a/lib/licenses.nix b/lib/licenses.nix
index c964060d2a5..83e1ec7748d 100644
--- a/lib/licenses.nix
+++ b/lib/licenses.nix
@@ -7,7 +7,7 @@ let
in
-lib.mapAttrs (n: v: v // { shortName = n; }) rec {
+lib.mapAttrs (n: v: v // { shortName = n; }) {
/* License identifiers from spdx.org where possible.
* If you cannot find your license here, then look for a similar license or
* add it to this list. The URL mentioned above is a good source for inspiration.
diff --git a/lib/systems/doubles.nix b/lib/systems/doubles.nix
index 823f6a915d6..8e02fcb5de0 100644
--- a/lib/systems/doubles.nix
+++ b/lib/systems/doubles.nix
@@ -33,7 +33,7 @@ let
filterDoubles = f: map parse.doubleFromSystem (lists.filter f allParsed);
-in rec {
+in {
inherit all;
none = [];
diff --git a/lib/systems/examples.nix b/lib/systems/examples.nix
index aa55438de08..8fb1a342177 100644
--- a/lib/systems/examples.nix
+++ b/lib/systems/examples.nix
@@ -24,27 +24,27 @@ rec {
platform = platforms.powernv;
};
- sheevaplug = rec {
+ sheevaplug = {
config = "armv5tel-unknown-linux-gnueabi";
platform = platforms.sheevaplug;
};
- raspberryPi = rec {
+ raspberryPi = {
config = "armv6l-unknown-linux-gnueabihf";
platform = platforms.raspberrypi;
};
- armv7l-hf-multiplatform = rec {
+ armv7l-hf-multiplatform = {
config = "armv7l-unknown-linux-gnueabihf";
platform = platforms.armv7l-hf-multiplatform;
};
- aarch64-multiplatform = rec {
+ aarch64-multiplatform = {
config = "aarch64-unknown-linux-gnu";
platform = platforms.aarch64-multiplatform;
};
- armv7a-android-prebuilt = rec {
+ armv7a-android-prebuilt = {
config = "armv7a-unknown-linux-androideabi";
sdkVer = "24";
ndkVer = "18b";
@@ -52,7 +52,7 @@ rec {
useAndroidPrebuilt = true;
};
- aarch64-android-prebuilt = rec {
+ aarch64-android-prebuilt = {
config = "aarch64-unknown-linux-android";
sdkVer = "24";
ndkVer = "18b";
@@ -65,17 +65,17 @@ rec {
inherit (platform.gcc) fpu;
};
- pogoplug4 = rec {
+ pogoplug4 = {
config = "armv5tel-unknown-linux-gnueabi";
platform = platforms.pogoplug4;
};
- ben-nanonote = rec {
+ ben-nanonote = {
config = "mipsel-unknown-linux-uclibc";
platform = platforms.ben_nanonote;
};
- fuloongminipc = rec {
+ fuloongminipc = {
config = "mipsel-unknown-linux-gnu";
platform = platforms.fuloong2f_n32;
};
diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix
index b088cd342f1..1339f50f057 100644
--- a/lib/systems/parse.nix
+++ b/lib/systems/parse.nix
@@ -403,7 +403,7 @@ rec {
getKernel = name: kernels.${name} or (throw "Unknown kernel: ${name}");
getAbi = name: abis.${name} or (throw "Unknown ABI: ${name}");
- parsed = rec {
+ parsed = {
cpu = getCpu args.cpu;
vendor =
/**/ if args ? vendor then getVendor args.vendor
diff --git a/lib/types.nix b/lib/types.nix
index f7e6d5335b1..d3526375b1c 100644
--- a/lib/types.nix
+++ b/lib/types.nix
@@ -107,7 +107,7 @@ rec {
merge = mergeEqualOption;
};
- int = mkOptionType rec {
+ int = mkOptionType {
name = "int";
description = "signed integer";
check = isInt;
@@ -136,7 +136,7 @@ rec {
sign = bit: range: ign (0 - (range / 2)) (range / 2 - 1)
"signedInt${toString bit}" "${toString bit} bit signed integer";
- in rec {
+ in {
/* An int with a fixed range.
*
* Example:
@@ -172,7 +172,7 @@ rec {
# Alias of u16 for a port number
port = ints.u16;
- float = mkOptionType rec {
+ float = mkOptionType {
name = "float";
description = "floating point number";
check = isFloat;
diff --git a/lib/versions.nix b/lib/versions.nix
index 8f7f98ff5e1..2c05445b3dd 100644
--- a/lib/versions.nix
+++ b/lib/versions.nix
@@ -7,7 +7,7 @@ let
in
-rec {
+{
/* Get the major version string from a string.