blob: 1b6f6f5c437faaf522b3637f645eaaca7b82fa9c (
plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
final: prev: {
luks-hw-password = final.callPackage ./luks-hw-password {};
dev = final.callPackage ./dev {
devShells = import ../devShells final;
};
background-lnxpcs = final.callPackage ./theme/background-lnxpcs.nix {};
swaybackground = final.callPackage ./theme/swaybackground.nix {};
myswaylock = final.callPackage ./theme/myswaylock.nix {};
stardict-unwrapped = final.callPackage ./stardict {};
stardict = final.callPackage ./stardict/wrapper.nix {stardict = final.stardict-unwrapped;};
stardict-en-cz = final.callPackage ./stardict/en-cz.nix {};
stardict-de-cz = final.callPackage ./stardict/de-cz.nix {};
stardict-cz = final.callPackage ./stardict/cz.nix {};
sdcv-unwrapped = prev.sdcv;
sdcv = final.callPackage ./stardict/wrapper.nix {stardict = final.sdcv-unwrapped;};
lorem-text = final.callPackage ./lorem-text {};
bigclown-leds = final.callPackage ./bigclown-leds {};
dodo = final.callPackage ./dodo {};
elf-size-analyze = final.callPackage ./elf-size-analyze {};
# OpenWrt One
armTrustedFirmwareMT7981 = final.callPackage ./mtk-arm-trusted-firmware rec {
extraMakeFlags = [
"BOOT_DEVICE=spim-nand"
"DRAM_USE_DDR4=1"
"UBI=1"
"OVERRIDE_UBI_START_ADDR=0x100000"
"bl2"
"bl31"
];
platform = "mt7981";
extraMeta.platforms = ["aarch64-linux"];
filesToInstall = ["build/${platform}/release/bl2.bin" "build/${platform}/release/bl31.bin"];
};
ubootOpenWrtOne =
# ubiupdatevol /dev/ubi0_2 u-boot.fip
(final.buildUBoot {
defconfig = "mt7981_openwrt-one-spi-nand_defconfig";
extraMeta.platforms = ["aarch64-linux"];
filesToInstall = ["u-boot.fip" ".config"];
extraPatches = [./u-boot-add-openwrt-one.patch];
extraConfig = ''
CONFIG_CMD_BOOTMENU=n
CONFIG_AUTOBOOT_MENU_SHOW=n
CONFIG_BOOTDELAY=3
CONFIG_PCI=y
CONFIG_PCIE_MEDIATEK_GEN3=y
CONFIG_PCI_DEBUG=y
CONFIG_DM_REGULATOR=y
CONFIG_NVME=y
CONFIG_NVME_PCI=y
CONFIG_CMD_NVME=y
CONFIG_EFI_PARTITION=y
CONFIG_CMD_SYSBOOT=y
CONFIG_SUPPORT_RAW_INITRD=y
CONFIG_BOARD_LATE_INIT=n
'';
postBuild = ''
${final.buildPackages.armTrustedFirmwareTools}/bin/fiptool create \
--soc-fw '${final.armTrustedFirmwareMT7981}/bl31.bin' \
--nt-fw ./u-boot.bin \
u-boot.fip
'';
}).overrideAttrs (oldAttrs: {
nativeBuildInputs = [final.buildPackages.unixtools.xxd] ++ oldAttrs.nativeBuildInputs;
});
linuxOpenWrtOne = final.buildLinux {
version = "6.18.0-rc1";
src = final.buildPackages.fetchgit {
url = "git://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux.git";
rev = "67ed5843a67b7ba63d79f2ba3fd21bee151d3138";
hash = "sha256-jXBDVZOAk+/vf55cQWMlV4ZhmSwYucqMOuOGDLxSYis=";
};
kernelPatches = [
{
name = "openwrt-one";
patch = ./linux-openwrt-one-mediatek.patch;
#structuredExtraConfig = with final.lib.kernel; {
# NET_MEDIATEK_SOC = yes;
#};
}
];
};
# RaspberryPi
ubootRaspberryPi3_btrfs = prev.buildUBoot {
defconfig = "rpi_3_defconfig";
extraConfig = ''
CONFIG_FS_BTRFS=y
CONFIG_CMD_BTRFS=y
'';
extraMeta.platforms = ["aarch64-linux"];
filesToInstall = ["u-boot.bin"];
};
# NixPkgs patches
libcap =
if prev.stdenv.hostPlatform != prev.stdenv.buildPlatform
then
prev.libcap.overrideAttrs {
patches = [
(final.fetchpatch {
url = "https://git.kernel.org/pub/scm/libs/libcap/libcap.git/patch/?id=d628b3bfe40338d4efff6b0ae50f250a0eb884c7";
hash = "sha256-Eiv/BOJZkduL+hOEJd8K1LQd9wvOeCKchE2GaLcerVc=";
})
];
}
else prev.libcap;
gvproxy =
if prev.stdenv.hostPlatform.is32bit
then
# Downgrade to get 32bit support working
prev.gvproxy.overrideAttrs (oldAttrs: {
version = "0.8.6";
src = oldAttrs.src.override {
rev = "v0.8.6";
hash = "sha256-a/Gd1QUxZ+47sQtndbehx86UjC1DezhqwS5d5VTIjRc=";
};
})
else prev.gvproxy;
# Older version of packages
flac134 = prev.flac.overrideAttrs {
version = "1.3.4";
src = final.fetchurl {
url = "http://downloads.xiph.org/releases/flac/flac-1.3.4.tar.xz";
hash = "sha256-j/BgfnWjIt181uxI9PIlRxQEricw0OqUUSexNVFV5zc=";
};
outputs = ["out"];
doCheck = false;
};
}
|