This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

port sqlite3 (#69)

Co-authored-by: Thomas Stokes <git@tombl.dev>

author
Seb
co-author
Thomas Stokes
committer
GitHub
date (Nov 9, 2025, 8:30 PM +0800) commit 989deb92 parent 04fd81cc
+70 -2
+5 -1
.github/workflows/ci.yml
··· 1 1 on: 2 - - push 2 + push: 3 + branches: 4 + - main 5 + pull_request: 3 6 4 7 jobs: 5 8 list: ··· 49 52 50 53 deploy: 51 54 needs: build 55 + if: github.event.pull_request.head.repo.full_name == 'tombl/distro' 52 56 runs-on: ubuntu-24.04 53 57 steps: 54 58 - uses: actions/checkout@v5
+13 -1
packages/linux/package.nix
··· 57 57 command make -j$NIX_BUILD_CORES HOSTCC=${clang-host}/bin/clang TSC=true "$@" 58 58 } 59 59 60 - test -f .config || make defconfig ${lib.optionalString config.debug "debug.config"} 60 + config() { 61 + sed -i "/CONFIG_$1=/d" .config 62 + sed -i "/CONFIG_$1 is not set/d" .config 63 + case $2 in 64 + y|n) echo "CONFIG_$1=$2" >> .config ;; 65 + *) echo "CONFIG_$1=\"$2\"" >> .config ;; 66 + esac 67 + } 68 + 69 + if ! [ -f .config ]; then 70 + make defconfig ${lib.optionalString config.debug "debug.config"} 71 + config FILE_LOCKING y 72 + fi 61 73 62 74 # this is a horrible dirty hack but there's some non-deterministic build failure 63 75 for i in $(seq 1 3); do
+52
packages/sqlite3/package.nix
··· 1 + { 2 + fetch, 3 + run, 4 + lib, 5 + config, 6 + clang, 7 + sysroot, 8 + gnumake, 9 + lld, 10 + llvm, 11 + clang-host, 12 + }: 13 + 14 + let 15 + archiveVersion = 16 + version: 17 + let 18 + fragments = lib.splitVersion version; 19 + major = lib.head fragments; 20 + minor = lib.concatMapStrings (lib.fixedWidthNumber 2) (lib.tail fragments); 21 + in 22 + major + minor + "00"; 23 + in 24 + 25 + run 26 + rec { 27 + name = "sqlite3"; 28 + version = "3.51.0"; 29 + 30 + src = fetch.tar { 31 + url = "https://sqlite.org/2025/sqlite-autoconf-${archiveVersion version}.tar.gz"; 32 + hash = "sha256-QuJt/dlqouaxsb5ciLCIf5lZCT9lDWk8sC65w20UbKU="; 33 + }; 34 + 35 + path = [ 36 + clang 37 + gnumake 38 + lld 39 + llvm 40 + ]; 41 + } 42 + '' 43 + export CC_FOR_BUILD=${clang-host}/bin/clang 44 + export CC=${clang}/bin/clang 45 + export CFLAGS="--target=wasm32-unknown-linux-musl --sysroot=${sysroot} ${lib.optionalString config.debug "-g"} -matomics -mbulk-memory -DSQLITE_OMIT_WAL=1 -DSQLITE_MAX_MMAP_SIZE=0" 46 + export LD=wasm-ld 47 + export LDFLAGS="--target=wasm32-unknown-linux-musl --sysroot=${sysroot} -fuse-ld=lld" 48 + export AR=llvm-ar 49 + 50 + ./configure --host=wasm32-unknown-linux-musl --prefix=$out 51 + make -j$NIX_BUILD_CORES install 52 + ''