argc: 1.1.0 -> 1.2.0
Diff: https://github.com/sigoden/argc/compare/v1.1.0...v1.2.0 Changelog: https://github.com/sigoden/argc/releases/tag/v1.2.0
This commit is contained in:
parent
43963dc23d
commit
cfae366324
|
@ -2,29 +2,34 @@
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, rust
|
, fetchpatch
|
||||||
, stdenv
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "argc";
|
pname = "argc";
|
||||||
version = "1.1.0";
|
version = "1.2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sigoden";
|
owner = "sigoden";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-db75OoFmsR03lK99vGg8+fHJENOyoDFo+uqQJNYmI9M=";
|
hash = "sha256-sJINgB1cGtqLPl2RmwgChwnSrJL5TWu5AU6hfLhvmE4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoHash = "sha256-6TC4RWDcg4el+jkq8Jal0k+2sdNsjMkMYqP/b9wP5mU=";
|
cargoHash = "sha256-HrmqARhEKlAjrW6QieVEEKkfda6R69oLcG/6fd3rvWM=";
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# tests make the assumption that the compiled binary is in target/debug,
|
||||||
|
# which fails since `cargoBuildHook` uses `--release` and `--target`
|
||||||
|
(fetchpatch {
|
||||||
|
name = "fix-tests-with-release-or-target";
|
||||||
|
url = "https://github.com/sigoden/argc/commit/a4f2db46e27cad14d3251ef0b25b6f2ea9e70f0e.patch";
|
||||||
|
hash = "sha256-bsHSo11/RVstyzdg0BKFhjuWUTLdKO4qsWIOjTTi+HQ=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
|
|
||||||
preCheck = ''
|
|
||||||
export PATH=target/${rust.toRustTarget stdenv.hostPlatform}/release:$PATH
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
installShellCompletion --cmd argc \
|
installShellCompletion --cmd argc \
|
||||||
--bash <($out/bin/argc --argc-completions bash) \
|
--bash <($out/bin/argc --argc-completions bash) \
|
||||||
|
|
Loading…
Reference in a new issue