cleanup whitespace and commas
* [] is now [ ] * {} is now { } * commas in arglists go at end of line not beginning In short, I ran the whole thing through nixfmt-rfc-style but only accepted about 30% of its changes. I might grow accustomed to more of it over time
This commit is contained in:
parent
0d3218127f
commit
3df1ec76ff
@ -55,18 +55,17 @@ in {
|
|||||||
<nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
|
<nixpkgs/nixos/modules/virtualisation/qemu-vm.nix>
|
||||||
];
|
];
|
||||||
config = {
|
config = {
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [ "loglevel=9" ];
|
||||||
"loglevel=9"
|
|
||||||
];
|
|
||||||
systemd.services.pppoe =
|
systemd.services.pppoe =
|
||||||
let conf = pkgs.writeText "kpppoed.toml"
|
let
|
||||||
''
|
conf = pkgs.writeText "kpppoed.toml" ''
|
||||||
interface_name = "eth1"
|
interface_name = "eth1"
|
||||||
services = [ "myservice" ]
|
services = [ "myservice" ]
|
||||||
lns_ipaddr = "${cfg.l2tp.host}:${builtins.toString cfg.l2tp.port}"
|
lns_ipaddr = "${cfg.l2tp.host}:${builtins.toString cfg.l2tp.port}"
|
||||||
ac_name = "kpppoed-1.0"
|
ac_name = "kpppoed-1.0"
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-online.target" ];
|
after = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
@ -92,17 +91,17 @@ in {
|
|||||||
|
|
||||||
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
|
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
|
||||||
|
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
qemu = {
|
qemu = {
|
||||||
networkingOptions = [ ];
|
networkingOptions = [ ];
|
||||||
options = [] ++
|
options =
|
||||||
optional cfg.ethernet.pci.enable
|
[ ]
|
||||||
"-device vfio-pci,host=${cfg.ethernet.pci.id}" ++
|
++ optional cfg.ethernet.pci.enable "-device vfio-pci,host=${cfg.ethernet.pci.id}"
|
||||||
optionals cfg.ethernet.usb.enable [
|
++ optionals cfg.ethernet.usb.enable [
|
||||||
"-device usb-ehci,id=ehci"
|
"-device usb-ehci,id=ehci"
|
||||||
"-device usb-host,bus=ehci.0,vendorid=${cfg.ethernet.usb.vendor},productid=${cfg.ethernet.usb.product}"
|
"-device usb-host,bus=ehci.0,vendorid=${cfg.ethernet.usb.vendor},productid=${cfg.ethernet.usb.product}"
|
||||||
] ++ [
|
]
|
||||||
|
++ [
|
||||||
"-nographic"
|
"-nographic"
|
||||||
"-serial mon:stdio"
|
"-serial mon:stdio"
|
||||||
];
|
];
|
||||||
|
@ -2,7 +2,11 @@
|
|||||||
{
|
{
|
||||||
bordervm = {
|
bordervm = {
|
||||||
# ethernet.pci = { id = "01:00.0"; enable = true; };
|
# ethernet.pci = { id = "01:00.0"; enable = true; };
|
||||||
ethernet.usb = { vendor = "0x0bda"; product = "0x8153"; enable = true; };
|
ethernet.usb = {
|
||||||
|
vendor = "0x0bda";
|
||||||
|
product = "0x8153";
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
l2tp = {
|
l2tp = {
|
||||||
host = "l2tp.aa.net.uk";
|
host = "l2tp.aa.net.uk";
|
||||||
};
|
};
|
||||||
|
33
ci.nix
33
ci.nix
@ -1,8 +1,9 @@
|
|||||||
{
|
{
|
||||||
nixpkgs
|
nixpkgs,
|
||||||
, unstable
|
unstable,
|
||||||
, liminix
|
liminix,
|
||||||
, ... }:
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
pkgs = (import nixpkgs { });
|
pkgs = (import nixpkgs { });
|
||||||
borderVmConf = ./bordervm.conf-example.nix;
|
borderVmConf = ./bordervm.conf-example.nix;
|
||||||
@ -26,27 +27,35 @@ let
|
|||||||
}).outputs.default;
|
}).outputs.default;
|
||||||
tests = import ./tests/ci.nix;
|
tests = import ./tests/ci.nix;
|
||||||
jobs =
|
jobs =
|
||||||
(genAttrs devices for-device) //
|
(genAttrs devices for-device)
|
||||||
tests //
|
// tests
|
||||||
{
|
// {
|
||||||
buildEnv = (import liminix {
|
buildEnv =
|
||||||
|
(import liminix {
|
||||||
inherit nixpkgs borderVmConf;
|
inherit nixpkgs borderVmConf;
|
||||||
device = import (liminix + "/devices/qemu");
|
device = import (liminix + "/devices/qemu");
|
||||||
liminix-config = vanilla;
|
liminix-config = vanilla;
|
||||||
}).buildEnv;
|
}).buildEnv;
|
||||||
doc =
|
doc =
|
||||||
let json =
|
let
|
||||||
|
json =
|
||||||
(import liminix {
|
(import liminix {
|
||||||
inherit nixpkgs borderVmConf;
|
inherit nixpkgs borderVmConf;
|
||||||
device = import (liminix + "/devices/qemu");
|
device = import (liminix + "/devices/qemu");
|
||||||
liminix-config = {...} : {
|
liminix-config =
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
imports = [ ./modules/all-modules.nix ];
|
imports = [ ./modules/all-modules.nix ];
|
||||||
};
|
};
|
||||||
}).outputs.optionsJson;
|
}).outputs.optionsJson;
|
||||||
in pkgs.stdenv.mkDerivation {
|
in
|
||||||
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "liminix-doc";
|
name = "liminix-doc";
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = with pkgs; [
|
||||||
gnumake sphinx fennel luaPackages.lyaml
|
gnumake
|
||||||
|
sphinx
|
||||||
|
fennel
|
||||||
|
luaPackages.lyaml
|
||||||
];
|
];
|
||||||
src = ./.;
|
src = ./.;
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
19
default.nix
19
default.nix
@ -1,15 +1,17 @@
|
|||||||
{
|
{
|
||||||
deviceName ? null
|
deviceName ? null,
|
||||||
, device ? (import ./devices/${deviceName} )
|
device ? (import ./devices/${deviceName}),
|
||||||
, liminix-config ? <liminix-config>
|
liminix-config ? <liminix-config>,
|
||||||
, nixpkgs ? <nixpkgs>
|
nixpkgs ? <nixpkgs>,
|
||||||
, borderVmConf ? ./bordervm.conf.nix
|
borderVmConf ? ./bordervm.conf.nix,
|
||||||
, imageType ? "primary"
|
imageType ? "primary",
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
overlay = import ./overlay.nix;
|
overlay = import ./overlay.nix;
|
||||||
pkgs = import nixpkgs (device.system // {
|
pkgs = import nixpkgs (
|
||||||
|
device.system
|
||||||
|
// {
|
||||||
overlays = [ overlay ];
|
overlays = [ overlay ];
|
||||||
config = {
|
config = {
|
||||||
allowUnsupportedSystem = true; # mipsel
|
allowUnsupportedSystem = true; # mipsel
|
||||||
@ -18,7 +20,8 @@ let
|
|||||||
"python-2.7.18.7"
|
"python-2.7.18.7"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
eval = pkgs.lib.evalModules {
|
eval = pkgs.lib.evalModules {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
let
|
let
|
||||||
conf = eval.config;
|
conf = eval.config;
|
||||||
rootDir = builtins.toPath ./..;
|
rootDir = builtins.toPath ./..;
|
||||||
stripAnyPrefixes = lib.flip (lib.fold lib.removePrefix)
|
stripAnyPrefixes = lib.flip (lib.fold lib.removePrefix) [ "${rootDir}/" ];
|
||||||
["${rootDir}/"];
|
|
||||||
optToDoc = name: opt: {
|
optToDoc = name: opt: {
|
||||||
inherit name;
|
inherit name;
|
||||||
description = opt.description or null;
|
description = opt.description or null;
|
||||||
@ -27,5 +26,4 @@ let
|
|||||||
else
|
else
|
||||||
item // { declarations = map stripAnyPrefixes item.declarations; };
|
item // { declarations = map stripAnyPrefixes item.declarations; };
|
||||||
in
|
in
|
||||||
builtins.map spliceServiceDefn
|
builtins.map spliceServiceDefn (pkgs.lib.optionAttrSetToDocList eval.options)
|
||||||
(pkgs.lib.optionAttrSetToDocList eval.options)
|
|
||||||
|
@ -2,15 +2,17 @@ with import <nixpkgs> {} ;
|
|||||||
|
|
||||||
let
|
let
|
||||||
inherit (builtins) stringLength readDir filter;
|
inherit (builtins) stringLength readDir filter;
|
||||||
devices = filter (n: n != "families")
|
devices = filter (n: n != "families") (lib.mapAttrsToList (n: t: n) (readDir ../devices));
|
||||||
(lib.mapAttrsToList (n: t: n) (readDir ../devices));
|
texts = map (
|
||||||
texts = map (n:
|
n:
|
||||||
let d = import ../devices/${n}/default.nix;
|
let
|
||||||
|
d = import ../devices/${n}/default.nix;
|
||||||
d' = {
|
d' = {
|
||||||
description = "${n}\n${substring 0 (stringLength n) "********************************"}\n";
|
description = "${n}\n${substring 0 (stringLength n) "********************************"}\n";
|
||||||
} // d;
|
} // d;
|
||||||
in d'.description)
|
in
|
||||||
devices;
|
d'.description
|
||||||
|
) devices;
|
||||||
in
|
in
|
||||||
writeText "hwdoc" ''
|
writeText "hwdoc" ''
|
||||||
Supported hardware
|
Supported hardware
|
||||||
|
@ -128,11 +128,15 @@ in rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
users.backup = {
|
users.backup = {
|
||||||
uid=500; gid=500; gecos="Storage owner"; dir="/srv";
|
uid = 500;
|
||||||
|
gid = 500;
|
||||||
|
gecos = "Storage owner";
|
||||||
|
dir = "/srv";
|
||||||
shell = "/dev/null";
|
shell = "/dev/null";
|
||||||
};
|
};
|
||||||
groups.backup = {
|
groups.backup = {
|
||||||
gid=500; usernames = ["backup"];
|
gid = 500;
|
||||||
|
usernames = [ "backup" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultProfile.packages = with pkgs; [
|
defaultProfile.packages = with pkgs; [
|
||||||
|
@ -62,18 +62,27 @@ in rec {
|
|||||||
|
|
||||||
services.int = svc.network.address.build {
|
services.int = svc.network.address.build {
|
||||||
interface = svc.bridge.primary.build { ifname = "int"; };
|
interface = svc.bridge.primary.build { ifname = "int"; };
|
||||||
family = "inet"; address = "${ipv4LocalNet}.1"; prefixLength = 16;
|
family = "inet";
|
||||||
|
address = "${ipv4LocalNet}.1";
|
||||||
|
prefixLength = 16;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.bridge = svc.bridge.members.build {
|
services.bridge = svc.bridge.members.build {
|
||||||
primary = services.int;
|
primary = services.int;
|
||||||
members = with config.hardware.networkInterfaces;
|
members = with config.hardware.networkInterfaces; [
|
||||||
[ wlan lan ];
|
wlan
|
||||||
|
lan
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
services.ntp = svc.ntp.build {
|
services.ntp = svc.ntp.build {
|
||||||
pools = { "pool.ntp.org" = ["iburst"]; };
|
pools = {
|
||||||
makestep = { threshold = 1.0; limit = 3; };
|
"pool.ntp.org" = [ "iburst" ];
|
||||||
|
};
|
||||||
|
makestep = {
|
||||||
|
threshold = 1.0;
|
||||||
|
limit = 3;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.sshd = svc.ssh.build { };
|
services.sshd = svc.ssh.build { };
|
||||||
@ -157,8 +166,7 @@ in rec {
|
|||||||
interface = services.wan;
|
interface = services.wan;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.firewall = svc.firewall.build {
|
services.firewall = svc.firewall.build { };
|
||||||
};
|
|
||||||
|
|
||||||
services.packet_forwarding = svc.network.forward.build { };
|
services.packet_forwarding = svc.network.forward.build { };
|
||||||
|
|
||||||
@ -195,7 +203,5 @@ in rec {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultProfile.packages = with pkgs; [
|
defaultProfile.packages = with pkgs; [ min-collect-garbage ];
|
||||||
min-collect-garbage
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,10 @@
|
|||||||
root = {
|
root = {
|
||||||
# mkpasswd -m sha512crypt
|
# mkpasswd -m sha512crypt
|
||||||
passwd = "$6$6pt0mpbgcB7kC2RJ$kSBoCYGyi1.qxt7dqmexLj1l8E6oTZJZmfGyJSsMYMW.jlsETxdgQSdv6ptOYDM7DHAwf6vLG0pz3UD31XBfC1";
|
passwd = "$6$6pt0mpbgcB7kC2RJ$kSBoCYGyi1.qxt7dqmexLj1l8E6oTZJZmfGyJSsMYMW.jlsETxdgQSdv6ptOYDM7DHAwf6vLG0pz3UD31XBfC1";
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [ ];
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
lan = {
|
lan = {
|
||||||
prefix = "10.8.0";
|
prefix = "10.8.0";
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -58,16 +58,25 @@ in {
|
|||||||
description = "Kernel command line";
|
description = "Kernel command line";
|
||||||
};
|
};
|
||||||
commandLineDtbNode = mkOption {
|
commandLineDtbNode = mkOption {
|
||||||
type = types.enum [ "bootargs" "bootargs-override" ];
|
type = types.enum [
|
||||||
|
"bootargs"
|
||||||
|
"bootargs-override"
|
||||||
|
];
|
||||||
default = "bootargs";
|
default = "bootargs";
|
||||||
description = "Kernel command line's devicetree node";
|
description = "Kernel command line's devicetree node";
|
||||||
};
|
};
|
||||||
imageType = mkOption {
|
imageType = mkOption {
|
||||||
type = types.enum [ "primary" "secondary" ];
|
type = types.enum [
|
||||||
|
"primary"
|
||||||
|
"secondary"
|
||||||
|
];
|
||||||
default = "primary";
|
default = "primary";
|
||||||
};
|
};
|
||||||
imageFormat = mkOption {
|
imageFormat = mkOption {
|
||||||
type = types.enum ["fit" "uimage"];
|
type = types.enum [
|
||||||
|
"fit"
|
||||||
|
"uimage"
|
||||||
|
];
|
||||||
default = "uimage";
|
default = "uimage";
|
||||||
};
|
};
|
||||||
tftp = {
|
tftp = {
|
||||||
|
@ -85,10 +85,13 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
filesystem = dir {
|
filesystem = dir {
|
||||||
bin = dir ({
|
bin = dir (
|
||||||
|
{
|
||||||
busybox = symlink "${busybox}/bin/busybox";
|
busybox = symlink "${busybox}/bin/busybox";
|
||||||
sh = symlink "${busybox}/bin/busybox";
|
sh = symlink "${busybox}/bin/busybox";
|
||||||
} // makeLinks);
|
}
|
||||||
|
// makeLinks
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -5,14 +5,13 @@
|
|||||||
## you want to run on it, and would usually be set in the "device" file:
|
## you want to run on it, and would usually be set in the "device" file:
|
||||||
## :file:`devices/manuf-model/default.nix`
|
## :file:`devices/manuf-model/default.nix`
|
||||||
|
|
||||||
|
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption types;
|
inherit (lib) mkOption types;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
options = {
|
options = {
|
||||||
boot = {
|
boot = { };
|
||||||
};
|
|
||||||
hardware = {
|
hardware = {
|
||||||
dts = {
|
dts = {
|
||||||
src = mkOption {
|
src = mkOption {
|
||||||
|
@ -20,7 +20,10 @@ in {
|
|||||||
up = ''
|
up = ''
|
||||||
for i in $(find /sys -name uevent); do ( echo change > $i ) ; done
|
for i in $(find /sys -name uevent); do ( echo change > $i ) ; done
|
||||||
'';
|
'';
|
||||||
dependencies = [devout mdevd];
|
dependencies = [
|
||||||
|
devout
|
||||||
|
mdevd
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
config
|
config,
|
||||||
, pkgs
|
pkgs,
|
||||||
, lib
|
lib,
|
||||||
, ...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib) mkOption types concatStringsSep;
|
inherit (lib) mkOption types concatStringsSep;
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{
|
{ config, lib, ... }:
|
||||||
config
|
|
||||||
, lib
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkIf mkEnableOption; # types concatStringsSep;
|
inherit (lib) mkIf mkEnableOption; # types concatStringsSep;
|
||||||
in {
|
in {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
config
|
config,
|
||||||
, pkgs
|
pkgs,
|
||||||
, lib
|
lib,
|
||||||
, ...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs) liminix;
|
inherit (pkgs) liminix;
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
EXT4_FS = "y";
|
EXT4_FS = "y";
|
||||||
EXT4_USE_FOR_EXT2 = "y";
|
EXT4_USE_FOR_EXT2 = "y";
|
||||||
FS_ENCRYPTION = "y";
|
FS_ENCRYPTION = "y";
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,15 @@ let
|
|||||||
inherit (builtins) toString;
|
inherit (builtins) toString;
|
||||||
inherit (pkgs.pseudofile) dir;
|
inherit (pkgs.pseudofile) dir;
|
||||||
passwd-file =
|
passwd-file =
|
||||||
let lines = mapAttrsToList (name: u: "${name}:${if u ? passwd then u.passwd else "!!"}:${toString u.uid}:${toString u.gid}:${u.gecos}:${u.dir}:${u.shell}\n" )
|
let
|
||||||
config.users;
|
lines = mapAttrsToList (
|
||||||
in concatStrings lines;
|
name: u:
|
||||||
|
"${name}:${
|
||||||
|
if u ? passwd then u.passwd else "!!"
|
||||||
|
}:${toString u.uid}:${toString u.gid}:${u.gecos}:${u.dir}:${u.shell}\n"
|
||||||
|
) config.users;
|
||||||
|
in
|
||||||
|
concatStrings lines;
|
||||||
group-file =
|
group-file =
|
||||||
let lines = mapAttrsToList
|
let lines = mapAttrsToList
|
||||||
(name: {gid, usernames ? []}:
|
(name: {gid, usernames ? []}:
|
||||||
|
22
overlay.nix
22
overlay.nix
@ -74,7 +74,6 @@ extraPkgs // {
|
|||||||
# should texinfo be in nativeBuildInputs instead of
|
# should texinfo be in nativeBuildInputs instead of
|
||||||
# buildInputs?
|
# buildInputs?
|
||||||
texinfo = null;
|
texinfo = null;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# luarocks wants a cross-compiled cmake (which seems like a bug,
|
# luarocks wants a cross-compiled cmake (which seems like a bug,
|
||||||
@ -186,9 +185,12 @@ extraPkgs // {
|
|||||||
# done. Do it the ugly way..
|
# done. Do it the ugly way..
|
||||||
postPatch =
|
postPatch =
|
||||||
o.postPatch
|
o.postPatch
|
||||||
+ (with final;
|
+ (
|
||||||
lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform)
|
with final;
|
||||||
"\nsed -i.bak 's/linux.*-mips/linux-mops/' Configure\n");
|
lib.optionalString (
|
||||||
|
stdenv.buildPlatform != stdenv.hostPlatform
|
||||||
|
) "\nsed -i.bak 's/linux.*-mips/linux-mops/' Configure\n"
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
pppBuild = prev.ppp;
|
pppBuild = prev.ppp;
|
||||||
@ -200,13 +202,12 @@ extraPkgs // {
|
|||||||
}); in q.override { nixosTestRunner = true; sdlSupport = false; };
|
}); in q.override { nixosTestRunner = true; sdlSupport = false; };
|
||||||
|
|
||||||
rsyncSmall =
|
rsyncSmall =
|
||||||
let r = prev.rsync.overrideAttrs(o: {
|
let
|
||||||
configureFlags = o.configureFlags ++ [
|
r = prev.rsync.overrideAttrs (o: {
|
||||||
"--disable-openssl"
|
configureFlags = o.configureFlags ++ [ "--disable-openssl" ];
|
||||||
];
|
|
||||||
});
|
});
|
||||||
in r.override { openssl = null; };
|
in
|
||||||
|
r.override { openssl = null; };
|
||||||
|
|
||||||
inherit s6;
|
inherit s6;
|
||||||
s6-linux-init = prev.s6-linux-init.override {
|
s6-linux-init = prev.s6-linux-init.override {
|
||||||
@ -283,5 +284,4 @@ extraPkgs // {
|
|||||||
translateManpages = false;
|
translateManpages = false;
|
||||||
capabilitiesSupport = false;
|
capabilitiesSupport = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
fennel
|
fennel,
|
||||||
, stdenv
|
stdenv,
|
||||||
, linotify
|
linotify,
|
||||||
, lua
|
lua,
|
||||||
, lualinux
|
lualinux,
|
||||||
, cpio
|
cpio,
|
||||||
}:
|
}:
|
||||||
let pname = "anoia";
|
let pname = "anoia";
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{ callPackage, lib }:
|
||||||
callPackage
|
|
||||||
, lib
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
typeChecked = caller: type: value:
|
typeChecked = caller: type: value:
|
||||||
let
|
let
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
{ nellie
|
{
|
||||||
, writeFennel
|
nellie,
|
||||||
, anoia
|
writeFennel,
|
||||||
, fennel
|
anoia,
|
||||||
, stdenv
|
fennel,
|
||||||
, fennelrepl
|
stdenv,
|
||||||
, lualinux
|
fennelrepl,
|
||||||
|
lualinux,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "devout";
|
name = "devout";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv,
|
||||||
, lua
|
lua,
|
||||||
, fetchFromSourcehut
|
fetchFromSourcehut,
|
||||||
}:
|
}:
|
||||||
let pname = "fennel";
|
let pname = "fennel";
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
buildGoModule
|
buildGoModule,
|
||||||
, fetchFromGitHub
|
fetchFromGitHub,
|
||||||
, ppp
|
ppp,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
@ -23,5 +23,4 @@ buildGoModule rec {
|
|||||||
|
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
vendorHash = "sha256-hOkhJhToN/VJwjQmnQJSPGz26/YDR2Ch+1yeW51OF+U=";
|
vendorHash = "sha256-hOkhJhToN/VJwjQmnQJSPGz26/YDR2Ch+1yeW51OF+U=";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
{ netlink-lua
|
{
|
||||||
, writeFennelScript
|
netlink-lua,
|
||||||
, runCommand
|
writeFennelScript,
|
||||||
, anoia
|
runCommand,
|
||||||
|
anoia,
|
||||||
}:
|
}:
|
||||||
runCommand "ifwait" { } ''
|
runCommand "ifwait" { } ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp -p ${writeFennelScript "ifwait" [anoia netlink-lua] ./ifwait.fnl} $out/bin/ifwait
|
cp -p ${
|
||||||
|
writeFennelScript "ifwait" [
|
||||||
|
anoia
|
||||||
|
netlink-lua
|
||||||
|
] ./ifwait.fnl
|
||||||
|
} $out/bin/ifwait
|
||||||
''
|
''
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
busybox
|
busybox,
|
||||||
, pkgsBuildBuild
|
pkgsBuildBuild,
|
||||||
, runCommand
|
runCommand,
|
||||||
, cpio
|
cpio,
|
||||||
, writeReferencesToFile
|
writeReferencesToFile,
|
||||||
, writeScript
|
writeScript,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgsBuildBuild) gen_init_cpio;
|
inherit (pkgsBuildBuild) gen_init_cpio;
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
{ stdenv
|
{
|
||||||
, git
|
stdenv,
|
||||||
, python2
|
git,
|
||||||
, which
|
python2,
|
||||||
, fetchgit
|
which,
|
||||||
, fetchFromGitHub
|
fetchgit,
|
||||||
, coccinelle
|
fetchFromGitHub,
|
||||||
|
coccinelle,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
donorTree = fetchFromGitHub {
|
donorTree = fetchFromGitHub {
|
||||||
|
@ -1,28 +1,37 @@
|
|||||||
{ stdenv
|
{
|
||||||
, buildPackages
|
stdenv,
|
||||||
, writeText
|
buildPackages,
|
||||||
, lib
|
writeText,
|
||||||
|
lib,
|
||||||
|
|
||||||
, config
|
config,
|
||||||
, src
|
src,
|
||||||
, version ? "0"
|
version ? "0",
|
||||||
, extraPatchPhase ? "echo"
|
extraPatchPhase ? "echo",
|
||||||
, targets ? ["vmlinux"]
|
targets ? [ "vmlinux" ],
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
writeConfig = import ./write-kconfig.nix { inherit lib writeText; };
|
writeConfig = import ./write-kconfig.nix { inherit lib writeText; };
|
||||||
kconfigFile = writeConfig "kconfig" config;
|
kconfigFile = writeConfig "kconfig" config;
|
||||||
arch = stdenv.hostPlatform.linuxArch;
|
arch = stdenv.hostPlatform.linuxArch;
|
||||||
targetNames = map baseNameOf targets;
|
targetNames = map baseNameOf targets;
|
||||||
inherit lib; in
|
inherit lib;
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "kernel";
|
name = "kernel";
|
||||||
inherit src extraPatchPhase;
|
inherit src extraPatchPhase;
|
||||||
hardeningDisable = [ "all" ];
|
hardeningDisable = [ "all" ];
|
||||||
nativeBuildInputs = [buildPackages.stdenv.cc] ++
|
nativeBuildInputs =
|
||||||
(with buildPackages.pkgs; [
|
[ buildPackages.stdenv.cc ]
|
||||||
rsync bc bison flex pkg-config
|
++ (with buildPackages.pkgs; [
|
||||||
openssl ncurses.all perl
|
rsync
|
||||||
|
bc
|
||||||
|
bison
|
||||||
|
flex
|
||||||
|
pkg-config
|
||||||
|
openssl
|
||||||
|
ncurses.all
|
||||||
|
perl
|
||||||
]);
|
]);
|
||||||
CC = "${stdenv.cc.bintools.targetPrefix}gcc";
|
CC = "${stdenv.cc.bintools.targetPrefix}gcc";
|
||||||
HOSTCC = with buildPackages.pkgs;
|
HOSTCC = with buildPackages.pkgs;
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
liminix
|
liminix,
|
||||||
, lib
|
lib,
|
||||||
, targets ? []
|
targets ? [ ],
|
||||||
, kernel ? null
|
kernel ? null,
|
||||||
, runCommand
|
runCommand,
|
||||||
, pkgsBuildBuild
|
pkgsBuildBuild,
|
||||||
, dependencies ? []
|
dependencies ? [ ],
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (liminix.services) oneshot;
|
inherit (liminix.services) oneshot;
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
writeScriptBin
|
writeScriptBin,
|
||||||
, writeScript
|
writeScript,
|
||||||
, systemconfig
|
systemconfig,
|
||||||
, execline
|
execline,
|
||||||
, lib
|
lib,
|
||||||
, config ? {}
|
config ? { },
|
||||||
, liminix
|
liminix,
|
||||||
, pseudofile
|
pseudofile,
|
||||||
, pkgs
|
pkgs,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (pseudofile) dir symlink;
|
inherit (pseudofile) dir symlink;
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{ stdenv
|
{
|
||||||
, cmake
|
stdenv,
|
||||||
, zlib
|
cmake,
|
||||||
, libyaml
|
zlib,
|
||||||
, fetchFromGitHub
|
libyaml,
|
||||||
|
fetchFromGitHub,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "libubootenv";
|
name = "libubootenv";
|
||||||
|
@ -15,5 +15,4 @@ in lua.pkgs.buildLuaPackage {
|
|||||||
mkdir -p "$out/lib/lua/${lua.luaversion}"
|
mkdir -p "$out/lib/lua/${lua.luaversion}"
|
||||||
cp inotify.so "$out/lib/lua/${lua.luaversion}/"
|
cp inotify.so "$out/lib/lua/${lua.luaversion}/"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -21,5 +21,4 @@ in lua.pkgs.buildLuaPackage {
|
|||||||
mkdir -p "$out/lib/lua/${lua.luaversion}"
|
mkdir -p "$out/lib/lua/${lua.luaversion}"
|
||||||
cp ${pname}.so "$out/lib/lua/${lua.luaversion}/"
|
cp ${pname}.so "$out/lib/lua/${lua.luaversion}/"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{ stdenv, fetchurl }:
|
||||||
stdenv
|
|
||||||
, fetchurl
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "lzma";
|
pname = "lzma";
|
||||||
version = "4.32.7";
|
version = "4.32.7";
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
# make out-of-tree modules given a backported kernel source tree
|
# make out-of-tree modules given a backported kernel source tree
|
||||||
|
|
||||||
{
|
{
|
||||||
extraConfig ? {}
|
extraConfig ? { },
|
||||||
, drivers ? [ ]
|
drivers ? [ ],
|
||||||
, kernel-backport
|
kernel-backport,
|
||||||
, stdenv
|
stdenv,
|
||||||
, writeText
|
writeText,
|
||||||
, klibBuild ? null
|
klibBuild ? null,
|
||||||
, buildPackages
|
buildPackages,
|
||||||
, fetchFromGitHub
|
fetchFromGitHub,
|
||||||
|
|
||||||
, liminix
|
liminix,
|
||||||
, lib
|
lib,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
arch = stdenv.hostPlatform.linuxArch;
|
arch = stdenv.hostPlatform.linuxArch;
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv,
|
||||||
, nix
|
nix,
|
||||||
, cpio
|
cpio,
|
||||||
, openssh
|
openssh,
|
||||||
}: stdenv.mkDerivation {
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
name = "min-copy-closure";
|
name = "min-copy-closure";
|
||||||
buildInputs = [ ];
|
buildInputs = [ ];
|
||||||
propagatedBuildInputs = [ cpio openssh nix ];
|
propagatedBuildInputs = [ cpio openssh nix ];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
writeFennelScript
|
writeFennelScript,
|
||||||
, anoia
|
anoia,
|
||||||
, lualinux
|
lualinux,
|
||||||
}:
|
}:
|
||||||
writeFennelScript "odhcpc-script" [anoia lualinux] ./odhcp6-script.fnl
|
writeFennelScript "odhcpc-script" [anoia lualinux] ./odhcp6-script.fnl
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{ stdenv
|
{
|
||||||
, cmake
|
stdenv,
|
||||||
, fetchFromGitHub
|
cmake,
|
||||||
, ...} :
|
fetchFromGitHub,
|
||||||
|
...
|
||||||
|
}:
|
||||||
# let switchDotH = buildPackages.fetchurl {
|
# let switchDotH = buildPackages.fetchurl {
|
||||||
# url = "https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob_plain;f=target/linux/generic/files/include/uapi/linux/switch.h;hb=99a188828713d6ff9c541590b08d4e63ef52f6d7";
|
# url = "https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob_plain;f=target/linux/generic/files/include/uapi/linux/switch.h;hb=99a188828713d6ff9c541590b08d4e63ef52f6d7";
|
||||||
# sha256 = "15kmhhcpd84y4f45rf8zai98c61jyvkc37p90pcxirna01x33wi8";
|
# sha256 = "15kmhhcpd84y4f45rf8zai98c61jyvkc37p90pcxirna01x33wi8";
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{ fetchFromGitHub, pkgsBuildBuild }:
|
||||||
fetchFromGitHub
|
|
||||||
, pkgsBuildBuild
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
name = "openwrt-source";
|
name = "openwrt-source";
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
fetchFromGitHub
|
fetchFromGitHub,
|
||||||
, stdenv
|
stdenv,
|
||||||
, autoreconfHook
|
autoreconfHook,
|
||||||
, substituteAll
|
substituteAll,
|
||||||
# , openssl
|
# , openssl
|
||||||
}: stdenv.mkDerivation {
|
}: stdenv.mkDerivation {
|
||||||
pname = "ppp";
|
pname = "ppp";
|
||||||
@ -35,6 +35,4 @@
|
|||||||
"man"
|
"man"
|
||||||
"dev"
|
"dev"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
{ lib
|
{
|
||||||
, stdenv
|
lib,
|
||||||
, fetchFromGitHub
|
stdenv,
|
||||||
, ppp } :
|
fetchFromGitHub,
|
||||||
|
ppp,
|
||||||
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "rp-pppoe";
|
pname = "rp-pppoe";
|
||||||
version = "3.15";
|
version = "3.15";
|
||||||
@ -20,7 +22,9 @@ stdenv.mkDerivation rec {
|
|||||||
export PPPD=${ppp}/sbin/pppd
|
export PPPD=${ppp}/sbin/pppd
|
||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "rpppoe_cv_pack_bitfields=rev" ];
|
configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
|
||||||
|
"rpppoe_cv_pack_bitfields=rev"
|
||||||
|
];
|
||||||
|
|
||||||
postConfigure = ''
|
postConfigure = ''
|
||||||
sed -i Makefile -e 's@DESTDIR)/etc/ppp@out)/etc/ppp@'
|
sed -i Makefile -e 's@DESTDIR)/etc/ppp@out)/etc/ppp@'
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{ stdenv, gdb }:
|
||||||
stdenv
|
|
||||||
, gdb
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "preinit";
|
name = "preinit";
|
||||||
src = ./.;
|
src = ./.;
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{ writeText, lib }:
|
||||||
writeText
|
|
||||||
, lib
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
visit = prefix: attrset:
|
visit = prefix: attrset:
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv,
|
||||||
, python3
|
python3,
|
||||||
, qemu
|
qemu,
|
||||||
, fetchzip
|
fetchzip,
|
||||||
, writeShellApplication
|
writeShellApplication,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
chr-image = fetchzip {
|
chr-image = fetchzip {
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
{
|
{
|
||||||
qemuLim
|
qemuLim,
|
||||||
, socat
|
socat,
|
||||||
, writeShellScript
|
writeShellScript,
|
||||||
, writeFennel
|
writeFennel,
|
||||||
, runCommand
|
runCommand,
|
||||||
, lib
|
lib,
|
||||||
, lua
|
lua,
|
||||||
, pkgsBuildBuild
|
pkgsBuildBuild,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
run-liminix-vm = pkgsBuildBuild.writeFennel "run-liminix-vm" {
|
run-liminix-vm = pkgsBuildBuild.writeFennel "run-liminix-vm" {
|
||||||
packages = [ qemuLim lua.pkgs.luaposix lua.pkgs.fennel ];
|
packages = [ qemuLim lua.pkgs.luaposix lua.pkgs.fennel ];
|
||||||
} ./run-liminix-vm.fnl;
|
} ./run-liminix-vm.fnl;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
s6-linux-init
|
s6-linux-init,
|
||||||
, execline
|
execline,
|
||||||
, writeScript
|
writeScript,
|
||||||
, stdenvNoCC
|
stdenvNoCC,
|
||||||
, lib
|
lib,
|
||||||
, s6-rc
|
s6-rc,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
hpr = name: arg: writeScript name ''
|
hpr = name: arg: writeScript name ''
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
# config.services and calling s6-rc-compile on them
|
# config.services and calling s6-rc-compile on them
|
||||||
|
|
||||||
{
|
{
|
||||||
stdenvNoCC
|
stdenvNoCC,
|
||||||
, buildPackages
|
buildPackages,
|
||||||
, closureInfo
|
closureInfo,
|
||||||
, writeText
|
writeText,
|
||||||
, services ? []
|
services ? [ ],
|
||||||
}:
|
}:
|
||||||
let closure-info = closureInfo { rootPaths = services; };
|
let closure-info = closureInfo { rootPaths = services; };
|
||||||
in stdenvNoCC.mkDerivation {
|
in stdenvNoCC.mkDerivation {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
stdenv
|
stdenv,
|
||||||
, fetchFromGitLab
|
fetchFromGitLab,
|
||||||
, makeWrapper
|
makeWrapper,
|
||||||
, btrfs-progs
|
btrfs-progs,
|
||||||
, util-linux-small
|
util-linux-small,
|
||||||
, lib
|
lib,
|
||||||
}:
|
}:
|
||||||
let search_path = lib.makeBinPath [btrfs-progs util-linux-small];
|
let search_path = lib.makeBinPath [btrfs-progs util-linux-small];
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
# they should contain
|
# they should contain
|
||||||
|
|
||||||
{
|
{
|
||||||
writeText
|
writeText,
|
||||||
, writeFennelScript
|
writeFennelScript,
|
||||||
, lib
|
lib,
|
||||||
, s6-init-bin
|
s6-init-bin,
|
||||||
, closureInfo
|
closureInfo,
|
||||||
, stdenv
|
stdenv,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
lua5_3
|
lua5_3,
|
||||||
, stdenv
|
stdenv,
|
||||||
, makeWrapper
|
makeWrapper,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
lua = lua5_3.withPackages (ps: with ps; [
|
lua = lua5_3.withPackages (ps: with ps; [
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
{ nellie
|
{
|
||||||
, lualinux
|
nellie,
|
||||||
, writeFennel
|
lualinux,
|
||||||
, anoia
|
writeFennel,
|
||||||
, fennel
|
anoia,
|
||||||
, stdenv
|
fennel,
|
||||||
, fennelrepl
|
stdenv,
|
||||||
, s6-rc-up-tree
|
fennelrepl,
|
||||||
|
s6-rc-up-tree,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "uevent-watch";
|
name = "uevent-watch";
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
# usb modeswitch without udev, tcl, coreutils, bash dependencies
|
# usb modeswitch without udev, tcl, coreutils, bash dependencies
|
||||||
{ stdenv
|
{
|
||||||
, lib
|
stdenv,
|
||||||
, fetchurl
|
lib,
|
||||||
, pkg-config
|
fetchurl,
|
||||||
, libusb1
|
pkg-config,
|
||||||
|
libusb1,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
pname = "usb-modeswitch";
|
pname = "usb-modeswitch";
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
{ writeScript, lib }:
|
||||||
|
name:
|
||||||
{
|
{
|
||||||
writeScript
|
runtimeInputs ? [ ],
|
||||||
, lib
|
}:
|
||||||
}
|
text:
|
||||||
: name : { runtimeInputs ? [] } : text : writeScript name ''
|
writeScript name ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
{ writeFennel
|
{ writeFennel, stdenv }:
|
||||||
, stdenv
|
|
||||||
}:
|
|
||||||
name: packages: source:
|
name: packages: source:
|
||||||
writeFennel name { inherit packages; } source
|
writeFennel name { inherit packages; } source
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
lua
|
lua,
|
||||||
, lib
|
lib,
|
||||||
, fennel
|
fennel,
|
||||||
, stdenv
|
stdenv,
|
||||||
}:
|
}:
|
||||||
name:
|
name:
|
||||||
{
|
{
|
||||||
packages ? [ ],
|
packages ? [ ],
|
||||||
correlate ? false,
|
correlate ? false,
|
||||||
mainFunction ? null
|
mainFunction ? null,
|
||||||
} : source :
|
}:
|
||||||
|
source:
|
||||||
let
|
let
|
||||||
luapath = builtins.map
|
luapath = builtins.map (
|
||||||
(f:
|
f: "${f}/share/lua/${lua.luaversion}/?.lua;" + "${f}/share/lua/${lua.luaversion}/?/init.lua;"
|
||||||
"${f}/share/lua/${lua.luaversion}/?.lua;" +
|
) packages;
|
||||||
"${f}/share/lua/${lua.luaversion}/?/init.lua;")
|
|
||||||
packages;
|
|
||||||
luacpath = builtins.map (f: "${f}/lib/lua/${lua.luaversion}/?.so;") packages;
|
luacpath = builtins.map (f: "${f}/lib/lua/${lua.luaversion}/?.so;") packages;
|
||||||
luaFlags = lib.optionalString (mainFunction != null) "-e dofile(arg[0]).${mainFunction}()";
|
luaFlags = lib.optionalString (mainFunction != null) "-e dofile(arg[0]).${mainFunction}()";
|
||||||
in stdenv.mkDerivation {
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
inherit name;
|
inherit name;
|
||||||
src = ./.;
|
src = ./.;
|
||||||
nativeBuildInputs = [ fennel ];
|
nativeBuildInputs = [ fennel ];
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
{
|
{ stdenv, openwrt }:
|
||||||
stdenv
|
|
||||||
, openwrt
|
|
||||||
}:
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "zyxel-bootconfig";
|
name = "zyxel-bootconfig";
|
||||||
inherit (openwrt) src;
|
inherit (openwrt) src;
|
||||||
|
Loading…
Reference in New Issue
Block a user