microfetch/nix/package.nix
NotAShelf eac4882733
Some checks failed
Rust / Test on aarch64-unknown-linux-gnu (push) Has been cancelled
Rust / Test on armv7-unknown-linux-gnueabihf (push) Has been cancelled
Rust / Test on i686-unknown-linux-gnu (push) Has been cancelled
Rust / Test on loongarch64-unknown-linux-gnu (push) Has been cancelled
Rust / Test on powerpc-unknown-linux-gnu (push) Has been cancelled
Rust / Test on powerpc64-unknown-linux-gnu (push) Has been cancelled
Rust / Test on powerpc64le-unknown-linux-gnu (push) Has been cancelled
Rust / Test on riscv64gc-unknown-linux-gnu (push) Has been cancelled
Rust / Test on s390x-unknown-linux-gnu (push) Has been cancelled
Rust / Test on sparc64-unknown-linux-gnu (push) Has been cancelled
Rust / Test on mips-unknown-linux-gnu (push) Has been cancelled
Rust / Test on mips64-unknown-linux-gnuabi64 (push) Has been cancelled
Rust / Test on riscv32gc-unknown-linux-gnu (push) Has been cancelled
Rust / Test on x86_64-unknown-linux-gnu (push) Has been cancelled
nix: get Rust 1.95.0 from rust-overlay
Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: If01588c5e4399ee19bb17485f65a741b6a6a6964
2026-04-28 12:15:48 +03:00

47 lines
1.1 KiB
Nix

{
lib,
makeRustPlatform,
rust-bin,
llvm,
}: let
pname = "microfetch";
toml = (lib.importTOML ../Cargo.toml).workspace.package;
inherit (toml) version;
toolchain = rust-bin.stable.latest;
rustWithToolchain = makeRustPlatform {
cargo = toolchain.minimal;
rustc = toolchain.minimal;
};
in
rustWithToolchain.buildRustPackage.override {inherit (llvm) stdenv;} {
inherit pname version;
src = let
fs = lib.fileset;
s = ../.;
in
fs.toSource {
root = s;
fileset = fs.unions [
(s + /.cargo)
(s + /crates)
(s + /microfetch)
(s + /scripts/ld-wrapper)
(s + /Cargo.lock)
(s + /Cargo.toml)
];
};
cargoLock.lockFile = ../Cargo.lock;
enableParallelBuilding = true;
buildNoDefaultFeatures = true;
doCheck = false;
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";
};
}