mirror of
https://github.com/astro/deadnix.git
synced 2024-11-24 09:12:50 +03:00
flake.nix: replace naersk with buildRustPackage
This commit is contained in:
parent
20a44af934
commit
5b1b10eb70
22
flake.lock
22
flake.lock
@ -1,26 +1,5 @@
|
||||
{
|
||||
"nodes": {
|
||||
"naersk": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713520724,
|
||||
"narHash": "sha256-CO8MmVDmqZX2FovL75pu5BvwhW+Vugc7Q6ze7Hj8heI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "c5037590290c6c7dae2e42e7da1e247e54ed2d49",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "naersk",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1714656196,
|
||||
@ -39,7 +18,6 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
}
|
||||
|
26
flake.nix
26
flake.nix
@ -2,27 +2,21 @@
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
naersk = {
|
||||
url = "github:nix-community/naersk/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils, naersk }:
|
||||
outputs = { self, nixpkgs, utils }:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
deadnixLambda = pkgs:
|
||||
let
|
||||
naersk-lib = pkgs.callPackage naersk { };
|
||||
in
|
||||
naersk-lib.buildPackage {
|
||||
pkgs.rustPlatform.buildRustPackage {
|
||||
pname = "deadnix";
|
||||
root = ./.;
|
||||
checkInputs = [ pkgs.rustPackages.clippy ];
|
||||
version = self.sourceInfo.lastModifiedDate;
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
nativeCheckInputs = [ pkgs.clippy ];
|
||||
doCheck = true;
|
||||
cargoTestCommands = x:
|
||||
x ++ [
|
||||
''cargo clippy --all --all-features --tests -- \
|
||||
postCheck = ''
|
||||
cargo clippy --all --all-features --tests -- \
|
||||
-D clippy::pedantic \
|
||||
-D warnings \
|
||||
-A clippy::module-name-repetitions \
|
||||
@ -31,8 +25,8 @@
|
||||
-A clippy::cast-possible-truncation \
|
||||
-A clippy::nonminimal_bool \
|
||||
-A clippy::must-use-candidate \
|
||||
-A clippy::missing-panics-doc || true''
|
||||
];
|
||||
-A clippy::missing-panics-doc
|
||||
'';
|
||||
meta.description = "Scan Nix files for dead code";
|
||||
};
|
||||
in
|
||||
|
Loading…
Reference in New Issue
Block a user