2024-08-03 22:14:17 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
rustPlatform,
|
2024-08-04 23:04:23 +00:00
|
|
|
stdenvAdapters,
|
|
|
|
llvm,
|
2024-08-03 22:14:17 +00:00
|
|
|
}: let
|
|
|
|
toml = (lib.importTOML ../Cargo.toml).package;
|
|
|
|
pname = toml.name;
|
|
|
|
inherit (toml) version;
|
|
|
|
in
|
2024-08-04 23:04:23 +00:00
|
|
|
rustPlatform.buildRustPackage.override {stdenv = stdenvAdapters.useMoldLinker llvm.stdenv;} {
|
|
|
|
RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
|
|
|
|
|
2024-08-03 22:14:17 +00:00
|
|
|
inherit pname version;
|
|
|
|
|
|
|
|
src = builtins.path {
|
|
|
|
name = "${pname}-${version}";
|
2024-08-04 23:04:23 +00:00
|
|
|
path = lib.sources.cleanSource ../.;
|
2024-08-03 22:14:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
cargoLock.lockFile = ../Cargo.lock;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "A microscopic fetch script in Rust, for NixOS systems";
|
|
|
|
homepage = "https://github.com/NotAShelf/microfetch";
|
|
|
|
license = lib.licenses.gpl3Only;
|
|
|
|
maintainers = with lib.maintainers; [NotAShelf];
|
|
|
|
mainProgram = "microfetch";
|
|
|
|
};
|
|
|
|
}
|