5 Commits

Author SHA1 Message Date
Tom Alexander
336b5d3d54 Update build workflow.
Some checks failed
rust-test Build rust-test has started
foreign-document-test Build foreign-document-test has started
build Build build has started
format Build format has succeeded
clippy Build clippy has failed
2026-07-17 18:38:11 -04:00
Tom Alexander
cef89303b1 Pin a specific version of rust.
Some checks failed
format Build format has succeeded
rust-test Build rust-test has started
clippy Build clippy has failed
build Build build has failed
foreign-document-test Build foreign-document-test has failed
2026-07-11 18:36:52 -04:00
Tom Alexander
842a77fb2b Pass in rust-overlay for creating rust-bin.
Some checks failed
rust-test Build rust-test has started
format Build format has succeeded
clippy Build clippy has failed
build Build build has succeeded
foreign-document-test Build foreign-document-test has failed
2026-07-10 21:55:12 -04:00
Tom Alexander
957bb3a5c8 Remove pkgsBuildHost from devShell. 2026-07-10 21:55:12 -04:00
Tom Alexander
de6739f9b6 Add an overlay to the flake.
Some checks failed
foreign-document-test Build foreign-document-test has started
rust-test Build rust-test has started
format Build format has succeeded
clippy Build clippy has failed
build Build build has succeeded
2026-07-10 20:21:38 -04:00
8 changed files with 140 additions and 100 deletions

View File

@@ -2,6 +2,8 @@ apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: build
labels:
pdb: protect
spec:
timeouts:
pipeline: "2h0m0s"
@@ -62,7 +64,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
- name: pathInRepo
value: task/git-clone/0.1/git-clone.yaml
resolver: git
@@ -101,7 +103,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
- name: pathInRepo
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
params:

View File

@@ -2,6 +2,8 @@ apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: foreign-document-test
labels:
pdb: protect
spec:
timeouts:
pipeline: "2h0m0s"
@@ -62,7 +64,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
- name: pathInRepo
value: task/git-clone/0.1/git-clone.yaml
resolver: git
@@ -101,7 +103,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
- name: pathInRepo
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
params:
@@ -119,7 +121,7 @@ spec:
- --import-cache
- "type=registry,ref=$(params.image-name):buildcache"
- --export-cache
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,image-manifest=true,oci-mediatypes=true"
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
- --opt
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
- name: BUILDKITD_TOML

View File

@@ -2,6 +2,8 @@ apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: rust-format
labels:
pdb: protect
spec:
timeouts:
pipeline: "2h0m0s"
@@ -62,7 +64,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
- name: pathInRepo
value: task/git-clone/0.1/git-clone.yaml
resolver: git
@@ -101,7 +103,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
- name: pathInRepo
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
params:

View File

@@ -2,6 +2,8 @@ apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: rust-clippy
labels:
pdb: protect
spec:
taskRunTemplate:
serviceAccountName: build-bot
@@ -62,7 +64,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
- name: pathInRepo
value: task/git-clone/0.1/git-clone.yaml
resolver: git
@@ -101,7 +103,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
- name: pathInRepo
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
params:

View File

@@ -2,6 +2,8 @@ apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: rust-test
labels:
pdb: protect
spec:
timeouts:
pipeline: "2h0m0s"
@@ -62,7 +64,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
- name: pathInRepo
value: task/git-clone/0.1/git-clone.yaml
resolver: git
@@ -101,7 +103,7 @@ spec:
- name: url
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
- name: revision
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
- name: pathInRepo
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
params:

View File

@@ -35,9 +35,9 @@
pkgs = import nixpkgs {
inherit system overlays;
};
rustToolchain =
(pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override
{ targets = [ "wasm32-unknown-unknown" ]; };
rustToolchain = (pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override {
targets = [ "wasm32-unknown-unknown" ];
};
in
{
default = pkgs.mkShell {
@@ -57,11 +57,46 @@
pkgs = import nixpkgs {
inherit system overlays;
};
appliedOverlay = self.overlays.default pkgs pkgs;
in
rec {
default = all;
all = pkgs.symlinkJoin {
name = "all";
paths = [
library
devTools
wasm_bundler
wasm_web
];
};
inherit (appliedOverlay.organic)
library
devTools
wasm_bundler
wasm_web
;
docker_env = pkgs.buildEnv {
name = "organic";
paths = with pkgs; [
appliedOverlay.organic.devTools
bash
uutils-coreutils-noprefix
# toybox # Smaller than uutils-coreutils?
];
};
}
);
overlays.default = final: prev: {
organic = final.lib.makeScope final.newScope (
organicScope:
let
build_wasm =
{
bindgenTarget ? null,
}:
(pkgs.callPackage ./nix/package.nix {
(organicScope.callPackage ./nix/package.nix {
inherit rust-overlay;
targetBins = [
"wasm"
];
@@ -73,7 +108,7 @@
old:
let
bindgen_command = [
"${pkgs.wasm-bindgen-cli}/bin/wasm-bindgen"
"${final.wasm-bindgen-cli}/bin/wasm-bindgen"
"--target"
bindgenTarget
"--out-dir"
@@ -83,7 +118,7 @@
in
{
postBuild = ''
${pkgs.lib.escapeShellArgs bindgen_command}
${final.lib.escapeShellArgs bindgen_command}
'';
installPhase = ''
@@ -93,17 +128,13 @@
}
);
in
rec {
all = pkgs.symlinkJoin {
name = "all";
paths = [
library
devTools
wasm_bundler
wasm_web
];
};
library = (pkgs.callPackage ./nix/package.nix { buildLib = true; }).overrideAttrs (
{
library =
(organicScope.callPackage ./nix/package.nix {
inherit rust-overlay;
buildLib = true;
}).overrideAttrs
(
old:
let
in
@@ -114,7 +145,8 @@
'';
}
);
devTools = pkgs.callPackage ./nix/package.nix {
devTools = organicScope.callPackage ./nix/package.nix {
inherit rust-overlay;
targetBins = [
"parse"
"compare"
@@ -123,17 +155,8 @@
};
wasm_bundler = build_wasm { bindgenTarget = "bundler"; };
wasm_web = build_wasm { bindgenTarget = "web"; };
docker_env = pkgs.buildEnv {
name = "organic";
paths = with pkgs; [
devTools
bash
uutils-coreutils-noprefix
# toybox # Smaller than uutils-coreutils?
];
};
default = all;
}
);
};
};
}

View File

@@ -1,8 +1,8 @@
{
hello,
lib,
makeRustPlatform,
pkgsBuildHost,
pkgs,
rust-overlay,
targetBins ? [ ],
features ? [ ],
@@ -12,7 +12,11 @@
}:
let
cargoToml = (lib.importTOML ../Cargo.toml);
rustToolchain = (pkgsBuildHost.rust-bin.fromRustupToolchainFile ../rust-toolchain.toml).override (
rustPlatformFor =
pkgs:
let
rust-bin = rust-overlay.lib.mkRustBin { } pkgs;
rustToolchain = (rust-bin.fromRustupToolchainFile ../rust-toolchain.toml).override (
if cargoBuildTarget != null then
{
targets = [ cargoBuildTarget ];
@@ -21,7 +25,7 @@ let
{ }
);
baseRustPlatform = (
makeRustPlatform {
pkgs.makeRustPlatform {
cargo = rustToolchain;
rustc = rustToolchain;
}
@@ -39,7 +43,10 @@ let
else
baseRustPlatform;
in
rustPlatform.buildRustPackage (
rustPlatform;
in
(rustPlatformFor pkgs).buildRustPackage (
# rustPlatform.buildRustPackage (
{
pname = "organic";
version = cargoToml.package.version;

View File

@@ -1,4 +1,4 @@
[toolchain]
channel = "nightly"
channel = "nightly-2026-05-23"
profile = "default"
components = ["clippy", "rustfmt"]