figsoda 2023-06-04 22:32:56 -04:00
parent 7409480d5c
commit 0427c4cc09

View File

@ -2,31 +2,20 @@
, rustPlatform
, fetchFromGitHub
, installShellFiles
, fetchpatch
}:
rustPlatform.buildRustPackage rec {
pname = "argc";
version = "1.2.0";
version = "1.3.0";
src = fetchFromGitHub {
owner = "sigoden";
repo = pname;
rev = "v${version}";
hash = "sha256-sJINgB1cGtqLPl2RmwgChwnSrJL5TWu5AU6hfLhvmE4=";
hash = "sha256-mcJAtcGVqOQNafGu59QNcABvNNkImQ2qydZylf3a2Qs=";
};
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=";
})
];
cargoHash = "sha256-Q7jL+9EwHD0HcRpS6SQ2M625z2h/eA7cUF60zDpekZY=";
nativeBuildInputs = [ installShellFiles ];