mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-11-25 16:52:50 +00:00
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9761b908d05efd7dc10d53c54ca80fb26a6a6964
37 lines
969 B
Nix
37 lines
969 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
stdenvAdapters,
|
|
llvm,
|
|
}: let
|
|
toml = (lib.importTOML ../Cargo.toml).package;
|
|
pname = toml.name;
|
|
inherit (toml) version;
|
|
in
|
|
rustPlatform.buildRustPackage.override {stdenv = stdenvAdapters.useMoldLinker llvm.stdenv;} {
|
|
inherit pname version;
|
|
src = let
|
|
fs = lib.fileset;
|
|
s = ../.;
|
|
in
|
|
fs.toSource {
|
|
root = s;
|
|
fileset = fs.unions [
|
|
(fs.fileFilter (file: builtins.any file.hasExt ["rs"]) (s + /src))
|
|
(s + /Cargo.lock)
|
|
(s + /Cargo.toml)
|
|
];
|
|
};
|
|
|
|
cargoLock.lockFile = ../Cargo.lock;
|
|
enableParallelBuilding = true;
|
|
env.RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
|
|
|
|
meta = {
|
|
description = "Microscopic fetch script in Rust, for NixOS systems";
|
|
homepage = "https://github.com/NotAShelf/microfetch";
|
|
license = lib.licenses.gpl3Only;
|
|
maintainers = [lib.maintainers.NotAShelf];
|
|
mainProgram = "microfetch";
|
|
};
|
|
}
|