Disable most builds and focus on l10n-db

This commit is contained in:
Savanni D'Gerinel 2025-03-28 09:42:42 -04:00
parent a4258436a6
commit e5979003b8
5 changed files with 188 additions and 6134 deletions

6090
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +1,37 @@
[workspace]
resolver = "2"
members = [
"authdb",
"bike-lights/core",
"bike-lights/simulator",
"changeset",
"config",
"config-derive",
"coordinates",
"cyber-slides",
"cyberpunk",
"cyberpunk-splash",
"dashboard",
"emseries",
"file-service",
"fitnesstrax/app",
"fitnesstrax/core",
"fluent-ergonomics",
"geo-types",
"gm-control-panel",
"gm-dash/server",
"hex-grid",
"icon-test",
"l10n-db",
"memorycache",
"nom-training",
"otg/core",
"otg/gtk",
"pico-st7789",
"result-extended",
"screenplay",
"sgf",
"timezone-testing",
"tree",
"visions/server",
"visions/types",
"visions/ui",
# "authdb",
# "bike-lights/bike",
# "bike-lights/core",
# "bike-lights/simulator",
# "changeset",
# "config",
# "config-derive",
# "coordinates",
# "cyberpunk",
# "cyber-slides",
# "cyberpunk-splash",
# "dashboard",
# "emseries",
# "file-service",
# "fitnesstrax/core",
# "fitnesstrax/app",
# "fluent-ergonomics",
# "geo-types",
# "gm-control-panel",
# "hex-grid",
# "icon-test",
# "memorycache",
# "nom-training",
# "otg/core",
# "otg/gtk",
# "result-extended",
# "screenplay",
# "sgf",
# "timezone-testing",
# "tree",
# "visions/server",
# "gm-dash/server",
"l10n-db"
]

View File

@ -8,8 +8,16 @@
crane.url = "github:ipetkov/crane";
};
outputs = { self, nixpkgs, unstable, typeshare, crane, ... }:
let
outputs =
{
self,
nixpkgs,
unstable,
typeshare,
crane,
...
}:
let
version = builtins.string 0 8 self.lastModifiedDate;
supportedSystems = [ "x86_64-linux" ];
in
@ -48,10 +56,11 @@
pkgs.udev
pkgs.wasm-pack
pkgs.go-task
pkgs.nixfmt-rfc-style
typeshare.packages."x86_64-linux".default
pkgs.nodePackages_latest.typescript-language-server
];
LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib";
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
ENV = "dev";
};
@ -59,56 +68,59 @@
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
craneLib = crane.mkLib pkgs;
src = craneLib.cleanCargoSource ./.;
gtkNativeInputs = [
pkgs.pkg-config
pkgs.gtk4
pkgs.libadwaita
pkgs.wrapGAppsHook4
];
# gtkNativeInputs = [
# pkgs.pkg-config
# pkgs.gtk4
# pkgs.libadwaita
# pkgs.wrapGAppsHook4
# ];
cargoOverrides = pkgs: pkgs.buildRustCrate.override {
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
gobject-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
gio-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
gdk-pixbuf-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
libadwaita-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
# cargoOverrides =
# pkgs:
# pkgs.buildRustCrate.override {
# defaultCrateOverrides = pkgs.defaultCrateOverrides // {
# gobject-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
# gio-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
# gdk-pixbuf-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
# libadwaita-sys = attrs: { nativeBuildInputs = gtkNativeInputs; };
dashboard = attrs: { nativeBuildInputs = gtkNativeInputs; };
fitnesstrax = import ./fitnesstrax/app/override.nix { gtkNativeInputs = gtkNativeInputs; };
otg-gtk = import ./otg/gtk/override.nix { gtkNativeInputs = gtkNativeInputs; };
};
};
# dashboard = attrs: { nativeBuildInputs = gtkNativeInputs; };
# fitnesstrax = import ./fitnesstrax/app/override.nix { gtkNativeInputs = gtkNativeInputs; };
# otg-gtk = import ./otg/gtk/override.nix { gtkNativeInputs = gtkNativeInputs; };
# };
# };
cargo_nix = pkgs.callPackage ./Cargo.nix {
nixpkgs = nixpkgs;
buildRustCrateForPkgs = cargoOverrides;
};
# cargo_nix = pkgs.callPackage ./Cargo.nix {
# nixpkgs = nixpkgs;
# buildRustCrateForPkgs = cargoOverrides;
# };
in rec {
cyber-slides = cargo_nix.workspaceMembers.cyber-slides.build;
cyberpunk-splash = cargo_nix.workspaceMembers.cyberpunk-splash.build;
dashboard = cargo_nix.workspaceMembers.dashboard.build;
in
rec {
# cyber-slides = cargo_nix.workspaceMembers.cyber-slides.build;
# cyberpunk-splash = cargo_nix.workspaceMembers.cyberpunk-splash.build;
# dashboard = cargo_nix.workspaceMembers.dashboard.build;
# file-service = cargo_nix.workspaceMembers.file-service.build;
fitnesstrax = cargo_nix.workspaceMembers.fitnesstrax.build;
l10n-db = craneLib.buildPackage {
pname = "l10n-db";
cargoExtraArgs = "-p l10n-db";
src = ./.;
};
otg-gtk = cargo_nix.workspaceMembers.otg-gtk.build;
# fitnesstrax = cargo_nix.workspaceMembers.fitnesstrax.build;
# otg-gtk = cargo_nix.workspaceMembers.otg-gtk.build;
l10n-db =
(import ./rust.nix {
pkgs = pkgs;
craneLib = craneLib;
}).l10n-db;
all = pkgs.symlinkJoin {
name = "all";
paths = [
cyber-slides
cyberpunk-splash
dashboard
# file-service
fitnesstrax
l10n-db
otg-gtk
# cyber-slides
# cyberpunk-splash
# dashboard
# file-service
# fitnesstrax
l10n-db
# otg-gtk
];
};

View File

@ -4,15 +4,15 @@ version = "0.1.0"
edition = "2021"
[dependencies]
chrono = { version = "0.4.39", features = ["serde"] }
clap = { version = "4.5.30", features = ["derive"] }
icu_locid = { version = "1.5.0", features = ["serde"] }
serde = { version = "1.0.218", features = ["derive"] }
serde_json = "1.0.139"
tempfile = "3.17.1"
thiserror = "2.0.11"
toml = "0.8.20"
xml-rs = "0.8.25"
chrono = { version = "0.4.39", features = ["serde"] }
clap = { version = "4.5.30", features = ["derive"] }
icu_locid = { version = "1.5.0", features = ["serde"] }
serde = { version = "1.0.218", features = ["derive"] }
serde_json = { version = "1.0.139" }
tempfile = { version = "3.17.1" }
thiserror = { version = "2.0.11" }
toml = { version = "0.8.20" }
xml-rs = { version = "0.8.25" }
# [lib]
# name = "l10n_db"

49
rust.nix Normal file
View File

@ -0,0 +1,49 @@
{ pkgs, craneLib }:
let
src = craneLib.cleanCargoSource ./.;
rustDeps = with pkgs; {
inherit src;
nativeBuildInputs = [
gtk4
pkg-config
pkgs.clang
wrapGAppsHook4
];
buildInputs = [
libadwaita
openssl
pipewire
];
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
};
cargoArtifacts = craneLib.buildDepsOnly rustDeps;
rustArgs = rustDeps // {
inherit cargoArtifacts;
doCheck = false;
};
fileSetForCrate =
crate:
pkgs.lib.fileset.toSource {
root = ./.;
fileset = pkgs.lib.fileset.unions [
./Cargo.toml
./Cargo.lock
(craneLib.fileset.commonCargoSources crate)
];
};
in
{
l10n-db = craneLib.buildPackage (
rustArgs
// {
inherit (craneLib.crateNameFromCargoToml { src = ./l10n-db; }) version;
pname = "l10n-db";
cargoExtraArgs = "-p l10n-db";
src = fileSetForCrate ./l10n-db;
}
);
}