Skip to content

Commit

Permalink
nixel: Add UpdateScript + 4.1.0 -> 5.1.1
Browse files Browse the repository at this point in the history
nixel: Fix rust crate::ffi clang 18 compatibility by downgrading to 16
  • Loading branch information
Antoine 'toinux' Wam committed Dec 29, 2024
1 parent 35035bb commit c8dcae2
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions pkgs/by-name/ni/nixel/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,33 @@
lib,
rustPlatform,
fetchFromGitHub,
nix-update,
clang_16,
testers,
nixel,
}:

rustPlatform.buildRustPackage rec {
let
clang = clang_16;
rustPlatform' = rustPlatform // {
bindgenHook = rustPlatform.bindgenHook.override { inherit clang; };
};
in
rustPlatform'.buildRustPackage rec {
pname = "nixel";
version = "4.1.0";
version = "5.1.1";

src = fetchFromGitHub {
owner = "kamadorueda";
repo = pname;
rev = version;
sha256 = "sha256-dQ3wzBTjteqk9rju+FMAO+ydimnGu24Y2DEDLX/P+1A=";
sha256 = "sha256-wIXZd8iujLqbgbV+abWmIfjDgQ8i6nyE5jTAs3OczXM=";
};

cargoHash = "sha256-1OsHs0W3ji9Kgpv7nGY9XyGxJ4c0faN2VuFLsdwkgKY=";
cargoHash = "sha256-GJ2UO8MvujRxFjzdt2Tfrlfzv1jot9XCrmfBqTFVngI=";

nativeBuildInputs = [
rustPlatform'.bindgenHook # .override { clang = clang_16; }
];

# Package requires a non reproducible submodule
# https://github.com/kamadorueda/nixel/blob/2873bd84bf4fc540d0ae8af062e109cc9ad40454/.gitmodules#L7
Expand All @@ -28,6 +39,8 @@ rustPlatform.buildRustPackage rec {
version = testers.testVersion { package = nixel; };
};

passthru.updateScript = lib.getExe nix-update;

meta = with lib; {
description = "Lexer, Parser, Abstract Syntax Tree and Concrete Syntax Tree for the Nix Expressions Language";
mainProgram = "nixel";
Expand Down

0 comments on commit c8dcae2

Please sign in to comment.