1
0

Compare commits

...

3 Commits

6 changed files with 44 additions and 20 deletions

View File

@ -1,7 +1,6 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
inherit (pkgs) inherit (pkgs)
busybox
execline execline
s6 s6
s6-init-bin s6-init-bin
@ -16,12 +15,11 @@ let
name = "s6-scripts"; name = "s6-scripts";
src = ./scripts; src = ./scripts;
phases = ["unpackPhase" "installPhase" ]; phases = ["unpackPhase" "installPhase" ];
buildInputs = [busybox]; buildInputs = [];
installPhase = '' installPhase = ''
mkdir $out mkdir $out
cp -r $src $out/scripts cp -r $src $out/scripts
chmod -R +w $out chmod -R +w $out
patchShebangs $out/scripts
''; '';
}; };
service = dir { service = dir {

View File

@ -1,4 +1,4 @@
#!/usr/bin/env sh #!/bin/sh
rl="$1" rl="$1"
shift shift

View File

@ -1,4 +1,4 @@
#!/usr/bin/env sh #!/bin/sh
### Things to do before hardware halt/reboot/poweroff. ### Things to do before hardware halt/reboot/poweroff.

View File

@ -1,4 +1,4 @@
#!/nix/store/xbdqbi2mscmhl5wcpbgpjdwxbsrvpkil-bash-5.1-p16/bin/sh -e #!/bin/sh -e
### Things to do *right before* the machine gets rebooted or ### Things to do *right before* the machine gets rebooted or
### powered off, at the very end of the shutdown sequence, ### powered off, at the very end of the shutdown sequence,

View File

@ -1,4 +1,4 @@
#!/usr/bin/env sh -e #!/bin/sh -e
### This script is called once at boot time by rc.init, and is ### This script is called once at boot time by rc.init, and is
### also called by the runleveld service every time the user ### also called by the runleveld service every time the user

View File

@ -7,11 +7,35 @@ let
preBuild = '' preBuild = ''
makeFlagsArray+=(PLAT="posix" SYSLIBS="-Wl,-E -ldl" CFLAGS="-O2 -fPIC -DLUA_USE_POSIX -DLUA_USE_DLOPEN") makeFlagsArray+=(PLAT="posix" SYSLIBS="-Wl,-E -ldl" CFLAGS="-O2 -fPIC -DLUA_USE_POSIX -DLUA_USE_DLOPEN")
''; '';
# lua in nixpkgs has a postInstall stanza that assumes only
# one output, we need to override that if we're going to
# convert to multi-output
# outputs = ["bin" "man" "out"];
makeFlags = makeFlags =
builtins.filter (x: (builtins.match "(PLAT|MYLIBS).*" x) == null) builtins.filter (x: (builtins.match "(PLAT|MYLIBS).*" x) == null)
o.makeFlags; o.makeFlags;
}); });
s6 = prev.s6.overrideAttrs(o:
let patch = fetchpatch {
# add "p" directive in s6-log
url = "https://github.com/skarnet/s6/commit/ddc76841398dfd5e18b22943727ad74b880236d3.patch";
hash = "sha256-fBtUinBdp5GqoxgF6fcR44Tu8hakxs/rOShhuZOgokc=";
};
config = builtins.filter
(x: (builtins.match ".*shared.*" x) == null)
o.configureFlags;
patch_needed = builtins.compareVersions o.version "2.11.1.2" <= 0;
in {
configureFlags = config ++ [
"--disable-allstatic"
"--disable-static"
"--enable-shared"
];
stripAllList = [ "sbin" "bin" ];
patches =
(if o ? patches then o.patches else []) ++
(if patch_needed then [ patch ] else []);
});
in in
extraPkgs // { extraPkgs // {
mtdutils = prev.mtdutils.overrideAttrs(o: { mtdutils = prev.mtdutils.overrideAttrs(o: {
@ -20,6 +44,9 @@ extraPkgs // {
]; ];
}); });
# openssl is reqired by ntp
rsyncSmall = prev.rsync.overrideAttrs(o: { rsyncSmall = prev.rsync.overrideAttrs(o: {
configureFlags = o.configureFlags ++ [ configureFlags = o.configureFlags ++ [
"--disable-openssl" "--disable-openssl"
@ -62,18 +89,17 @@ extraPkgs // {
luaSmall = let s = lua_no_readline.override { self = s; }; in s; luaSmall = let s = lua_no_readline.override { self = s; }; in s;
s6 = prev.s6.overrideAttrs(o: inherit s6;
let patch = fetchpatch { s6-linux-init = prev.s6-linux-init.override {
# add "p" directive in s6-log skawarePackages = prev.skawarePackages // {
url = "https://github.com/skarnet/s6/commit/ddc76841398dfd5e18b22943727ad74b880236d3.patch"; inherit s6;
hash = "sha256-fBtUinBdp5GqoxgF6fcR44Tu8hakxs/rOShhuZOgokc="; };
}; };
patch_needed = builtins.compareVersions o.version "2.11.1.2" <= 0; s6-rc = prev.s6-rc.override {
in { skawarePackages = prev.skawarePackages // {
patches = inherit s6;
(if o ? patches then o.patches else []) ++ };
(if patch_needed then [ patch ] else []); };
});
nftables = prev.nftables.overrideAttrs(o: { nftables = prev.nftables.overrideAttrs(o: {
configureFlags = [ configureFlags = [