jnv: modernize (#395272)
This commit is contained in:
commit
f6615dc1ae
@ -2,39 +2,38 @@
|
|||||||
lib,
|
lib,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
stdenv,
|
versionCheckHook,
|
||||||
darwin,
|
nix-update-script,
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage rec {
|
|
||||||
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
pname = "jnv";
|
pname = "jnv";
|
||||||
version = "0.6.0";
|
version = "0.6.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ynqa";
|
owner = "ynqa";
|
||||||
repo = "jnv";
|
repo = "jnv";
|
||||||
rev = "v${version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-HKZ+hF5Y7vTA4EODSAd9xYJHaipv5YukTl470ejPLtM=";
|
hash = "sha256-HKZ+hF5Y7vTA4EODSAd9xYJHaipv5YukTl470ejPLtM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
useFetchCargoVendor = true;
|
useFetchCargoVendor = true;
|
||||||
cargoHash = "sha256-VLVoURqmUhhekNZ0a75bwjvSiLfaQ79IlltbmWVyBrI=";
|
cargoHash = "sha256-VLVoURqmUhhekNZ0a75bwjvSiLfaQ79IlltbmWVyBrI=";
|
||||||
|
|
||||||
buildInputs = lib.optional stdenv.hostPlatform.isDarwin (
|
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||||
with darwin.apple_sdk.frameworks;
|
versionCheckProgramArg = "--version";
|
||||||
[
|
doInstallCheck = true;
|
||||||
CoreGraphics
|
|
||||||
AppKit
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
meta = with lib; {
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
|
meta = {
|
||||||
description = "Interactive JSON filter using jq";
|
description = "Interactive JSON filter using jq";
|
||||||
mainProgram = "jnv";
|
mainProgram = "jnv";
|
||||||
homepage = "https://github.com/ynqa/jnv";
|
homepage = "https://github.com/ynqa/jnv";
|
||||||
license = with licenses; [ mit ];
|
license = with lib.licenses; [ mit ];
|
||||||
maintainers = with maintainers; [
|
maintainers = with lib.maintainers; [
|
||||||
nealfennimore
|
nealfennimore
|
||||||
nshalman
|
nshalman
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user