mirror of
https://github.com/NotAShelf/microfetch.git
synced 2026-06-22 03:43:24 +00:00
nix: drop nix-overlay; enable structuredAttrs & cleanup
Some checks are pending
Rust / Test on aarch64-unknown-linux-gnu (push) Waiting to run
Rust / Test on armv7-unknown-linux-gnueabihf (push) Waiting to run
Rust / Test on i686-unknown-linux-gnu (push) Waiting to run
Rust / Test on loongarch64-unknown-linux-gnu (push) Waiting to run
Rust / Test on powerpc-unknown-linux-gnu (push) Waiting to run
Rust / Test on powerpc64-unknown-linux-gnu (push) Waiting to run
Rust / Test on powerpc64le-unknown-linux-gnu (push) Waiting to run
Rust / Test on riscv64gc-unknown-linux-gnu (push) Waiting to run
Rust / Test on s390x-unknown-linux-gnu (push) Waiting to run
Rust / Test on sparc64-unknown-linux-gnu (push) Waiting to run
Rust / Test on mips-unknown-linux-gnu (push) Waiting to run
Rust / Test on mips64-unknown-linux-gnuabi64 (push) Waiting to run
Rust / Test on riscv32gc-unknown-linux-gnu (push) Waiting to run
Rust / Test on x86_64-unknown-linux-gnu (push) Waiting to run
Some checks are pending
Rust / Test on aarch64-unknown-linux-gnu (push) Waiting to run
Rust / Test on armv7-unknown-linux-gnueabihf (push) Waiting to run
Rust / Test on i686-unknown-linux-gnu (push) Waiting to run
Rust / Test on loongarch64-unknown-linux-gnu (push) Waiting to run
Rust / Test on powerpc-unknown-linux-gnu (push) Waiting to run
Rust / Test on powerpc64-unknown-linux-gnu (push) Waiting to run
Rust / Test on powerpc64le-unknown-linux-gnu (push) Waiting to run
Rust / Test on riscv64gc-unknown-linux-gnu (push) Waiting to run
Rust / Test on s390x-unknown-linux-gnu (push) Waiting to run
Rust / Test on sparc64-unknown-linux-gnu (push) Waiting to run
Rust / Test on mips-unknown-linux-gnu (push) Waiting to run
Rust / Test on mips64-unknown-linux-gnuabi64 (push) Waiting to run
Rust / Test on riscv32gc-unknown-linux-gnu (push) Waiting to run
Rust / Test on x86_64-unknown-linux-gnu (push) Waiting to run
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I8dc2910c36075bef0e1c00459d83e5ea6a6a6964
This commit is contained in:
parent
ff20911d30
commit
b43d88c749
3 changed files with 12 additions and 25 deletions
11
flake.nix
11
flake.nix
|
|
@ -1,21 +1,14 @@
|
||||||
{
|
{
|
||||||
description = "Microscopic fetch script in Rust, for NixOS systems";
|
description = "Microscopic fetch script in Rust, for NixOS systems";
|
||||||
inputs = {
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
|
||||||
rust-overlay = {
|
|
||||||
url = "github:oxalica/rust-overlay";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
rust-overlay,
|
|
||||||
}: let
|
}: let
|
||||||
systems = ["x86_64-linux" "aarch64-linux"];
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
forEachSystem = nixpkgs.lib.genAttrs systems;
|
forEachSystem = nixpkgs.lib.genAttrs systems;
|
||||||
pkgsForEach = system: nixpkgs.legacyPackages.${system}.extend rust-overlay.overlays.default;
|
pkgsForEach = system: nixpkgs.legacyPackages.${system};
|
||||||
in {
|
in {
|
||||||
packages = forEachSystem (system: let
|
packages = forEachSystem (system: let
|
||||||
pkgs = pkgsForEach system;
|
pkgs = pkgsForEach system;
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,15 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
makeRustPlatform,
|
rustPlatform,
|
||||||
rust-bin,
|
|
||||||
llvm,
|
llvm,
|
||||||
}: let
|
}: let
|
||||||
pname = "microfetch";
|
pname = "microfetch";
|
||||||
toml = (lib.importTOML ../Cargo.toml).workspace.package;
|
toml = (lib.importTOML ../Cargo.toml).workspace.package;
|
||||||
inherit (toml) version;
|
inherit (toml) version;
|
||||||
|
|
||||||
toolchain = rust-bin.stable.latest;
|
|
||||||
rustWithToolchain = makeRustPlatform {
|
|
||||||
cargo = toolchain.minimal;
|
|
||||||
rustc = toolchain.minimal;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
rustWithToolchain.buildRustPackage.override {inherit (llvm) stdenv;} {
|
rustPlatform.buildRustPackage.override {inherit (llvm) stdenv;} (finalAttrs: {
|
||||||
|
__structuredAttrs = true;
|
||||||
|
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
src = let
|
src = let
|
||||||
fs = lib.fileset;
|
fs = lib.fileset;
|
||||||
|
|
@ -32,16 +27,18 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoLock.lockFile = ../Cargo.lock;
|
cargoLock.lockFile = "${finalAttrs.src}/Cargo.lock";
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
buildNoDefaultFeatures = true;
|
buildNoDefaultFeatures = true;
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
strictDeps = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "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;
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
maintainers = [lib.maintainers.NotAShelf];
|
maintainers = [lib.maintainers.NotAShelf];
|
||||||
mainProgram = "microfetch";
|
mainProgram = "microfetch";
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,10 @@
|
||||||
rustc,
|
rustc,
|
||||||
mold,
|
mold,
|
||||||
clang,
|
clang,
|
||||||
rust-analyzer-unwrapped,
|
rust-analyzer,
|
||||||
rustfmt,
|
rustfmt,
|
||||||
clippy,
|
clippy,
|
||||||
taplo,
|
taplo,
|
||||||
rustPlatform,
|
|
||||||
gnuplot,
|
gnuplot,
|
||||||
}:
|
}:
|
||||||
mkShell {
|
mkShell {
|
||||||
|
|
@ -20,13 +19,11 @@ mkShell {
|
||||||
mold
|
mold
|
||||||
clang
|
clang
|
||||||
|
|
||||||
rust-analyzer-unwrapped
|
rust-analyzer
|
||||||
(rustfmt.override {asNightly = true;})
|
(rustfmt.override {asNightly = true;})
|
||||||
clippy
|
clippy
|
||||||
taplo
|
taplo
|
||||||
|
|
||||||
gnuplot # for Criterion.rs plots
|
gnuplot # for Criterion.rs plots
|
||||||
];
|
];
|
||||||
|
|
||||||
env.RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue