Compare commits
1 Commits
main
...
bc115a7ccc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc115a7ccc
|
@@ -2,8 +2,6 @@ apiVersion: tekton.dev/v1
|
|||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
metadata:
|
metadata:
|
||||||
name: build
|
name: build
|
||||||
labels:
|
|
||||||
pdb: protect
|
|
||||||
spec:
|
spec:
|
||||||
timeouts:
|
timeouts:
|
||||||
pipeline: "2h0m0s"
|
pipeline: "2h0m0s"
|
||||||
@@ -64,7 +62,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/git-clone/0.1/git-clone.yaml
|
value: task/git-clone/0.1/git-clone.yaml
|
||||||
resolver: git
|
resolver: git
|
||||||
@@ -103,7 +101,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ apiVersion: tekton.dev/v1
|
|||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
metadata:
|
metadata:
|
||||||
name: foreign-document-test
|
name: foreign-document-test
|
||||||
labels:
|
|
||||||
pdb: protect
|
|
||||||
spec:
|
spec:
|
||||||
timeouts:
|
timeouts:
|
||||||
pipeline: "2h0m0s"
|
pipeline: "2h0m0s"
|
||||||
@@ -64,7 +62,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/git-clone/0.1/git-clone.yaml
|
value: task/git-clone/0.1/git-clone.yaml
|
||||||
resolver: git
|
resolver: git
|
||||||
@@ -103,7 +101,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
@@ -121,7 +119,7 @@ spec:
|
|||||||
- --import-cache
|
- --import-cache
|
||||||
- "type=registry,ref=$(params.image-name):buildcache"
|
- "type=registry,ref=$(params.image-name):buildcache"
|
||||||
- --export-cache
|
- --export-cache
|
||||||
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,rewrite-timestamp=true,image-manifest=true,oci-mediatypes=true"
|
- "type=registry,ref=$(params.image-name):buildcache,mode=max,compression=zstd,compression-level=22,image-manifest=true,oci-mediatypes=true"
|
||||||
- --opt
|
- --opt
|
||||||
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
- build-arg:SOURCE_DATE_EPOCH=$(tasks.get-git-commit-time.results.unix-time)
|
||||||
- name: BUILDKITD_TOML
|
- name: BUILDKITD_TOML
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ apiVersion: tekton.dev/v1
|
|||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
metadata:
|
metadata:
|
||||||
name: rust-format
|
name: rust-format
|
||||||
labels:
|
|
||||||
pdb: protect
|
|
||||||
spec:
|
spec:
|
||||||
timeouts:
|
timeouts:
|
||||||
pipeline: "2h0m0s"
|
pipeline: "2h0m0s"
|
||||||
@@ -64,7 +62,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/git-clone/0.1/git-clone.yaml
|
value: task/git-clone/0.1/git-clone.yaml
|
||||||
resolver: git
|
resolver: git
|
||||||
@@ -103,7 +101,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ apiVersion: tekton.dev/v1
|
|||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
metadata:
|
metadata:
|
||||||
name: rust-clippy
|
name: rust-clippy
|
||||||
labels:
|
|
||||||
pdb: protect
|
|
||||||
spec:
|
spec:
|
||||||
taskRunTemplate:
|
taskRunTemplate:
|
||||||
serviceAccountName: build-bot
|
serviceAccountName: build-bot
|
||||||
@@ -64,7 +62,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/git-clone/0.1/git-clone.yaml
|
value: task/git-clone/0.1/git-clone.yaml
|
||||||
resolver: git
|
resolver: git
|
||||||
@@ -103,7 +101,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ apiVersion: tekton.dev/v1
|
|||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
metadata:
|
metadata:
|
||||||
name: rust-test
|
name: rust-test
|
||||||
labels:
|
|
||||||
pdb: protect
|
|
||||||
spec:
|
spec:
|
||||||
timeouts:
|
timeouts:
|
||||||
pipeline: "2h0m0s"
|
pipeline: "2h0m0s"
|
||||||
@@ -64,7 +62,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: "dda7b690195b43e8b9859d1caf5dcbf48588ade1"
|
value: "31376f29c6332ea8c378152d5ccda1ba9dbcd7bb"
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/git-clone/0.1/git-clone.yaml
|
value: task/git-clone/0.1/git-clone.yaml
|
||||||
resolver: git
|
resolver: git
|
||||||
@@ -103,7 +101,7 @@ spec:
|
|||||||
- name: url
|
- name: url
|
||||||
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
value: https://code.fizz.buzz/talexander/personal_tekton_catalog.git
|
||||||
- name: revision
|
- name: revision
|
||||||
value: dda7b690195b43e8b9859d1caf5dcbf48588ade1
|
value: 31376f29c6332ea8c378152d5ccda1ba9dbcd7bb
|
||||||
- name: pathInRepo
|
- name: pathInRepo
|
||||||
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
value: task/buildkit-rootless-daemonless/0.1/buildkit-rootless-daemonless.yaml
|
||||||
params:
|
params:
|
||||||
|
|||||||
143
flake.nix
143
flake.nix
@@ -35,9 +35,9 @@
|
|||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
};
|
};
|
||||||
rustToolchain = (pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override {
|
rustToolchain =
|
||||||
targets = [ "wasm32-unknown-unknown" ];
|
(pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml).override
|
||||||
};
|
{ targets = [ "wasm32-unknown-unknown" ]; };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
@@ -57,10 +57,43 @@
|
|||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system overlays;
|
inherit system overlays;
|
||||||
};
|
};
|
||||||
appliedOverlay = self.overlays.default pkgs pkgs;
|
build_wasm =
|
||||||
|
{
|
||||||
|
bindgenTarget ? null,
|
||||||
|
}:
|
||||||
|
(pkgs.callPackage ./nix/package.nix {
|
||||||
|
targetBins = [
|
||||||
|
"wasm"
|
||||||
|
];
|
||||||
|
features = [ "wasm" ];
|
||||||
|
cargoBuildTarget = "wasm32-unknown-unknown";
|
||||||
|
buildType = "wasm";
|
||||||
|
}).overrideAttrs
|
||||||
|
(
|
||||||
|
old:
|
||||||
|
let
|
||||||
|
bindgen_command = [
|
||||||
|
"${pkgs.wasm-bindgen-cli}/bin/wasm-bindgen"
|
||||||
|
"--target"
|
||||||
|
bindgenTarget
|
||||||
|
"--out-dir"
|
||||||
|
"target/wasm32-unknown-unknown/${bindgenTarget}"
|
||||||
|
"target/wasm32-unknown-unknown/wasm/wasm.wasm"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
postBuild = ''
|
||||||
|
${pkgs.lib.escapeShellArgs bindgen_command}
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share/${bindgenTarget}
|
||||||
|
cp target/wasm32-unknown-unknown/${bindgenTarget}/* $out/share/${bindgenTarget}
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
default = all;
|
|
||||||
all = pkgs.symlinkJoin {
|
all = pkgs.symlinkJoin {
|
||||||
name = "all";
|
name = "all";
|
||||||
paths = [
|
paths = [
|
||||||
@@ -70,93 +103,37 @@
|
|||||||
wasm_web
|
wasm_web
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
inherit (appliedOverlay.organic)
|
library = (pkgs.callPackage ./nix/package.nix { buildLib = true; }).overrideAttrs (
|
||||||
library
|
old:
|
||||||
devTools
|
let
|
||||||
wasm_bundler
|
in
|
||||||
wasm_web
|
{
|
||||||
;
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib
|
||||||
|
cp target/*/release/liborganic.rlib $out/lib/
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
);
|
||||||
|
devTools = pkgs.callPackage ./nix/package.nix {
|
||||||
|
targetBins = [
|
||||||
|
"parse"
|
||||||
|
"compare"
|
||||||
|
];
|
||||||
|
features = [ "compare" ];
|
||||||
|
};
|
||||||
|
wasm_bundler = build_wasm { bindgenTarget = "bundler"; };
|
||||||
|
wasm_web = build_wasm { bindgenTarget = "web"; };
|
||||||
docker_env = pkgs.buildEnv {
|
docker_env = pkgs.buildEnv {
|
||||||
name = "organic";
|
name = "organic";
|
||||||
paths = with pkgs; [
|
paths = with pkgs; [
|
||||||
appliedOverlay.organic.devTools
|
devTools
|
||||||
bash
|
bash
|
||||||
uutils-coreutils-noprefix
|
uutils-coreutils-noprefix
|
||||||
# toybox # Smaller than uutils-coreutils?
|
# toybox # Smaller than uutils-coreutils?
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
default = all;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
overlays.default = final: prev: {
|
|
||||||
organic = final.lib.makeScope final.newScope (
|
|
||||||
organicScope:
|
|
||||||
let
|
|
||||||
build_wasm =
|
|
||||||
{
|
|
||||||
bindgenTarget ? null,
|
|
||||||
}:
|
|
||||||
(organicScope.callPackage ./nix/package.nix {
|
|
||||||
inherit rust-overlay;
|
|
||||||
targetBins = [
|
|
||||||
"wasm"
|
|
||||||
];
|
|
||||||
features = [ "wasm" ];
|
|
||||||
cargoBuildTarget = "wasm32-unknown-unknown";
|
|
||||||
buildType = "wasm";
|
|
||||||
}).overrideAttrs
|
|
||||||
(
|
|
||||||
old:
|
|
||||||
let
|
|
||||||
bindgen_command = [
|
|
||||||
"${final.wasm-bindgen-cli}/bin/wasm-bindgen"
|
|
||||||
"--target"
|
|
||||||
bindgenTarget
|
|
||||||
"--out-dir"
|
|
||||||
"target/wasm32-unknown-unknown/${bindgenTarget}"
|
|
||||||
"target/wasm32-unknown-unknown/wasm/wasm.wasm"
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
postBuild = ''
|
|
||||||
${final.lib.escapeShellArgs bindgen_command}
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/share/${bindgenTarget}
|
|
||||||
cp target/wasm32-unknown-unknown/${bindgenTarget}/* $out/share/${bindgenTarget}
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
library =
|
|
||||||
(organicScope.callPackage ./nix/package.nix {
|
|
||||||
inherit rust-overlay;
|
|
||||||
buildLib = true;
|
|
||||||
}).overrideAttrs
|
|
||||||
(
|
|
||||||
old:
|
|
||||||
let
|
|
||||||
in
|
|
||||||
{
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/lib
|
|
||||||
cp target/*/release/liborganic.rlib $out/lib/
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
);
|
|
||||||
devTools = organicScope.callPackage ./nix/package.nix {
|
|
||||||
inherit rust-overlay;
|
|
||||||
targetBins = [
|
|
||||||
"parse"
|
|
||||||
"compare"
|
|
||||||
];
|
|
||||||
features = [ "compare" ];
|
|
||||||
};
|
|
||||||
wasm_bundler = build_wasm { bindgenTarget = "bundler"; };
|
|
||||||
wasm_web = build_wasm { bindgenTarget = "web"; };
|
|
||||||
}
|
|
||||||
);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
hello,
|
hello,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
makeRustPlatform,
|
||||||
rust-overlay,
|
pkgsBuildHost,
|
||||||
|
|
||||||
targetBins ? [ ],
|
targetBins ? [ ],
|
||||||
features ? [ ],
|
features ? [ ],
|
||||||
@@ -12,41 +12,34 @@
|
|||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
cargoToml = (lib.importTOML ../Cargo.toml);
|
cargoToml = (lib.importTOML ../Cargo.toml);
|
||||||
rustPlatformFor =
|
rustToolchain = (pkgsBuildHost.rust-bin.fromRustupToolchainFile ../rust-toolchain.toml).override (
|
||||||
pkgs:
|
if cargoBuildTarget != null then
|
||||||
let
|
{
|
||||||
rust-bin = rust-overlay.lib.mkRustBin { } pkgs;
|
targets = [ cargoBuildTarget ];
|
||||||
rustToolchain = (rust-bin.fromRustupToolchainFile ../rust-toolchain.toml).override (
|
}
|
||||||
if cargoBuildTarget != null then
|
else
|
||||||
{
|
{ }
|
||||||
targets = [ cargoBuildTarget ];
|
);
|
||||||
}
|
baseRustPlatform = (
|
||||||
else
|
makeRustPlatform {
|
||||||
{ }
|
cargo = rustToolchain;
|
||||||
);
|
rustc = rustToolchain;
|
||||||
baseRustPlatform = (
|
}
|
||||||
pkgs.makeRustPlatform {
|
);
|
||||||
cargo = rustToolchain;
|
rustPlatform =
|
||||||
rustc = rustToolchain;
|
if cargoBuildTarget != null then
|
||||||
|
baseRustPlatform.overrideScope (
|
||||||
|
final: prev: {
|
||||||
|
cargoBuildHook = prev.cargoBuildHook.overrideDerivation (_: {
|
||||||
|
rustcTargetSpec = cargoBuildTarget;
|
||||||
|
});
|
||||||
|
cargoInstallHook = hello;
|
||||||
}
|
}
|
||||||
);
|
)
|
||||||
rustPlatform =
|
else
|
||||||
if cargoBuildTarget != null then
|
baseRustPlatform;
|
||||||
baseRustPlatform.overrideScope (
|
|
||||||
final: prev: {
|
|
||||||
cargoBuildHook = prev.cargoBuildHook.overrideDerivation (_: {
|
|
||||||
rustcTargetSpec = cargoBuildTarget;
|
|
||||||
});
|
|
||||||
cargoInstallHook = hello;
|
|
||||||
}
|
|
||||||
)
|
|
||||||
else
|
|
||||||
baseRustPlatform;
|
|
||||||
in
|
|
||||||
rustPlatform;
|
|
||||||
in
|
in
|
||||||
(rustPlatformFor pkgs).buildRustPackage (
|
rustPlatform.buildRustPackage (
|
||||||
# rustPlatform.buildRustPackage (
|
|
||||||
{
|
{
|
||||||
pname = "organic";
|
pname = "organic";
|
||||||
version = cargoToml.package.version;
|
version = cargoToml.package.version;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
[toolchain]
|
[toolchain]
|
||||||
channel = "nightly-2026-05-23"
|
channel = "nightly"
|
||||||
profile = "default"
|
profile = "default"
|
||||||
components = ["clippy", "rustfmt"]
|
components = ["clippy", "rustfmt"]
|
||||||
|
|||||||
Reference in New Issue
Block a user