Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f45d44e7f
|
||
|
|
92d01752ab
|
||
|
|
82bf46d23f
|
||
|
|
2abcb99ea2
|
||
|
|
2218efc0cf
|
||
|
|
30c5525d7b
|
||
|
|
bf6d1ada71
|
||
|
|
16294a35ee
|
||
|
|
22756af8fb
|
||
|
|
739ae4a7cf
|
||
|
|
eec89c4519
|
||
|
|
7193656b6a
|
||
|
|
7d86e19c07
|
||
|
|
f1ffb180bc
|
||
|
|
7f690145e3
|
@@ -12,7 +12,7 @@ import (
|
||||
|
||||
// Value are types supported by the language.
|
||||
type Value interface {
|
||||
bool | int64 | string | []string | []int64 | [][2]string
|
||||
bool | int64 | string | []string | []int64 | [][2]string | Nil
|
||||
}
|
||||
|
||||
type (
|
||||
@@ -33,6 +33,29 @@ type (
|
||||
F func(args FArgs) (v any, set bool, err error)
|
||||
V map[unique.Handle[Ident]]any
|
||||
}
|
||||
|
||||
// Nil represents an untyped nil.
|
||||
Nil struct{}
|
||||
|
||||
// AString represents an argument string that may be nil.
|
||||
AString struct {
|
||||
V string
|
||||
Nil bool
|
||||
}
|
||||
)
|
||||
|
||||
// NilError is returned for an invalid nil assignment.
|
||||
type NilError struct{ reflect.Type }
|
||||
|
||||
func (e NilError) Error() string {
|
||||
return fmt.Sprintf("attempting to assign nil to %s", e.Type)
|
||||
}
|
||||
|
||||
var (
|
||||
// nilStringV is the [reflect.Value] of an Azalea nil assigned to an [AString].
|
||||
nilStringV = reflect.ValueOf(AString{Nil: true})
|
||||
// nilStringT is the [reflect.Type] of nilStringV.
|
||||
nilStringT = nilStringV.Type()
|
||||
)
|
||||
|
||||
// Apply applies named arguments and rejects unused arguments.
|
||||
@@ -50,8 +73,8 @@ func (args FArgs) Apply(v map[unique.Handle[Ident]]any) error {
|
||||
}
|
||||
return UndefinedError(arg.K.Value())
|
||||
}
|
||||
err := storeE(r, arg.V)
|
||||
if err != nil {
|
||||
|
||||
if err := storeE(r, arg.V); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -115,11 +138,38 @@ func (e TypeError) Is(err error) bool {
|
||||
}
|
||||
|
||||
// storeE is a convenience function to set the value of a result pointer.
|
||||
func storeE(rp any, r any) error {
|
||||
func storeE(rp, r any) error {
|
||||
pv := reflect.ValueOf(rp).Elem()
|
||||
pt := pv.Type()
|
||||
as := nilStringT.AssignableTo(pt)
|
||||
|
||||
if r == (Nil{}) {
|
||||
switch kind := pt.Kind(); kind {
|
||||
case reflect.Bool, reflect.String:
|
||||
return NilError{pt}
|
||||
default:
|
||||
if rv, ok := rp.(*any); ok && !reflect.ValueOf(*rv).IsValid() {
|
||||
*rv = Nil{}
|
||||
} else if as {
|
||||
pv.Set(nilStringV)
|
||||
} else {
|
||||
pv.SetZero()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
v := reflect.ValueOf(r)
|
||||
pt, vt := pv.Type(), v.Type()
|
||||
if !vt.AssignableTo(pt) {
|
||||
if vt := v.Type(); !vt.AssignableTo(pt) {
|
||||
if as {
|
||||
var asv AString
|
||||
if err := storeE(&asv.V, r); err != nil {
|
||||
return err
|
||||
}
|
||||
pv.Set(reflect.ValueOf(asv))
|
||||
return nil
|
||||
}
|
||||
|
||||
return TypeError{vt, pt}
|
||||
}
|
||||
pv.Set(v)
|
||||
@@ -226,6 +276,9 @@ func evaluateAny(d PF, s []Frame, expr, rp any) bool {
|
||||
case "false":
|
||||
store(rp, false)
|
||||
return true
|
||||
case "nil":
|
||||
store(rp, Nil{})
|
||||
return true
|
||||
default:
|
||||
return evaluateAny(d, s, v, rp)
|
||||
}
|
||||
|
||||
@@ -100,15 +100,79 @@ func TestEvaluate(t *testing.T) {
|
||||
Err: UndefinedError("f"),
|
||||
}},
|
||||
|
||||
{"error wrap deep", `f { v = nil; }`, makeStackCheck(func(
|
||||
{"error wrap deep", `f { v = nonexistent; }`, makeStackCheck(func(
|
||||
FArgs,
|
||||
) (any, error) {
|
||||
panic("unreachable")
|
||||
}), "", EvaluationError{
|
||||
Expr: Ident("nil"),
|
||||
Err: UndefinedError("nil"),
|
||||
Expr: Ident("nonexistent"),
|
||||
Err: UndefinedError("nonexistent"),
|
||||
}},
|
||||
|
||||
{"nil", `f { v = nil; }`, checkArgs(FArgs{
|
||||
{K: unique.Make(Ident("v")), V: Nil{}},
|
||||
}), "\xfd", nil},
|
||||
|
||||
{"apply nil string", `f { v = nil; }`, makeStackCheck(func(
|
||||
args FArgs,
|
||||
) (v any, err error) {
|
||||
var s string
|
||||
err = args.Apply(map[unique.Handle[Ident]]any{
|
||||
unique.Make(Ident("v")): &s,
|
||||
})
|
||||
v = s
|
||||
return
|
||||
}), "", EvaluationError{
|
||||
Expr: Func{
|
||||
Ident: Ident("f"),
|
||||
Args: []Arg{
|
||||
{K: []Ident{"v"}, V: Val{Ident("nil")}},
|
||||
},
|
||||
},
|
||||
Err: NilError{Type: reflect.TypeFor[string]()},
|
||||
}},
|
||||
|
||||
{"apply nil AString", `f { v = nil; }`, makeStackCheck(func(
|
||||
args FArgs,
|
||||
) (v any, err error) {
|
||||
s := AString{}
|
||||
err = args.Apply(map[unique.Handle[Ident]]any{
|
||||
unique.Make(Ident("v")): &s,
|
||||
})
|
||||
v = s.V
|
||||
if !s.Nil {
|
||||
err = fmt.Errorf("got non-nil string %q", s.V)
|
||||
}
|
||||
return
|
||||
}), "", nil},
|
||||
|
||||
{"apply AString", `f { v = "\xfd"; }`, makeStackCheck(func(
|
||||
args FArgs,
|
||||
) (v any, err error) {
|
||||
s := AString{}
|
||||
err = args.Apply(map[unique.Handle[Ident]]any{
|
||||
unique.Make(Ident("v")): &s,
|
||||
})
|
||||
v = s.V
|
||||
if s.Nil {
|
||||
err = fmt.Errorf("unexpected nil %q", s.V)
|
||||
}
|
||||
return
|
||||
}), "\xfd", nil},
|
||||
|
||||
{"apply nil", `f { v = nil; }`, makeStackCheck(func(
|
||||
args FArgs,
|
||||
) (v any, err error) {
|
||||
s := make([]struct{}, 9)
|
||||
err = args.Apply(map[unique.Handle[Ident]]any{
|
||||
unique.Make(Ident("v")): &s,
|
||||
})
|
||||
if s != nil {
|
||||
err = fmt.Errorf("got non-nil value %#v", s)
|
||||
}
|
||||
return
|
||||
}), "", nil},
|
||||
|
||||
{"common inputs", `package name { inputs, v = []; }`, nil, "", EvaluationError{
|
||||
Expr: Func{
|
||||
Ident: Ident("name"),
|
||||
@@ -214,8 +278,8 @@ func TestEvaluate(t *testing.T) {
|
||||
}
|
||||
|
||||
var errEquals bool
|
||||
if _, ok := errors.AsType[TypeError](err); ok {
|
||||
errEquals = errors.Is(err, tc.err)
|
||||
if e, ok := errors.AsType[TypeError](err); ok {
|
||||
errEquals = e.Is(tc.err)
|
||||
} else {
|
||||
errEquals = reflect.DeepEqual(err, tc.err)
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ package acl {
|
||||
|
||||
exec = make {
|
||||
// makes assumptions about uid_map/gid_map
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ attr, kernel-headers ];
|
||||
|
||||
@@ -15,9 +15,9 @@ package awk {
|
||||
chmod = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
inPlace = true;
|
||||
skipConfigure = true;
|
||||
defaults = false;
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
make = [ "YACC='yacc -d -b awkgram'" ];
|
||||
preCheck = "install -vD a.out /system/bin/awk\n";
|
||||
install = "install -vD a.out /work/system/bin/awk";
|
||||
|
||||
@@ -12,7 +12,7 @@ package bison {
|
||||
|
||||
toyboxEarly = true;
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
check = [
|
||||
"TESTSUITEFLAGS=" + jobsFlagE + "' " + skipGNUTests {
|
||||
tests = [
|
||||
|
||||
@@ -19,6 +19,6 @@ package byacc {
|
||||
chmod = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,13 +15,10 @@ package bzip2 {
|
||||
enterSource = true;
|
||||
|
||||
exec = make {
|
||||
skipConfigure = true;
|
||||
skipCheck = true;
|
||||
inPlace = true;
|
||||
|
||||
make = [
|
||||
"CC=cc",
|
||||
];
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
make = [ "CC=cc" ];
|
||||
check = nil;
|
||||
install = "make PREFIX=/work/system install";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ package cairo {
|
||||
// runs the entire test suite in a single meson test
|
||||
interactiveTest = true;
|
||||
// only works with specific dependency versions
|
||||
skipTest = true;
|
||||
test = false;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -20,7 +20,7 @@ package cmake {
|
||||
chmod = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
|
||||
configureName = "/usr/src/cmake/bootstrap";
|
||||
configure = {
|
||||
|
||||
@@ -19,7 +19,7 @@ package connman {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
dbus,
|
||||
iptables,
|
||||
|
||||
@@ -21,7 +21,7 @@ touch \
|
||||
`;
|
||||
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
configureName = "../dist/configure";
|
||||
forceAutoconf = true;
|
||||
configure = {
|
||||
|
||||
@@ -18,17 +18,17 @@ package elfutils {
|
||||
];
|
||||
|
||||
exec = make {
|
||||
// nonstandard glibc extension
|
||||
skipCheck = true;
|
||||
|
||||
configure = {
|
||||
"enable-deterministic-archives";
|
||||
};
|
||||
|
||||
// nonstandard glibc extension
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
m4,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
zlib,
|
||||
bzip2,
|
||||
|
||||
@@ -3,12 +3,12 @@ package firmware {
|
||||
website = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
|
||||
anitya = 141464;
|
||||
|
||||
version# = "20260622";
|
||||
version# = "20260810";
|
||||
source = remoteGitLab {
|
||||
domain = "gitlab.com";
|
||||
suffix = "kernel-firmware/linux-firmware";
|
||||
ref = version;
|
||||
checksum = "gpytkDM58EVjaUuryOekcekh_rWsfuv3S7LQxopHlNlVGmMsuqNwfug4BjgTgizE";
|
||||
checksum = "XNUhz9QstaDKNegM3Bl0-TtZzpsvX7-E8WMnDCO7KBhBC6t_TxsdG05-ETdXynry";
|
||||
};
|
||||
|
||||
// dedup creates temporary file
|
||||
@@ -22,17 +22,17 @@ package firmware {
|
||||
];
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
skipConfigure = true;
|
||||
inPlace = true;
|
||||
defaults = false;
|
||||
chdir = false;
|
||||
|
||||
configure = nil;
|
||||
make = [
|
||||
"DESTDIR=/work/system",
|
||||
"install-zst",
|
||||
];
|
||||
|
||||
// requires pre-commit
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
|
||||
install = "make " + jobsFlagE + " " + loadFlagE + " DESTDIR=/work/system dedup";
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ package fontconfig {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
gettext,
|
||||
gperf,
|
||||
gzip,
|
||||
|
||||
@@ -22,7 +22,7 @@ package fuse {
|
||||
|
||||
postCompile = "python3 -m pytest test/";
|
||||
// this project uses pytest
|
||||
skipTest = true;
|
||||
test = false;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -65,7 +65,7 @@ ln -s system/lib /work/
|
||||
// This toolchain is hacked to pieces, it is not expected to ever work
|
||||
// well in its current state. That does not matter as long as the
|
||||
// toolchain it produces passes its own test suite.
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -23,7 +23,7 @@ rm -f /system/bin/httpd
|
||||
bin = [ "perl" ];
|
||||
populateUsrBin = true;
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
generate = "make configure";
|
||||
|
||||
preMake = `
|
||||
|
||||
@@ -19,7 +19,7 @@ chmod +w tests/test-c32ispunct.sh && echo '#!/bin/sh' > tests/test-c32ispunct.sh
|
||||
|
||||
toyboxEarly = true;
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
@@ -114,7 +114,7 @@ package libtool {
|
||||
|
||||
exec = make {
|
||||
// _Z2a2c: symbol not found
|
||||
skipEarlyStageCheck = true;
|
||||
checkEarly = false;
|
||||
|
||||
check = [
|
||||
"TESTSUITEFLAGS=" + jobsFlagE,
|
||||
@@ -142,7 +142,7 @@ package gzip {
|
||||
|
||||
exec = make {
|
||||
// dependency loop
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ test_disable '#!/bin/sh' tests/cmp
|
||||
|
||||
toyboxEarly = true;
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ test_disable '#!/bin/sh' tests/need-filename
|
||||
|
||||
toyboxEarly = true;
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ package bash {
|
||||
|
||||
toyboxEarly = true;
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
configure = {
|
||||
"without-bash-malloc";
|
||||
};
|
||||
@@ -371,7 +371,7 @@ test_disable 'int main(){return 0;}' gnulib-tests/test-lchown.c
|
||||
`;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
configure = {
|
||||
"enable-single-binary": "symlinks";
|
||||
};
|
||||
@@ -436,7 +436,7 @@ package texinfo {
|
||||
|
||||
exec = make {
|
||||
// nonstandard glibc extension
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ perl ];
|
||||
@@ -648,7 +648,7 @@ package mpc {
|
||||
enterSource = true;
|
||||
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
generate = "autoreconf -vfi";
|
||||
};
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ echo 'int main(){return 0;}' > tests/mini-dtls-fragments.c
|
||||
bison,
|
||||
gettext,
|
||||
gperf,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
python,
|
||||
texinfo,
|
||||
|
||||
@@ -27,7 +27,7 @@ package go {
|
||||
enterSource = true;
|
||||
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `
|
||||
mkdir /work/system/ "${TMPDIR}"
|
||||
cp -r . /work/system/go
|
||||
|
||||
@@ -3,12 +3,12 @@ package googletest {
|
||||
exclude = true;
|
||||
anitya = 18290;
|
||||
|
||||
version# = "1.17.0";
|
||||
version# = "1.18.0";
|
||||
output = remoteGitHubRelease {
|
||||
suffix = "google/googletest";
|
||||
tag = "v"+version;
|
||||
name = "googletest-"+version+".tar.gz";
|
||||
checksum = "-1r3ch8vPP8COF7xUH5hyX6bEJ4dN9TQh4IxrmpHr6vaig6mA3DdUpV4cihQ_9dw";
|
||||
checksum = "ABVPC5sduQR7xfkZQm7UHSmBTaAJcVPRHS_lNMhlL99HU_YffpFmXbwRKeG1ZY8A";
|
||||
compress = gzip;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ package hakurei-source {
|
||||
description = "hakurei source tree";
|
||||
exclude = true;
|
||||
|
||||
version# = "0.4.5";
|
||||
version# = "0.4.6";
|
||||
output = remoteTar {
|
||||
url = "https://git.gensokyo.uk/rosa/hakurei/archive/"+
|
||||
"v"+version+".tar.gz";
|
||||
checksum = "5bvbuIRcDIrtijogwqXn3y8h5f3rVS4ZSVhOig6Galfzt3g-O3Ufb-tHL1kQCQWK";
|
||||
checksum = "2HxvdykuSSymAu-c1WIwQAy3qT4dDm8B--93iL4uomBlBC8wfSWldbvPF1noNkUC";
|
||||
compress = gzip;
|
||||
};
|
||||
}
|
||||
@@ -32,7 +32,7 @@ package hakurei {
|
||||
};
|
||||
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `
|
||||
echo 'Building test helper (hostname).'
|
||||
go build -o /bin/hostname /usr/src/hostname/main.go
|
||||
@@ -71,7 +71,7 @@ mkdir -p /work/system/bin/
|
||||
|
||||
inputs = [
|
||||
go,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
libseccomp,
|
||||
acl,
|
||||
@@ -103,7 +103,7 @@ package hakurei-dist {
|
||||
};
|
||||
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `
|
||||
echo 'Building test helper (hostname).'
|
||||
go build -o /bin/hostname /usr/src/hostname/main.go
|
||||
@@ -118,7 +118,7 @@ DESTDIR=/work "./${NAME}.sh"
|
||||
|
||||
inputs = [
|
||||
go,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
libseccomp,
|
||||
acl,
|
||||
@@ -146,7 +146,7 @@ package earlyinit {
|
||||
];
|
||||
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `
|
||||
echo '# Building earlyinit.'
|
||||
go build -trimpath -v -o /work/ -ldflags="-s -w
|
||||
|
||||
@@ -15,9 +15,9 @@ package hwdata {
|
||||
|
||||
exec = make {
|
||||
// awk: fatal: cannot open file `hwdata.spec' for reading: No such file or directory
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
|
||||
// lspci: Unknown option 'A' (see "lspci --help")
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package iproute2 {
|
||||
chmod = true;
|
||||
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
// drop default autoconf options
|
||||
configureName = "./configure";
|
||||
configure = {
|
||||
@@ -30,11 +30,11 @@ package iproute2 {
|
||||
};
|
||||
make = [ "CC=cc", "YACC=yacc" ];
|
||||
// wants root
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
m4,
|
||||
byacc,
|
||||
flex,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/x86 6.18.43 Kernel Configuration
|
||||
# Linux/x86 6.18.44 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="clang version 22.1.8"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 6.18.43 Kernel Configuration
|
||||
# Linux/arm64 6.18.44 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="clang version 22.1.8"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
||||
@@ -3,11 +3,11 @@ package kernel-source {
|
||||
website = "https://kernel.org";
|
||||
exclude = true;
|
||||
|
||||
version# = "6.18.43";
|
||||
version# = "6.18.44";
|
||||
output = remoteTar {
|
||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/"+
|
||||
"snapshot/linux-"+version+".tar.gz";
|
||||
checksum = "SthN8PgD7oze4syBC54KJoky7JUpAmXJO0Y98an1ZJiqGppnf6N3kmZiZZdvi9dd";
|
||||
checksum = "yNPGMl3A-EgU6LgD37PAcXIa9iUtP-AmoJuQozfGRSq6Eg1Eq4fdbpKy3iWewU9_";
|
||||
compress = gzip;
|
||||
};
|
||||
}
|
||||
@@ -25,8 +25,8 @@ package kernel-headers {
|
||||
toyboxEarly = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
skipConfigure = true;
|
||||
defaults = false;
|
||||
configure = nil;
|
||||
make = [
|
||||
"-f /usr/src/kernel-headers/Makefile",
|
||||
"O=/tmp/kbuild",
|
||||
@@ -35,7 +35,7 @@ package kernel-headers {
|
||||
"INSTALL_HDR_PATH=/work/system",
|
||||
"headers_install",
|
||||
];
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
install = `
|
||||
cat \
|
||||
/usr/src/version.h > \
|
||||
@@ -46,9 +46,9 @@ cat \
|
||||
checksum = arch {
|
||||
default = "";
|
||||
|
||||
amd64 = "mZZqI0tEpqbr3sQKOFLBeNv-DC7pkHNqPI7JdSSmo40sFCF2XnAMcah1DcUK2HTe";
|
||||
arm64 = "e6cD6TsBr1e-zONKtocvbRwmSnxqC_2K7A2KvMcO6lnpt4MXL1gsyx6k-BXqC19Z";
|
||||
riscv64 = "cljgtOrTCpyXoQLaKVmnnWPbCWkoXuMIVNjc6YXsy-zgsFzRA-H8yfJ1NojS867z";
|
||||
amd64 = "vN5Ts9yAlHTntcQcNGJSisY5guYsYfvGnQqI1NzTBzvhBMPD432WB3B0KFGYQntA";
|
||||
arm64 = "FQtpqCA0tlz17RJP8a5t9YEM_6F9kGPqQ9Z60gFrkVP3v8_P-Vnf5S7wLlxyRlOe";
|
||||
riscv64 = "U5yQ9TI5_7diyrCcm2Iqh3XCMl0P60oQGeDMWxt3OQ91zFWPQ5FCH-eoYG9tSTMT";
|
||||
};
|
||||
inputs = [ rsync ];
|
||||
}
|
||||
@@ -86,11 +86,12 @@ install -Dm0500 \
|
||||
exclusive = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
skipConfigure = true;
|
||||
defaults = false;
|
||||
|
||||
configure = nil;
|
||||
|
||||
// Build, install, and boot kernel before running kselftest on it.
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
|
||||
make = [
|
||||
"-f /usr/src/kernel/Makefile",
|
||||
@@ -154,7 +155,7 @@ package gen_init_cpio {
|
||||
|
||||
enterSource = true;
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `
|
||||
mkdir -p /work/system/bin/
|
||||
cc -o /work/system/bin/gen_init_cpio usr/gen_init_cpio.c
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/riscv 6.18.43 Kernel Configuration
|
||||
# Linux/riscv 6.18.44 Kernel Configuration
|
||||
#
|
||||
CONFIG_CC_VERSION_TEXT="clang version 22.1.8"
|
||||
CONFIG_GCC_VERSION=0
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#define LINUX_VERSION_CODE 397866
|
||||
#define LINUX_VERSION_CODE 397868
|
||||
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + ((c) > 255 ? 255 : (c)))
|
||||
#define LINUX_VERSION_MAJOR 6
|
||||
#define LINUX_VERSION_PATCHLEVEL 18
|
||||
#define LINUX_VERSION_SUBLEVEL 42
|
||||
#define LINUX_VERSION_SUBLEVEL 44
|
||||
|
||||
@@ -22,7 +22,7 @@ package kmod {
|
||||
};
|
||||
|
||||
// makes assumptions about the running kernel
|
||||
skipTest = true;
|
||||
test = false;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -18,8 +18,8 @@ package libaio {
|
||||
env = [ "PATH=/system/sbin" ];
|
||||
bin = [ "bash" ];
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
skipConfigure = true;
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
preCheck = "rm harness/cases/20.t; "+ // flaky
|
||||
"CFLAGS='"+
|
||||
"-Wno-unknown-warning-option "+
|
||||
|
||||
@@ -16,9 +16,9 @@ package libbpf {
|
||||
chmod = true;
|
||||
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
skipConfigure = true;
|
||||
skipCheck = true;
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
check = nil;
|
||||
install = "make DESTDIR=/work LIBSUBDIR=lib install";
|
||||
};
|
||||
|
||||
|
||||
@@ -23,18 +23,10 @@ package libcap {
|
||||
|
||||
bin = [ "bash" ];
|
||||
exec = make {
|
||||
skipConfigure = true;
|
||||
inPlace = true;
|
||||
|
||||
make = [
|
||||
"CC=cc",
|
||||
"all",
|
||||
];
|
||||
|
||||
check = [
|
||||
"CC=cc",
|
||||
"test",
|
||||
];
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
make = [ "CC=cc", "all" ];
|
||||
check = [ "CC=cc", "test" ];
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -3,7 +3,7 @@ package libexpat {
|
||||
website = "https://libexpat.github.io";
|
||||
anitya = 770;
|
||||
|
||||
version# = "2.8.2";
|
||||
version# = "2.8.3";
|
||||
source = remoteGitHubRelease {
|
||||
suffix = "libexpat/libexpat";
|
||||
tag = "R_"+replace {
|
||||
@@ -12,7 +12,7 @@ package libexpat {
|
||||
new = "_";
|
||||
};
|
||||
name = "expat-"+version+".tar.bz2";
|
||||
checksum = "98Pdyj5QtO7QRtNFXTWsCNCixQDx701ZGql2B-JIrTDkw49J5WXXUwnS4AdMlM4L";
|
||||
checksum = "prHQc14YY3Gp6BfflneNcVyRXM-AxFCqiigxrGL9TT1sGhVODvI_9JNR2xnZlZSj";
|
||||
compress = bzip2;
|
||||
};
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ package libpsl {
|
||||
website = "https://rockdaboot.github.io/libpsl";
|
||||
anitya = 7305;
|
||||
|
||||
version# = "0.23.1";
|
||||
version# = "0.23.2";
|
||||
source = remoteGitHubRelease {
|
||||
suffix = "rockdaboot/libpsl";
|
||||
tag = version;
|
||||
name = "libpsl-"+version+".tar.gz";
|
||||
checksum = "9wu0JxiNGfY3TuYeCmOq9Xm3faPHole5is_3ZL2KUCh8FyaYwpl7a85SNsz8FmPz";
|
||||
checksum = "-XIKaQK0QoyzXpwezyvGzDdIBCUTqPyd8jU6axIusrnma-qsYxhLUO1Oycwcelr2";
|
||||
compress = gzip;
|
||||
};
|
||||
|
||||
@@ -22,7 +22,7 @@ test_disable 'int main(){return 0;}' tests/test-is-public-builtin.c
|
||||
exec = make {};
|
||||
|
||||
inputs = [
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
python,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ package libtirpc {
|
||||
exec = make {
|
||||
generate = "sh -e ./bootstrap";
|
||||
configure = {
|
||||
"CFLAGS": `"$(pkg-config --cflags libbsd-overlay) ${CFLAGS:-}"`;
|
||||
"CFLAGS": `"$(pkgconf --cflags libbsd-overlay) ${CFLAGS:-}"`;
|
||||
"disable-gssapi";
|
||||
};
|
||||
};
|
||||
@@ -28,7 +28,7 @@ package libtirpc {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
libbsd,
|
||||
kernel-headers,
|
||||
|
||||
@@ -16,13 +16,11 @@ package libucontext {
|
||||
enterSource = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
skipConfigure = true;
|
||||
inPlace = true;
|
||||
defaults = false;
|
||||
chdir = false;
|
||||
|
||||
make = [
|
||||
"ARCH=" + linuxArch,
|
||||
];
|
||||
configure = nil;
|
||||
make = [ "ARCH=" + linuxArch ];
|
||||
install = "make prefix=/system DESTDIR=/work install";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,14 +15,14 @@ package libxslt {
|
||||
generate = "NOCONFIGURE=1 ./autogen.sh";
|
||||
|
||||
// python libxml2 cyclic dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
python,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
libxml2,
|
||||
];
|
||||
|
||||
@@ -7,7 +7,7 @@ package lit {
|
||||
exec = pip {
|
||||
append = [ "llvm", "utils", "lit" ];
|
||||
// already checked during llvm
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ python-setuptools ];
|
||||
|
||||
@@ -56,7 +56,7 @@ message(NOTICE "${LLVM_VERSION_MAJOR}")
|
||||
"COMPILER_RT_BUILD_PROFILE": "OFF";
|
||||
"COMPILER_RT_BUILD_XRAY": "OFF";
|
||||
};
|
||||
skipTest = true;
|
||||
test = nil;
|
||||
postInstall = `
|
||||
mkdir -p "/work/system/lib/clang/$LLVM_VERSION_MAJOR/lib/"
|
||||
ln -s \
|
||||
@@ -119,7 +119,7 @@ package early-runtimes {
|
||||
"LLVM_ENABLE_ZSTD": "FORCE_ON";
|
||||
"LLVM_ENABLE_LIBXML2": "OFF";
|
||||
};
|
||||
skipTest = true;
|
||||
test = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -17,20 +17,10 @@ package lm_sensors {
|
||||
bin = [ "perl" ];
|
||||
populateUsrBin = true;
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
skipConfigure = true;
|
||||
|
||||
make = [
|
||||
"CC=cc",
|
||||
"ETCDIR=/system/etc",
|
||||
"PREFIX=/system",
|
||||
];
|
||||
|
||||
check = [
|
||||
"CC=cc",
|
||||
"check",
|
||||
];
|
||||
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
make = [ "CC=cc", "ETCDIR=/system/etc", "PREFIX=/system" ];
|
||||
check = [ "CC=cc", "check" ];
|
||||
install = "make DESTDIR=/work PREFIX=/system install";
|
||||
};
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ package lua {
|
||||
chmod = true;
|
||||
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
skipConfigure = true;
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
make = [ "CC='clang -fPIC'", "all" ];
|
||||
check = [ "test" ];
|
||||
install = `
|
||||
|
||||
@@ -16,11 +16,11 @@ package lvm2 {
|
||||
|
||||
exec = make {
|
||||
// requires root
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
libaio,
|
||||
kernel-headers,
|
||||
|
||||
@@ -3,11 +3,11 @@ package meson {
|
||||
website = "https://mesonbuild.com";
|
||||
anitya = 6472;
|
||||
|
||||
version# = "1.11.2";
|
||||
version# = "1.12.0";
|
||||
source = remoteGitHub {
|
||||
suffix = "mesonbuild/meson";
|
||||
tag = version;
|
||||
checksum = "9AMilGxTOVqPA2DaGMASyuVs1BeTzgDZ0NH2oSYoRZk846ApvfOBa4cc18XEEK7M";
|
||||
checksum = "K0hm0h26_6e3-1poYZKwj18IB6bdAtYE-whpROtTCSpVN5GllwSwbXC2xPYcSFAJ";
|
||||
};
|
||||
patches = [
|
||||
"respect-colour.patch",
|
||||
|
||||
@@ -21,6 +21,6 @@ package musl-fts {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -21,6 +21,6 @@ package musl-obstack {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -23,14 +23,9 @@ package musl-headers {
|
||||
];
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
skipCheck = true;
|
||||
|
||||
make = [
|
||||
"DESTDIR=/work",
|
||||
"install-headers",
|
||||
];
|
||||
|
||||
defaults = false;
|
||||
make = [ "DESTDIR=/work", "install-headers" ];
|
||||
check = nil;
|
||||
install = "# headers installed during make";
|
||||
};
|
||||
|
||||
@@ -53,9 +48,8 @@ package musl {
|
||||
];
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
skipCheck = true;
|
||||
|
||||
defaults = false;
|
||||
check = nil;
|
||||
postInstall = `
|
||||
mkdir -p /work/system/bin
|
||||
COMPAT_LINKER_NAME="ld-musl-` + linuxArch + `.so.1"
|
||||
|
||||
@@ -19,7 +19,7 @@ package ncurses {
|
||||
};
|
||||
|
||||
// "tests" are actual demo programs, not a test suite.
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
|
||||
postInstall = `
|
||||
find /work/system/lib \
|
||||
|
||||
@@ -50,7 +50,7 @@ package libnftnl {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
libmnl,
|
||||
kernel-headers,
|
||||
@@ -95,7 +95,7 @@ chmod +w /etc/ && ln -s ../usr/src/iptables/etc/ethertypes /etc/
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
bash,
|
||||
python,
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ package noto {
|
||||
|
||||
enterSource = true;
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
install = `
|
||||
DEST=/work/system/share/fonts/noto
|
||||
for font in $(ls -d fonts/*/); do
|
||||
|
||||
@@ -38,10 +38,9 @@ package nss {
|
||||
early = "\nln -s extra/nspr/nspr /usr/src/nspr\nchmod +w ../nspr/\n";
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
skipConfigure = true;
|
||||
inPlace = true;
|
||||
|
||||
defaults = false;
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
make = [
|
||||
"CCC=clang++",
|
||||
"NSDISTMODE=copy",
|
||||
@@ -49,7 +48,7 @@ package nss {
|
||||
"USE_64=1",
|
||||
"nss_build_all",
|
||||
];
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
install = `
|
||||
cp -r \
|
||||
/usr/src/dist/. \
|
||||
@@ -80,7 +79,7 @@ package nss-cacert {
|
||||
|
||||
enterSource = true;
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `
|
||||
mkdir -p /work/system/etc/ssl/{certs/unbundled,certs/hashed,trust-source}
|
||||
buildcatrust \
|
||||
|
||||
@@ -21,7 +21,7 @@ package openssl {
|
||||
];
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
|
||||
configureName = "/usr/src/openssl/Configure";
|
||||
configure = {
|
||||
|
||||
@@ -18,7 +18,7 @@ package pango {
|
||||
"cairo": "enabled";
|
||||
};
|
||||
// Fontconfig error: Cannot load default config file: File not found: /etc/fonts/fonts.conf
|
||||
skipTest = true;
|
||||
test = false;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -28,8 +28,8 @@ disable_test ext/POSIX/t/time.t
|
||||
|
||||
toyboxEarly = true;
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
inPlace = true;
|
||||
defaults = false;
|
||||
chdir = false;
|
||||
|
||||
configureName = "./Configure";
|
||||
configure = {
|
||||
@@ -70,7 +70,7 @@ package perl-Module-Build {
|
||||
chmod = true;
|
||||
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `
|
||||
perl Build.PL --prefix=/system
|
||||
./Build build`;
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package pkgconf {
|
||||
description = "package compiler and linker metadata toolkit";
|
||||
website = "https://github.com/pkgconf/pkgconf";
|
||||
anitya = 12753;
|
||||
|
||||
version# = "3.0.5";
|
||||
source = remoteGitHub {
|
||||
suffix = "pkgconf/pkgconf";
|
||||
tag = "pkgconf-"+version;
|
||||
checksum = "ZWak6fggXCzZkROSnSrl9twRRV9OJA7Q4DamFKEm094e2vgf_99gCxkmrZP3VFYH";
|
||||
};
|
||||
|
||||
exec = meson {
|
||||
postInstall = "ln -s pkgconf /work/system/bin/pkg-config";
|
||||
};
|
||||
}
|
||||
@@ -24,6 +24,6 @@ package procps {
|
||||
libtool,
|
||||
|
||||
gzip,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,6 +3,9 @@ package python {
|
||||
website = "https://www.python.org";
|
||||
anitya = 13254;
|
||||
|
||||
// too many inputs; early variant available
|
||||
bootstrap = false;
|
||||
|
||||
version# = "3.14.7";
|
||||
source = remoteTar {
|
||||
url = "https://www.python.org/ftp/python/"+version+
|
||||
@@ -159,7 +162,7 @@ package python-setuptools {
|
||||
// error: invalid command 'dist_info'
|
||||
buildIsolation = true;
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
runtime = [ python ];
|
||||
@@ -209,7 +212,7 @@ package python-vcs-versioning {
|
||||
// upstream is monorepo of two packages (setuptools-scm)
|
||||
append = [ "vcs-versioning" ];
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
@@ -243,7 +246,7 @@ package python-setuptools-scm {
|
||||
// upstream is monorepo of two packages
|
||||
append = [ "setuptools-scm" ];
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
@@ -273,7 +276,7 @@ package python-flit-core {
|
||||
// upstream has other unused packages with many dependencies
|
||||
append = [ "flit_core" ];
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
runtime = [ python ];
|
||||
@@ -293,7 +296,7 @@ package python-packaging {
|
||||
|
||||
exec = pip {
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ python-flit-core ];
|
||||
@@ -314,7 +317,7 @@ package python-pathspec {
|
||||
|
||||
exec = pip {
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ python-flit-core ];
|
||||
@@ -335,7 +338,7 @@ package python-trove-classifiers {
|
||||
|
||||
exec = pip {
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ python-setuptools ];
|
||||
@@ -360,30 +363,68 @@ package python-pluggy {
|
||||
|
||||
exec = pip {
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ python-setuptools-scm ];
|
||||
runtime = [ python ];
|
||||
}
|
||||
|
||||
package python-poetry-core {
|
||||
description = "poetry PEP 517 Build Backend & Core Utilities";
|
||||
website = "https://github.com/python-poetry/poetry-core";
|
||||
anitya = 71155;
|
||||
|
||||
version# = "2.4.1";
|
||||
source = remoteGitHub {
|
||||
suffix = "python-poetry/poetry-core";
|
||||
tag = version;
|
||||
checksum = "tf9OeSUv9TJwKd48fQIU2uGtZ36GN-PDmPDZzjClozzLjv-rQ5nIbOg9gOXpegiH";
|
||||
};
|
||||
|
||||
exec = pip {
|
||||
// pytest circular dependency
|
||||
check = nil;
|
||||
};
|
||||
}
|
||||
|
||||
package python-tomlkit {
|
||||
description = "style-preserving TOML library for Python";
|
||||
website = "https://github.com/python-poetry/tomlkit";
|
||||
anitya = 19609;
|
||||
|
||||
version# = "0.15.1";
|
||||
source = remoteGitHub {
|
||||
suffix = "python-poetry/tomlkit";
|
||||
tag = version;
|
||||
checksum = "6n8h0Yf-OO0ARildxqyB1mB1EhS7uALtqFJqD7t7G1JSFTTb9RGRWSpCg-vamuu8";
|
||||
};
|
||||
|
||||
exec = pip {
|
||||
// pytest circular dependency
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ python-poetry-core ];
|
||||
}
|
||||
|
||||
package python-hatchling {
|
||||
description = "the extensible, standards compliant build backend used by Hatch";
|
||||
website = "https://hatch.pypa.io";
|
||||
anitya = 16137;
|
||||
|
||||
version# = "1.17.1";
|
||||
version# = "1.18.0";
|
||||
source = remoteGitHub {
|
||||
suffix = "pypa/hatch";
|
||||
tag = "hatch-v"+version;
|
||||
checksum = "FK9PkGIkL3wyVFHOKrx9lSRqoevuQ_TFrN-pMqsoFKsh5eim4pfzx7MvL3ioif9o";
|
||||
checksum = "a_ntndxBlMdqSVW3PkiAY42m-NDgyWJcKLWFIVTB_5PciVeJdYYdbcdF6jsd0U96";
|
||||
};
|
||||
|
||||
exec = pip {
|
||||
// upstream has other unused packages with many dependencies
|
||||
append = [ "backend" ];
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
@@ -391,6 +432,7 @@ package python-hatchling {
|
||||
python-pathspec,
|
||||
python-trove-classifiers,
|
||||
python-pluggy,
|
||||
python-tomlkit,
|
||||
];
|
||||
|
||||
runtime = [
|
||||
@@ -398,6 +440,7 @@ package python-hatchling {
|
||||
python-pathspec,
|
||||
python-trove-classifiers,
|
||||
python-pluggy,
|
||||
python-tomlkit,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -415,7 +458,7 @@ package python-pygments {
|
||||
|
||||
exec = pip {
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ python-hatchling ];
|
||||
@@ -440,7 +483,7 @@ package python-iniconfig {
|
||||
|
||||
exec = pip {
|
||||
// pytest circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ python-setuptools-scm ];
|
||||
@@ -465,7 +508,7 @@ package python-pytest {
|
||||
|
||||
exec = pip {
|
||||
// many dependencies
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -65,7 +65,7 @@ EOF
|
||||
python-setuptools,
|
||||
python-wheel,
|
||||
ninja,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
diffutils,
|
||||
|
||||
openssl,
|
||||
|
||||
@@ -15,7 +15,8 @@ package rsync {
|
||||
toyboxEarly = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
defaults = false;
|
||||
|
||||
configure = {
|
||||
"disable-openssl";
|
||||
"disable-xxhash";
|
||||
@@ -24,6 +25,6 @@ package rsync {
|
||||
};
|
||||
|
||||
// circular dependency
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ package spirv-headers {
|
||||
|
||||
exec = cmake {
|
||||
// upstream has no tests
|
||||
skipTest = true;
|
||||
test = nil;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -28,10 +28,9 @@ package squashfs-tools {
|
||||
early = "cd squashfs-tools";
|
||||
|
||||
exec = make {
|
||||
skipConfigure = true;
|
||||
inPlace = true;
|
||||
|
||||
skipCheck = true;
|
||||
chdir = false;
|
||||
configure = nil;
|
||||
check = nil;
|
||||
install = "make INSTALL_PREFIX=/work/system install";
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package tamago {
|
||||
enterSource = true;
|
||||
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `
|
||||
mkdir /work/system/
|
||||
cp -r . /work/system/tamago
|
||||
|
||||
@@ -22,10 +22,10 @@ package toybox {
|
||||
toyboxEarly = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
inPlace = true;
|
||||
skipConfigure = true;
|
||||
defaults = false;
|
||||
chdir = false;
|
||||
|
||||
configure = nil;
|
||||
preMake = `
|
||||
LDFLAGS="${LDFLAGS:-''} -static"
|
||||
|
||||
@@ -50,7 +50,7 @@ sed -i \
|
||||
"USER=cure",
|
||||
"tests",
|
||||
];
|
||||
skipEarlyStageCheck = true;
|
||||
checkEarly = false;
|
||||
|
||||
install = "PREFIX=/work/system/bin make install_flat";
|
||||
|
||||
@@ -80,10 +80,10 @@ package toybox-early {
|
||||
toyboxEarly = true;
|
||||
|
||||
exec = make {
|
||||
omitDefaults = true;
|
||||
inPlace = true;
|
||||
skipConfigure = true;
|
||||
defaults = false;
|
||||
chdir = false;
|
||||
|
||||
configure = nil;
|
||||
preMake = `
|
||||
LDFLAGS="${LDFLAGS:-''} -static"
|
||||
|
||||
@@ -115,7 +115,7 @@ CONFIG_DIFF=y
|
||||
"USER=cure",
|
||||
"tests",
|
||||
];
|
||||
skipEarlyStageCheck = true;
|
||||
checkEarly = false;
|
||||
|
||||
install = "PREFIX=/work/system/bin make install_flat";
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ package unzip {
|
||||
chmod = true;
|
||||
|
||||
exec = generic {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
build = `unix/configure
|
||||
make -f unix/Makefile generic1`;
|
||||
install = `
|
||||
|
||||
@@ -47,7 +47,7 @@ package util-linux {
|
||||
// check script claims:
|
||||
// For development purpose only.
|
||||
// Don't execute on production system!
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [
|
||||
|
||||
@@ -17,14 +17,14 @@ package vim {
|
||||
enterSource = true;
|
||||
|
||||
exec = make {
|
||||
inPlace = true;
|
||||
chdir = false;
|
||||
configure = {
|
||||
"with-tlib": "ncursesw";
|
||||
};
|
||||
check = [ "test" ];
|
||||
|
||||
// very expensive
|
||||
skipCheck = true;
|
||||
check = nil;
|
||||
};
|
||||
|
||||
inputs = [ ncurses ];
|
||||
|
||||
+20
-20
@@ -34,7 +34,7 @@ package libxtrans {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
];
|
||||
@@ -59,7 +59,7 @@ package xorgproto {
|
||||
|
||||
inputs = [
|
||||
automake,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
];
|
||||
@@ -121,7 +121,7 @@ package xcb {
|
||||
|
||||
inputs = [
|
||||
python,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
xcb-proto,
|
||||
libXau,
|
||||
@@ -148,7 +148,7 @@ package libxcb-keysyms {
|
||||
exec = make {};
|
||||
|
||||
inputs = [
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
xcb,
|
||||
];
|
||||
@@ -172,7 +172,7 @@ package libxcb-wm {
|
||||
|
||||
inputs = [
|
||||
m4,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
xcb,
|
||||
];
|
||||
@@ -196,7 +196,7 @@ package libxcb-util {
|
||||
exec = make {};
|
||||
|
||||
inputs = [
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
xcb,
|
||||
@@ -220,7 +220,7 @@ package libxcb-image {
|
||||
exec = make {};
|
||||
|
||||
inputs = [
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
libxcb-util,
|
||||
];
|
||||
@@ -244,7 +244,7 @@ package libxcb-render-util {
|
||||
exec = make {};
|
||||
|
||||
inputs = [
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
xcb,
|
||||
@@ -278,7 +278,7 @@ package libX11 {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
libxtrans,
|
||||
@@ -309,7 +309,7 @@ package libXext {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
libX11,
|
||||
@@ -338,7 +338,7 @@ package libXfixes {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
xorgproto,
|
||||
@@ -368,7 +368,7 @@ package libXrender {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
libX11,
|
||||
@@ -397,7 +397,7 @@ package libxshmfence {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
xorgproto,
|
||||
@@ -424,7 +424,7 @@ package libXxf86vm {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
libXext,
|
||||
@@ -454,7 +454,7 @@ package libXrandr {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
libXext,
|
||||
@@ -488,7 +488,7 @@ package font-util {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
];
|
||||
@@ -514,7 +514,7 @@ package libfontenc {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
font-util,
|
||||
@@ -561,7 +561,7 @@ package xkbcomp {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
byacc,
|
||||
|
||||
util-macros,
|
||||
@@ -591,7 +591,7 @@ package libXfont2 {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
freetype,
|
||||
@@ -642,7 +642,7 @@ package libXdmcp {
|
||||
inputs = [
|
||||
automake,
|
||||
libtool,
|
||||
pkg-config,
|
||||
pkgconf,
|
||||
|
||||
util-macros,
|
||||
xorgproto,
|
||||
|
||||
@@ -320,6 +320,8 @@ type PackageAttr struct {
|
||||
// Whether to replace /usr/bin/ with a symlink to /bin/.
|
||||
PopulateUsrBin bool
|
||||
|
||||
// Whether this package is disallowed from bootstrap stages.
|
||||
Std bool
|
||||
// Hint for an early variant of toybox to be used when available.
|
||||
Early bool
|
||||
// Whether to omit output colour environment variables.
|
||||
@@ -375,6 +377,14 @@ func (t Toolchain) Append(a []pkg.Artifact, handles ...ArtifactH) []pkg.Artifact
|
||||
return a
|
||||
}
|
||||
|
||||
// A BootstrapError describes a package disallowed from bootstrap stages.
|
||||
type BootstrapError string
|
||||
|
||||
func (e BootstrapError) Error() string {
|
||||
return "package " + strconv.Quote(string(e)) +
|
||||
" must not be built by bootstrap stages"
|
||||
}
|
||||
|
||||
// New constructs a [pkg.Artifact] via a build system helper.
|
||||
func (t Toolchain) New(
|
||||
name, version string,
|
||||
@@ -387,6 +397,10 @@ func (t Toolchain) New(
|
||||
attr = new(PackageAttr)
|
||||
}
|
||||
|
||||
if attr.Std && !t.stage.isStd() {
|
||||
panic(BootstrapError(name))
|
||||
}
|
||||
|
||||
if name == "" || version == "" {
|
||||
panic("name must be non-empty")
|
||||
}
|
||||
|
||||
+46
-12
@@ -811,14 +811,17 @@ func (s *S) getFrame() azalea.Frame {
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
var attr GenericHelper
|
||||
chdir := true
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("inPlace"): &attr.InPlace,
|
||||
k("chdir"): &chdir,
|
||||
k("build"): &attr.Build,
|
||||
k("check"): &attr.Check,
|
||||
k("install"): &attr.Install,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
attr.InPlace = !chdir
|
||||
|
||||
v = &attr
|
||||
set = true
|
||||
return
|
||||
@@ -828,28 +831,33 @@ func (s *S) getFrame() azalea.Frame {
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
var attr MakeHelper
|
||||
defaults, chdir, checkEarly := true, true, true
|
||||
attr.Configure, attr.Check = []KV{}, []string{}
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("omitDefaults"): &attr.OmitDefaults,
|
||||
k("defaults"): &defaults,
|
||||
k("generate"): &attr.Generate,
|
||||
k("preMake"): &attr.ScriptMakeEarly,
|
||||
k("preCheck"): &attr.ScriptCheckEarly,
|
||||
k("postInstall"): &attr.Script,
|
||||
k("inPlace"): &attr.InPlace,
|
||||
k("skipConfigure"): &attr.SkipConfigure,
|
||||
k("chdir"): &chdir,
|
||||
k("configureName"): &attr.ConfigureName,
|
||||
k("forceAutoconf"): &attr.ForceAutoconf,
|
||||
k("configure"): &attr.Configure,
|
||||
k("host"): &attr.Host,
|
||||
k("build"): &attr.Build,
|
||||
k("make"): &attr.Make,
|
||||
k("skipCheck"): &attr.SkipCheck,
|
||||
k("check"): &attr.Check,
|
||||
k("install"): &attr.Install,
|
||||
|
||||
k("skipEarlyStageCheck"): &attr.SkipCheckEarly,
|
||||
k("checkEarly"): &checkEarly,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
attr.OmitDefaults, attr.InPlace = !defaults, !chdir
|
||||
attr.SkipConfigure = attr.Configure == nil
|
||||
attr.SkipCheck = attr.Check == nil
|
||||
attr.SkipCheckEarly = !checkEarly
|
||||
|
||||
v = &attr
|
||||
set = true
|
||||
return
|
||||
@@ -859,17 +867,20 @@ func (s *S) getFrame() azalea.Frame {
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
var attr CMakeHelper
|
||||
var test azalea.AString
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("append"): &attr.Append,
|
||||
k("buildType"): &attr.BuildType,
|
||||
k("cache"): &attr.Cache,
|
||||
k("postInstall"): &attr.Script,
|
||||
k("test"): &attr.Test,
|
||||
k("skipTest"): &attr.SkipTest,
|
||||
k("test"): &test,
|
||||
k("make"): &attr.Make,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
attr.Test = test.V
|
||||
attr.SkipTest = test.Nil
|
||||
|
||||
v = &attr
|
||||
set = true
|
||||
return
|
||||
@@ -879,18 +890,21 @@ func (s *S) getFrame() azalea.Frame {
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
var attr MesonHelper
|
||||
test := true
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("muon"): &attr.Muon,
|
||||
k("preCompile"): &attr.ScriptCompileEarly,
|
||||
k("postCompile"): &attr.ScriptCompiled,
|
||||
k("postInstall"): &attr.Script,
|
||||
k("setup"): &attr.Setup,
|
||||
k("skipTest"): &attr.SkipTest,
|
||||
k("test"): &test,
|
||||
k("skipTests"): &attr.SkipTests,
|
||||
k("interactiveTest"): &attr.InteractiveTest,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
attr.SkipTest = !test
|
||||
|
||||
v = &attr
|
||||
set = true
|
||||
return
|
||||
@@ -900,11 +914,13 @@ func (s *S) getFrame() azalea.Frame {
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
var attr MakeMakerHelper
|
||||
doCheck := true
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("skipCheck"): &attr.SkipCheck,
|
||||
k("check"): &doCheck,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
attr.SkipCheck = !doCheck
|
||||
v = &attr
|
||||
set = true
|
||||
return
|
||||
@@ -914,17 +930,20 @@ func (s *S) getFrame() azalea.Frame {
|
||||
args azalea.FArgs,
|
||||
) (v any, set bool, err error) {
|
||||
var attr PipHelper
|
||||
var scriptCheck azalea.AString
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("append"): &attr.Append,
|
||||
k("buildIsolation"): &attr.BuildIsolation,
|
||||
k("enterSource"): &attr.EnterSource,
|
||||
k("install"): &attr.Install,
|
||||
k("skipCheck"): &attr.SkipCheck,
|
||||
k("check"): &attr.Check,
|
||||
k("check"): &scriptCheck,
|
||||
k("postInstall"): &attr.Script,
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
attr.Check = scriptCheck.V
|
||||
attr.SkipCheck = scriptCheck.Nil
|
||||
|
||||
v = &attr
|
||||
set = true
|
||||
return
|
||||
@@ -975,6 +994,13 @@ type evalContext struct {
|
||||
t Toolchain
|
||||
}
|
||||
|
||||
// HelperError describes a package with nil helper.
|
||||
type HelperError string
|
||||
|
||||
func (e HelperError) Error() string {
|
||||
return "package " + strconv.Quote(string(e)) + " has no exec helper"
|
||||
}
|
||||
|
||||
// pf implements [azalea.PF].
|
||||
func (ctx *evalContext) pf(
|
||||
name azalea.Ident,
|
||||
@@ -998,6 +1024,8 @@ func (ctx *evalContext) pf(
|
||||
overlay string
|
||||
|
||||
inputs, runtimes, extra azalea.Array
|
||||
|
||||
bootstrap = true
|
||||
)
|
||||
if err = args.Apply(map[unique.Handle[azalea.Ident]]any{
|
||||
k("description"): &meta.Description,
|
||||
@@ -1020,6 +1048,7 @@ func (ctx *evalContext) pf(
|
||||
k("exclusive"): &attr.Exclusive,
|
||||
k("toyboxEarly"): &attr.Early,
|
||||
k("minimal"): &attr.NoToolchain,
|
||||
k("bootstrap"): &bootstrap,
|
||||
|
||||
k("checksum"): &kc,
|
||||
k("output"): &output,
|
||||
@@ -1032,6 +1061,7 @@ func (ctx *evalContext) pf(
|
||||
}); err != nil {
|
||||
return
|
||||
}
|
||||
attr.Std = !bootstrap
|
||||
var inputsH, extraH P
|
||||
if inputsH, err = toHandles(inputs); err != nil {
|
||||
return
|
||||
@@ -1149,6 +1179,10 @@ func (ctx *evalContext) pf(
|
||||
}
|
||||
}
|
||||
|
||||
if helper == nil {
|
||||
panic(HelperError(name))
|
||||
}
|
||||
|
||||
v = cachedArtifact{&meta, ctx.t.New(
|
||||
meta.Name,
|
||||
meta.Version,
|
||||
|
||||
Reference in New Issue
Block a user