Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ jobs:
- os: ubuntu-latest
nix_system: x86_64-linux
docker_arch: amd64
- os: macos-15
nix_system: x86_64-darwin
docker_arch: na
- os: macos-15
- os: macos-latest
nix_system: aarch64-darwin
docker_arch: na
- os: ubuntu-24.04-arm
Expand Down Expand Up @@ -200,10 +197,6 @@ jobs:
name: "aarch64-linux"
hash: (open $"./artifacts/context-assets-aarch64-linux/context-($version)-aarch64-linux.sha256" | str trim)
}
{
name: "x86_64-darwin"
hash: (open $"./artifacts/context-assets-x86_64-darwin/context-($version)-x86_64-darwin.sha256" | str trim)
}
{
name: "x86_64-linux"
hash: (open $"./artifacts/context-assets-x86_64-linux/context-($version)-x86_64-linux.sha256" | str trim)
Expand Down
4 changes: 0 additions & 4 deletions data/x86_64-darwin.json

This file was deleted.

4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"];
systems = ["aarch64-darwin" "aarch64-linux" "x86_64-linux"];
perSystem = {system, ...}: let
overlays = [
inputs.rustnix.lib.rust.overlays.fenix
(
final: _prev: {
trunk = final.callPackage ./nix/trunk.nix {};
trunk = final.callPackage ./nix/trunk-bin.nix {};
}
)
];
Expand Down
2 changes: 1 addition & 1 deletion nix/dev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ in
(pkgs.cargo-llvm-cov.overrideAttrs (_: {doCheck = false;}))
pkgs.cargo-nextest
pkgs.trunk
(pkgs.callPackage ./wasm-bindgen-cli.nix {})
(pkgs.callPackage ./wasm-bindgen-cli-bin.nix {})
pkgs.tailwindcss_4
pkgs.act

Expand Down
8 changes: 2 additions & 6 deletions nix/packaging.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cargoLock,
overlays,
}: let
supportedTargets = ["aarch64-darwin" "aarch64-linux" "x86_64-darwin" "x86_64-linux"];
supportedTargets = ["aarch64-darwin" "aarch64-linux" "x86_64-linux"];

# Install data for pre-built releases (will be generated during release)
installData = {
Expand All @@ -18,10 +18,6 @@
if builtins.pathExists ../data/aarch64-linux.json
then builtins.fromJSON (builtins.readFile ../data/aarch64-linux.json)
else {};
x86_64-darwin =
if builtins.pathExists ../data/x86_64-darwin.json
then builtins.fromJSON (builtins.readFile ../data/x86_64-darwin.json)
else {};
x86_64-linux =
if builtins.pathExists ../data/x86_64-linux.json
then builtins.fromJSON (builtins.readFile ../data/x86_64-linux.json)
Expand All @@ -48,7 +44,7 @@

nativeBuildInputs = [
pkgs.trunk
(pkgs.callPackage ./wasm-bindgen-cli.nix {})
(pkgs.callPackage ./wasm-bindgen-cli-bin.nix {})
pkgs.tailwindcss_4
];

Expand Down
49 changes: 49 additions & 0 deletions nix/trunk-bin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchurl,
}: let
pname = "trunk";
version = "0.22.1";

sources = {
aarch64-darwin = {
triple = "aarch64-apple-darwin";
sha256 = "18e381936c848700fefb9ee3f64f362419fab700200eefee323ebc0d00a8e9db";
};
aarch64-linux = {
triple = "aarch64-unknown-linux-musl";
sha256 = "8c84a939aaf48bbdac2d78195c932adb319e610fb2cbf791bae07b2660cf3e46";
};
x86_64-linux = {
triple = "x86_64-unknown-linux-musl";
sha256 = "a1fe5cd6b053f5a76f66b598d296022a7f06f56def6013cc16cd6897d53f5363";
};
};

source =
sources.${stdenv.hostPlatform.system}
or (throw "trunk-bin: unsupported system ${stdenv.hostPlatform.system}");
in
stdenv.mkDerivation {
inherit pname version;

src = fetchurl {
url = "https://github.com/trunk-rs/trunk/releases/download/v${version}/trunk-${source.triple}.tar.gz";
inherit (source) sha256;
};

sourceRoot = ".";

installPhase = ''
install -Dm755 trunk $out/bin/trunk
'';

meta = {
homepage = "https://github.com/trunk-rs/trunk";
description = "Build, bundle & ship your Rust WASM application to the web";
mainProgram = "trunk";
maintainers = with lib.maintainers; [ctron];
license = lib.licenses.asl20;
};
}
37 changes: 0 additions & 37 deletions nix/trunk.nix

This file was deleted.

50 changes: 50 additions & 0 deletions nix/wasm-bindgen-cli-bin.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchurl,
}: let
pname = "wasm-bindgen-cli";
version = "0.2.129";

sources = {
aarch64-darwin = {
triple = "aarch64-apple-darwin";
sha256 = "81d4a23d56b3c3eb8187658329116d50e0b228a93b343825fb71f70179051cd1";
};
aarch64-linux = {
triple = "aarch64-unknown-linux-musl";
sha256 = "2ed4351c35dd9440308bbb02767d47ea278efe851a52465300f3c94f5b6c2a87";
};
x86_64-linux = {
triple = "x86_64-unknown-linux-musl";
sha256 = "82d12bb940e2d4e72e0d5605387fc1b8ca179044e012b620f0ce4e7440e8320e";
};
};

source =
sources.${stdenv.hostPlatform.system}
or (throw "wasm-bindgen-cli-bin: unsupported system ${stdenv.hostPlatform.system}");

tarballRoot = "wasm-bindgen-${version}-${source.triple}";
in
stdenv.mkDerivation {
inherit pname version;

src = fetchurl {
url = "https://github.com/rustwasm/wasm-bindgen/releases/download/${version}/wasm-bindgen-${version}-${source.triple}.tar.gz";
inherit (source) sha256;
};

sourceRoot = ".";

installPhase = ''
install -Dm755 ${tarballRoot}/wasm-bindgen $out/bin/wasm-bindgen
'';

meta = {
homepage = "https://wasm-bindgen.github.io/wasm-bindgen/";
license = with lib.licenses; [asl20 mit];
description = "Facilitating high-level interactions between wasm modules and JavaScript";
mainProgram = "wasm-bindgen";
};
}
42 changes: 0 additions & 42 deletions nix/wasm-bindgen-cli.nix

This file was deleted.

Loading