Skip to content

Commit

Permalink
update rust toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
declantsien committed Feb 10, 2024
1 parent eb01913 commit c251efe
Show file tree
Hide file tree
Showing 7 changed files with 150 additions and 71 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,15 @@ name: "Nix CI"
on:
pull_request:
push:
jobs:
nix-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: macos-latest

jobs:
flake-show:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

- name: Nix Flake Check
run: nix -Lv flake check

- uses: cachix/cachix-action@v10
with:
name: emacsng
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Run Emacsng Exec
run: nix -Lv run .#emacsng-noNativeComp -- --version
- uses: actions/[email protected]
- uses: cachix/install-nix-action@v24
- id: set-matrix
name: Evaluate flake
run: nix flake show --all-systems
163 changes: 127 additions & 36 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
self.overlays.default
emacs-overlay.overlay
(import rust-overlay)
devshell.overlay
devshell.overlays.default
];
config = {};
};
in rec {
devShells.default = with pkgs; let
devshell = with pkgs; let
custom-llvmPackages = llvmPackages_latest;
in
pkgs.devshell.mkShell {
Expand Down Expand Up @@ -121,7 +121,7 @@
withWebrender = true;
in
(
final.emacsGit.override
final.emacs-unstable.override
{
withImageMagick = true;
withNS = false;
Expand Down Expand Up @@ -217,6 +217,9 @@
++ lib.optionals (! withWebrender) [
"--with-harfbuzz"
]
# ++ lib.optionals stdenv.cc.isClang [
# "RUSTFLAGS='-l${stdenv.cc.libcxx.cxxabi.libName}'"
# ]
++ lib.optionals stdenv.isLinux [
"--with-dbus"
];
Expand Down Expand Up @@ -244,10 +247,9 @@
python3
]
++ rpathLibs)
++ [cargo rustc]
++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
])
++ lib.optionals
stdenv.isDarwin
Expand Down Expand Up @@ -293,7 +295,7 @@
emacsng-noNativeComp = (
(
emacsng.override {
nativeComp = false;
withNativeCompilation = false;
}
)
.overrideAttrs (
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nightly-2023-02-20
nightly-2024-01-25
4 changes: 2 additions & 2 deletions rust_src/crates/emacs/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl LispSymbolRef {
}

pub fn set_next(mut self, next: Option<Self>) {
let mut s = unsafe { self.u.s.as_mut() };
let s = unsafe { self.u.s.as_mut() };
s.next = match next {
Some(sym) => sym.as_ptr() as *mut Lisp_Symbol,
None => ptr::null_mut(),
Expand Down Expand Up @@ -110,7 +110,7 @@ impl LispObject {
self.get_untaggedptr() as EmacsInt
};

let lispsym_offset = unsafe { &lispsym as *const _ as EmacsInt };
let lispsym_offset = unsafe { ptr::addr_of!(lispsym) as *const _ as EmacsInt };
ptr_value + lispsym_offset
}
}
Expand Down
Loading

0 comments on commit c251efe

Please sign in to comment.