WIP: Package cargo-dylint

This commit is contained in:
Matthias Beyer 2025-03-03 10:24:46 +01:00
parent a154eccfed
commit 05e39da57e
No known key found for this signature in database
3 changed files with 28 additions and 2 deletions

View file

@ -26,11 +26,15 @@
];
};
rustTarget = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
craneLib = (inputs.crane.mkLib pkgs).overrideToolchain rustTarget;
callPackage = pkgs.lib.callPackageWith (
pkgs
// {
inherit
inputs
craneLib
;
}
);

View file

@ -1,8 +1,28 @@
{
inputs,
pkgs,
craneLib,
...
}:
{
let
pname = "cargo-dylint";
version = "4.0.0";
src = pkgs.fetchFromGitHub {
owner = "trailofbits";
repo = "dylint";
tag = "v${version}";
sha256 = "sha256-Z8uuewp7Buoadayc0oTafmfvwNT36KukWKiHxL/mQfI=";
};
cargoArtifacts = craneLib.buildDepsOnly {
inherit pname version src;
};
in craneLib.buildPackage {
inherit
cargoArtifacts
pname
version
src
;
}

2
rust-toolchain.toml Normal file
View file

@ -0,0 +1,2 @@
[toolchain]
channel = "nightly-2025-03-01"