mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-11-26 01:02:50 +00:00
nix: streamline source filter; move RUSTFLAGS to env attrs
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I9761b908d05efd7dc10d53c54ca80fb26a6a6964
This commit is contained in:
parent
1d69d3107c
commit
d438800738
1 changed files with 15 additions and 9 deletions
|
|
@ -9,23 +9,29 @@
|
||||||
inherit (toml) version;
|
inherit (toml) version;
|
||||||
in
|
in
|
||||||
rustPlatform.buildRustPackage.override {stdenv = stdenvAdapters.useMoldLinker llvm.stdenv;} {
|
rustPlatform.buildRustPackage.override {stdenv = stdenvAdapters.useMoldLinker llvm.stdenv;} {
|
||||||
RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
|
|
||||||
|
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
|
src = let
|
||||||
src = builtins.path {
|
fs = lib.fileset;
|
||||||
name = "${pname}-${version}";
|
s = ../.;
|
||||||
path = lib.sources.cleanSource ../.;
|
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;
|
cargoLock.lockFile = ../Cargo.lock;
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
env.RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A microscopic fetch script in Rust, for NixOS systems";
|
description = "Microscopic fetch script in Rust, for NixOS systems";
|
||||||
homepage = "https://github.com/NotAShelf/microfetch";
|
homepage = "https://github.com/NotAShelf/microfetch";
|
||||||
license = lib.licenses.gpl3Only;
|
license = lib.licenses.gpl3Only;
|
||||||
maintainers = with lib.maintainers; [NotAShelf];
|
maintainers = [lib.maintainers.NotAShelf];
|
||||||
mainProgram = "microfetch";
|
mainProgram = "microfetch";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue