mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-16 12:20:10 +00:00
Remove optional builtins prefixes from prelude functions by running:
builtins=(
abort
baseNameOf
break
derivation
derivationStrict
dirOf
false
fetchGit
fetchMercurial
fetchTarball
fetchTree
fromTOML
import
isNull
map
null
placeholder
removeAttrs
scopedImport
throw
toString
true
)
fd \
--type file \
. \
pkgs \
--exec-batch sed --in-place --regexp-extended "
s/\<builtins\.($(
printf '%s\n' "${builtins[@]}" |
paste --delimiter '|' --serial -
))\>/\1/g
"
nix fmt
60 lines
1.4 KiB
Nix
60 lines
1.4 KiB
Nix
{
|
|
fetchFromSourcehut,
|
|
just,
|
|
lib,
|
|
nix-update-script,
|
|
rustPlatform,
|
|
scdoc,
|
|
}:
|
|
let
|
|
version = "0.8.0";
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = "aba";
|
|
inherit version;
|
|
|
|
src = fetchFromSourcehut {
|
|
owner = "~onemoresuza";
|
|
repo = "aba";
|
|
tag = version;
|
|
hash = "sha256-2zVQNchL4DFh2v2/kwupJTBSmXiKqlxzUMrP9TbfCMs=";
|
|
};
|
|
|
|
cargoHash = "sha256-U1f68DY+yV6Uxwk1Re0eSNCFWYrYKCN08hJAYcp4ksE=";
|
|
|
|
nativeBuildInputs = [
|
|
just
|
|
scdoc
|
|
];
|
|
|
|
postPatch = ''
|
|
# Let only nix strip the binary by disabling cargo's `strip = true`, like
|
|
# buildRustPackage does when not using just's setup hooks.
|
|
sed -i '/strip[[:space:]]*=[[:space:]]*true/s/true/false/' ./Cargo.toml
|
|
'';
|
|
|
|
preBuild = ''
|
|
justFlagsArray+=(
|
|
PREFIX=${placeholder "out"}
|
|
MANIFEST_OPTS="--frozen --locked --profile=release"
|
|
INSTALL_OPTS="--no-track"
|
|
)
|
|
'';
|
|
|
|
# There are no tests
|
|
doCheck = false;
|
|
dontUseJustCheck = true;
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "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";
|
|
};
|
|
}
|