diff --git a/nix/package.nix b/nix/package.nix index 506aea3..5bb387c 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -9,23 +9,29 @@ inherit (toml) version; in rustPlatform.buildRustPackage.override {stdenv = stdenvAdapters.useMoldLinker llvm.stdenv;} { - RUSTFLAGS = "-C link-arg=-fuse-ld=mold"; - inherit pname version; - - src = builtins.path { - name = "${pname}-${version}"; - path = lib.sources.cleanSource ../.; - }; + 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 = "A microscopic fetch script in Rust, for NixOS systems"; + description = "Microscopic fetch script in Rust, for NixOS systems"; homepage = "https://github.com/NotAShelf/microfetch"; license = lib.licenses.gpl3Only; - maintainers = with lib.maintainers; [NotAShelf]; + maintainers = [lib.maintainers.NotAShelf]; mainProgram = "microfetch"; }; }