-
Notifications
You must be signed in to change notification settings - Fork 0
/
kobo.nix
55 lines (49 loc) · 1.29 KB
/
kobo.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# nix-build -A dropbear kobo.nix
let
nix = import <nixpkgs>;
kobo = (nix {}).platforms.armv7l-hf-multiplatform;
uclibcCross = self: super: {
uclibcCross = super.uclibcCross.overrideAttrs (oldAttrs: rec {
configurePhase = let
from = "KERNEL_HEADERS";
to = ''
UCLIBC_SUSV3_LEGACY y
CONFIG_ARM_EABI y
ARCH_WANTS_BIG_ENDIAN n
ARCH_BIG_ENDIAN n
ARCH_WANTS_LITTLE_ENDIAN y
ARCH_LITTLE_ENDIAN y
UCLIBC_HAS_FPU n
'' + from;
in builtins.replaceStrings [from] [to] oldAttrs.configurePhase;
patches = [ ./libgcc_resume.patch ];
});
};
perl = self: super: {
perl = super.perl522;
};
dropbear = let
overrideStatic = self: super: {
dropbear = super.dropbear.override {
enableStatic = true;
zlib = self.zlibStatic;
};
};
buildStatic = self: super: {
dropbear = super.dropbear.overrideAttrs (oldAttrs: rec {
buildInputs = [self.zlibStatic self.zlibStatic.static];
});
};
in [overrideStatic buildStatic];
in nix
{
crossSystem = {
config = "arm-linux-gnueabihf";
bigEndian = true;
arch = "arm";
float = "hard";
libc = "uclibc";
platform = kobo;
};
overlays = [ uclibcCross perl ] ++ dropbear;
}