motus: sort attributes in a more logical order
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
libxcb,
|
||||
nix-update-script,
|
||||
rustPlatform,
|
||||
stdenv,
|
||||
libxcb,
|
||||
versionCheckHook,
|
||||
withClipboard ? true,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
__structuredAttrs = true;
|
||||
|
||||
pname = "motus";
|
||||
version = "0.4.0";
|
||||
|
||||
@@ -23,8 +24,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
||||
cargoHash = "sha256-6MKEHnB2MJVB4cNvz3JYlhuzxhzsA+Pq5OkpLNoAEyU=";
|
||||
|
||||
buildAndTestSubdir = "crates/motus-cli";
|
||||
|
||||
# The CLI crate version was not bumped to match the v0.4.0 release tag:
|
||||
# https://github.com/oleiade/motus/issues/58
|
||||
postPatch = ''
|
||||
@@ -32,12 +31,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
--replace-fail '#[command(version = "0.3.1")]' '#[command(version = "${finalAttrs.version}")]'
|
||||
'';
|
||||
|
||||
buildNoDefaultFeatures = !withClipboard;
|
||||
|
||||
buildInputs = lib.optionals (withClipboard && stdenv.hostPlatform.isLinux) [ libxcb ];
|
||||
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
buildAndTestSubdir = "crates/motus-cli";
|
||||
buildNoDefaultFeatures = !withClipboard;
|
||||
|
||||
doInstallCheck = true;
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user