From 690d5601de297a3034cc808b8abe5eb5f910f436 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 18 May 2026 21:16:48 +0900 Subject: [PATCH] README: add example usage --- README.md | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/README.md b/README.md index 7cb4be4..25c146c 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,95 @@ Customizations include things such as: - Toggling compile-time features. - Adding external plugins, either baking them in statically or using dynamic linking. - Cross-compiling for various architectures. + +### Example usage + +```nix +{ + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + inputs.nix-sqlite = "git+https://git.pvv.ntnu.no/mugiten/nix-custom-sqlite.git?ref=main"; + inputs.nix-sqlite.inputs.nixpkgs.follows = "nixpkgs"; + + outputs = { self, nixpkgs, nix-sqlite }: { + devshells.x86_64-linux.default = let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + customSqlite = nix-sqlite.mkSqlite { + # This lets you specify which `pkgs` instance to build from + pkgs = pkgs; + + # This is particularly useful if you want to build a cross-compiled sqlite: + # pkgs = import nixpkgs { + # allowUnfree = true; + # localSystem = "x86_64-linux"; + # crossSystem = lib.systems.examples.aarch64-android-prebuilt; + # }; + + # By default, we toggle on a bunch of `ENABLE_