2023-11-16 04:20:00 +00:00
|
|
|
{ fetchFromSourcehut
|
|
|
|
, just
|
|
|
|
, lib
|
|
|
|
, nix-update-script
|
|
|
|
, rustPlatform
|
|
|
|
, scdoc
|
|
|
|
}:
|
|
|
|
let
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.8.0";
|
2023-11-16 04:20:00 +00:00
|
|
|
in
|
|
|
|
rustPlatform.buildRustPackage {
|
|
|
|
pname = "aba";
|
|
|
|
inherit version;
|
|
|
|
|
|
|
|
src = fetchFromSourcehut {
|
|
|
|
owner = "~onemoresuza";
|
|
|
|
repo = "aba";
|
|
|
|
rev = version;
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-2zVQNchL4DFh2v2/kwupJTBSmXiKqlxzUMrP9TbfCMs=";
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
cargoHash = "sha256-YhSzbfcEIJjKWlyYq1lK70qt4f/Z71n7hgaaZ/D/U80=";
|
2023-11-16 04:20:00 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
just
|
|
|
|
scdoc
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
# Let only nix strip the binary by disabling cargo's `strip = true`, like
|
|
|
|
# buildRustPackage does when not using just's setup hooks.
|
2023-11-16 04:20:00 +00:00
|
|
|
sed -i '/strip[[:space:]]*=[[:space:]]*true/s/true/false/' ./Cargo.toml
|
|
|
|
'';
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
justFlagsArray+=(
|
|
|
|
PREFIX=${builtins.placeholder "out"}
|
|
|
|
MANIFEST_OPTS="--frozen --locked --profile=release"
|
2024-01-02 11:29:13 +00:00
|
|
|
INSTALL_OPTS="--no-track"
|
2023-11-16 04:20:00 +00:00
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
# There are no tests
|
|
|
|
doCheck = false;
|
|
|
|
dontUseJustCheck = true;
|
|
|
|
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "An address book for aerc";
|
|
|
|
homepage = "https://sr.ht/~onemoresuza/aba/";
|
|
|
|
changelog = "https://git.sr.ht/~onemoresuza/aba/tree/main/item/CHANGELOG.md";
|
|
|
|
downloadPage = "https://git.sr.ht/~onemoresuza/aba/refs/${version}";
|
|
|
|
maintainers = with lib.maintainers; [ onemoresuza ];
|
|
|
|
license = lib.licenses.isc;
|
|
|
|
mainProgram = "aba";
|
|
|
|
};
|
|
|
|
}
|