From 7f764c02b93d28408647ab2a38938dffe1c51432 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Sun, 14 Dec 2025 05:35:44 +0000 Subject: [PATCH] nix: fix up builds it seems latest nixpkgs broke sqlite-lib builds. the static pkg set does not provide ranlib or ar anymore. Signed-off-by: oppiliappan --- flake.nix | 1 - nix/pkgs/sqlite-lib.nix | 12 +++++++----- 2 file(s) changed, 7 insertion(s)(+), 6 deletion(s)(-) diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -80,7 +80,6 @@ }).buildGoApplication; modules = ./nix/gomod2nix.toml; sqlite-lib = self.callPackage ./nix/pkgs/sqlite-lib.nix { - inherit (pkgs) gcc; inherit sqlite-lib-src; }; lexgen = self.callPackage ./nix/pkgs/lexgen.nix {inherit indigo;}; diff --git a/nix/pkgs/sqlite-lib.nix b/nix/pkgs/sqlite-lib.nix --- a/nix/pkgs/sqlite-lib.nix +++ b/nix/pkgs/sqlite-lib.nix @@ -1,16 +1,18 @@ { - gcc, stdenv, sqlite-lib-src, }: stdenv.mkDerivation { name = "sqlite-lib"; src = sqlite-lib-src; - nativeBuildInputs = [gcc]; + buildPhase = '' - gcc -c sqlite3.c - ar rcs libsqlite3.a sqlite3.o - ranlib libsqlite3.a + $CC -c sqlite3.c + $AR rcs libsqlite3.a sqlite3.o + $RANLIB libsqlite3.a + ''; + + installPhase = '' mkdir -p $out/include $out/lib cp *.h $out/include cp libsqlite3.a $out/lib -- tangled.sh