[25.11] sqlpage: 0.39.0 -> 0.44.1 (#533879)

This commit is contained in:
Thomas Gerbet
2026-06-21 15:50:04 +00:00
committed by GitHub
3 changed files with 146 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
{
lib,
rustPlatform,
rustPackages_1_95,
fetchFromGitHub,
pkg-config,
sqlite,
@@ -10,70 +10,74 @@
}:
let
apexcharts = fetchurl {
url = "https://cdn.jsdelivr.net/npm/apexcharts@5.3.0/dist/apexcharts.min.js";
hash = "sha256-OtfH8igG4/XVMWV1155dCl8kGhruowISVUm7ZZF0VwU=";
apexcharts = {
url = "https://cdn.jsdelivr.net/npm/apexcharts@5.13.0/dist/apexcharts.min.js";
hash = "sha256-DgRUn+X1cxT0z5O+QcrX48NuVrY1KhoCmHPvVZAvS8k=";
};
tablerCss = fetchurl {
tablerCss = {
url = "https://cdn.jsdelivr.net/npm/@tabler/core@1.4.0/dist/css/tabler.min.css";
hash = "sha256-fvdQvRBUamldCxJ2etgEi9jz7F3n2u+xBn+dDao9HJo=";
};
tomSelectCss = fetchurl {
url = "https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/css/tom-select.bootstrap5.css";
tomSelectCss = {
url = "https://cdn.jsdelivr.net/npm/tom-select@2.6.1/dist/css/tom-select.bootstrap5.css";
hash = "sha256-vW5UjM/Ka9/jIY8I5s5KcudaTRWh/cCGE1ZUsrJvlI0=";
};
tablerVendorsCss = fetchurl {
tablerVendorsCss = {
url = "https://cdn.jsdelivr.net/npm/@tabler/core@1.4.0/dist/css/tabler-vendors.min.css";
hash = "sha256-/VPz9GtiH1Es1KGLY706UIayEEgG93B6aIBa3WzwKYc=";
};
tablerJs = fetchurl {
tablerJs = {
url = "https://cdn.jsdelivr.net/npm/@tabler/core@1.4.0/dist/js/tabler.min.js";
hash = "sha256-tgx2Fg6XYkV027jPEKvmrummSTtgCW/fwV3R3SvZnrk=";
};
tablerIcons = fetchurl {
url = "https://cdn.jsdelivr.net/npm/@tabler/icons-sprite@3.34.0/dist/tabler-sprite.svg";
hash = "sha256-pCPkhrx0GnPg5/EthJ7pLdMxb7wbYMJ0R7WchDcffpg=";
tablerIcons = {
url = "https://cdn.jsdelivr.net/npm/@tabler/icons-sprite@3.44.0/dist/tabler-sprite.svg";
hash = "sha256-aHeH8IGC75mepyW2gj/aYrW7LCEtjobwxvGnVp5j3Uc=";
};
tomselect = fetchurl {
url = "https://cdn.jsdelivr.net/npm/tom-select@2.4.1/dist/js/tom-select.popular.min.js";
hash = "sha256-Cb1Xmb9qQO8I1mMVkz4t2bT8l7HX+1JeKncGBSytSHQ=";
tomselect = {
url = "https://cdn.jsdelivr.net/npm/tom-select@2.6.1/dist/js/tom-select.popular.min.js";
hash = "sha256-KmjMBvL4Ni3AYc9OCi9xSEuamESyLEBL4B2gzFrWPGE=";
};
rustPlatform = rustPackages_1_95.rustPlatform;
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "sqlpage";
version = "0.39.0";
version = "0.44.1";
src = fetchFromGitHub {
owner = "lovasoa";
owner = "sqlpage";
repo = "SQLpage";
tag = "v${finalAttrs.version}";
hash = "sha256-M9WtpDc067G/EfRTJBoDxBrdXRMqOwVTdGgyXSdHlhE=";
hash = "sha256-QpengTtKBLJga/LXcN3oPuXDru1zr9Ti/Qpb0tfiEYc=";
};
postPatch = ''
substituteInPlace sqlpage/apexcharts.js \
--replace-fail '/* !include https://cdn.jsdelivr.net/npm/apexcharts@5.3.0/dist/apexcharts.min.js */' \
"$(cat ${apexcharts})"
--replace-fail '/* !include ${apexcharts.url} */' \
"$(cat ${fetchurl apexcharts})"
substituteInPlace sqlpage/sqlpage.css \
--replace-fail '/* !include https://cdn.jsdelivr.net/npm/@tabler/core@1.4.0/dist/css/tabler.min.css */' \
"$(cat ${tablerCss})" \
--replace-fail '/* !include https://cdn.jsdelivr.net/npm/@tabler/core@1.4.0/dist/css/tabler-vendors.min.css */' \
"$(cat ${tablerVendorsCss})" \
--replace-fail '/* !include https://cdn.jsdelivr.net/npm/tom-select@2.4.3/dist/css/tom-select.bootstrap5.css */' \
"$(cat ${tomSelectCss})"
--replace-fail '/* !include ${tablerCss.url} */' \
"$(cat ${fetchurl tablerCss})" \
--replace-fail '/* !include ${tablerVendorsCss.url} */' \
"$(cat ${fetchurl tablerVendorsCss})" \
--replace-fail '/* !include ${tomSelectCss.url} */' \
"$(cat ${fetchurl tomSelectCss})"
substituteInPlace sqlpage/sqlpage.js \
--replace-fail '/* !include https://cdn.jsdelivr.net/npm/@tabler/core@1.4.0/dist/js/tabler.min.js */' \
"$(cat ${tablerJs})"
--replace-fail '/* !include ${tablerJs.url} */' \
"$(cat ${fetchurl tablerJs})"
substituteInPlace sqlpage/tabler-icons.svg \
--replace-fail '/* !include https://cdn.jsdelivr.net/npm/@tabler/icons-sprite@3.34.0/dist/tabler-sprite.svg */' \
"$(cat ${tablerIcons})"
--replace-fail '/* !include ${tablerIcons.url} */' \
"$(cat ${fetchurl tablerIcons})"
substituteInPlace sqlpage/tomselect.js \
--replace-fail '/* !include https://cdn.jsdelivr.net/npm/tom-select@2.4.1/dist/js/tom-select.popular.min.js */' \
"$(cat ${tomselect})"
--replace-fail '/* !include ${tomselect.url} */' \
"$(cat ${fetchurl tomselect})"
substituteInPlace build.rs \
--replace-fail "${tablerIcons.url}" "${fetchurl tablerIcons}" \
--replace-fail "copy_url_to_opened_file(&client, sprite_url, &mut sprite_content).await;" "sprite_content = std::fs::read(sprite_url).unwrap();"
'';
cargoHash = "sha256-lUQ1j2f/LXpqpb6VK4Bq2NI0L9KoyEdlPkENMOKkt0w=";
cargoHash = "sha256-w4GfkC+sAJRQgo9GEYm4buv+Q8id84wgRSV1WczZUBI=";
nativeBuildInputs = [ pkg-config ];
@@ -89,10 +93,10 @@ rustPlatform.buildRustPackage (finalAttrs: {
meta = {
description = "SQL-only webapp builder, empowering data analysts to build websites and applications quickly";
homepage = "https://github.com/lovasoa/SQLpage";
changelog = "https://github.com/lovasoa/SQLpage/blob/${finalAttrs.src.rev}/CHANGELOG.md";
homepage = "https://github.com/sqlpage/SQLpage";
changelog = "https://github.com/sqlpage/SQLpage/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dit7ya ];
maintainers = with lib.maintainers; [ hythera ];
mainProgram = "sqlpage";
};
})

View File

@@ -0,0 +1,104 @@
# New rust versions should first go to staging.
# Things to check after updating:
# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
# i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
# This testing can be also done by other volunteers as part of the pull
# request review, in case platforms cannot be covered.
# 2. The LLVM version used for building should match with rust upstream.
# Check the version number in the src/llvm-project git submodule in:
# https://github.com/rust-lang/rust/blob/<version-tag>/.gitmodules
# Note: The way this is structured is:
# 1. Import default.nix, and apply arguments as needed for the file-defined function
# 2. Implicitly, all arguments to this file are applied to the function that is imported.
# if you want to add an argument to default.nix's top-level function, but not the function
# it instantiates, add it to the `removeAttrs` call below.
{
stdenv,
lib,
newScope,
callPackage,
pkgsBuildTarget,
pkgsBuildBuild,
pkgsBuildHost,
pkgsHostTarget,
pkgsTargetTarget,
makeRustPlatform,
wrapRustcWith,
llvmPackages,
llvm,
cargo-auditable,
wrapCCWith,
overrideCC,
fetchpatch,
}@args:
let
llvmSharedFor =
pkgSet:
pkgSet.llvmPackages.libllvm.override (
{
enableSharedLibraries = true;
}
// lib.optionalAttrs (stdenv.targetPlatform.useLLVM or false) {
# Force LLVM to compile using clang + LLVM libs when targeting pkgsLLVM
stdenv = pkgSet.stdenv.override {
allowedRequisites = null;
cc = pkgSet.pkgsBuildHost.llvmPackages.clangUseLLVM;
};
}
);
in
import ./default.nix
{
rustcVersion = "1.95.0";
rustcSha256 = "sha256-6puCqD5GlnU3w1ac6db6FoEcBDqW5lE3bDSecCQcpRU=";
llvmSharedForBuild = llvmSharedFor pkgsBuildBuild;
llvmSharedForHost = llvmSharedFor pkgsBuildHost;
llvmSharedForTarget = llvmSharedFor pkgsBuildTarget;
inherit llvmPackages;
# For use at runtime
llvmShared = llvmSharedFor pkgsHostTarget;
# Note: the version MUST be the same version that we are building. Upstream
# ensures that each released compiler can compile itself:
# https://github.com/NixOS/nixpkgs/pull/351028#issuecomment-2438244363
bootstrapVersion = "1.95.0";
# fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
bootstrapHashes = {
i686-unknown-linux-gnu = "3ef2320bdfa9b69b19c6ca42f950b6bfb9d2af3b925b0c43a6bfecc4d355a66e";
x86_64-unknown-linux-gnu = "a47ac940abd12399d59ad15c877e7113fa35f2b9ec7e6a8a045d4fd8b9741dea";
x86_64-unknown-linux-musl = "059086762ac6f4ebe15b5b10e629e4e33e96b372765e65741251f75c4fdfb4e0";
arm-unknown-linux-gnueabihf = "7d742098e8bb0d10415775634eed83240ae88c1bae6bc73b470ccf0be4629b4c";
armv7-unknown-linux-gnueabihf = "23a201e72c082c285e957a32b40e1c30805b15d344b84b984be3659e9aefadf6";
aarch64-unknown-linux-gnu = "3b9385d3144ac57616befa0ccbac524f857ba1b4ab074226e73a24d43568a98e";
aarch64-unknown-linux-musl = "ad35bcc6928ccb4fd8a12fe19ce88c8fb6e6e3690578a0cb4e0839008017484f";
x86_64-apple-darwin = "3f3d9f29f8eb7aa821bd8531cb9b1c3c74c3976aa558dfabfcc15c2febb3cfb8";
aarch64-apple-darwin = "ec23ad2e0e15a7397d2c3c232356149cc871b7df7f47e25c2acb1070157f5398";
powerpc64-unknown-linux-gnu = "6d89e3739cfb7b3a05880734513361d5860492385217dcd166d033f3e974e823";
powerpc64le-unknown-linux-gnu = "29e3430f38406c926ee24ff911357dba0c46ff1d3ea59e91625b03677bd51b30";
powerpc64le-unknown-linux-musl = "b8856b651d64f4f4a2e2ee009366d99ea6135bdf88d15cf2134fc9e166745030";
riscv64gc-unknown-linux-gnu = "8b527cb1a09f53f83aa3420b4e763c9ea64a54d89e6d7242da35c8aeaa325593";
s390x-unknown-linux-gnu = "e9598bdd3bc1438d965208ef5186f0dd671826cddd4bcbb20e22a3cec14c111d";
loongarch64-unknown-linux-gnu = "18038ce7a910930c6742cc76e06fdd4b21b879466a3e67d63a0b6cae955bb4dc";
loongarch64-unknown-linux-musl = "eef910858c7e833b13c9cb32e79e59d89434999bc2a7d0b6447ab4046eb40461";
x86_64-unknown-freebsd = "0ffb7aa1999ea12363bbfaea500e152565bb4918ad5a73e9713be40510d75e49";
};
selectRustPackage = pkgs: pkgs.rust_1_95;
}
(
removeAttrs args [
"llvmPackages"
"llvm"
"wrapCCWith"
"overrideCC"
"pkgsHostTarget"
"fetchpatch"
"cargo-auditable"
]
)

View File

@@ -5233,6 +5233,7 @@ with pkgs;
rust_1_91 = callPackage ../development/compilers/rust/1_91.nix { };
rust_1_94 = callPackage ../development/compilers/rust/1_94.nix { };
rust_1_95 = callPackage ../development/compilers/rust/1_95.nix { };
rust = rust_1_91;
mrustc = callPackage ../development/compilers/mrustc { };
@@ -5241,6 +5242,7 @@ with pkgs;
rustPackages_1_91 = rust_1_91.packages.stable;
rustPackages_1_94 = rust_1_94.packages.stable;
rustPackages_1_95 = rust_1_95.packages.stable;
rustPackages = rustPackages_1_91;
inherit (rustPackages)