feat: Add rustfilt
All checks were successful
Hydra rustfilt.x86_64-linux Hydra build #2604 of dark-kirb:rust-binaries:rustfilt.x86_64-linux
Hydra rustfilt.aarch64-linux Hydra build #2605 of dark-kirb:rust-binaries:rustfilt.aarch64-linux
Hydra rustfilt.i686-linux Hydra build #2606 of dark-kirb:rust-binaries:rustfilt.i686-linux
All checks were successful
Hydra rustfilt.x86_64-linux Hydra build #2604 of dark-kirb:rust-binaries:rustfilt.x86_64-linux
Hydra rustfilt.aarch64-linux Hydra build #2605 of dark-kirb:rust-binaries:rustfilt.aarch64-linux
Hydra rustfilt.i686-linux Hydra build #2606 of dark-kirb:rust-binaries:rustfilt.i686-linux
This commit is contained in:
parent
4a37c8d2a2
commit
50c7d32dc0
3 changed files with 282 additions and 3 deletions
17
flake.lock
17
flake.lock
|
@ -27,7 +27,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"flake-ut1ils": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
|
@ -42,6 +42,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "flake-utils",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1646512003,
|
||||
|
@ -60,6 +74,7 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"cargo2nix": "cargo2nix",
|
||||
"flake-ut1ils": "flake-ut1ils",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"rust-overlay": "rust-overlay"
|
||||
|
|
19
flake.nix
19
flake.nix
|
@ -3,7 +3,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = github:NixOS/nixpkgs;
|
||||
flake-utils.url = github:numtide/flake-utils;
|
||||
flake-ut1ils.url = github:numtide/flake-utils;
|
||||
rust-overlay.url = github:oxalica/rust-overlay;
|
||||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||
rust-overlay.inputs.flake-utils.follows = "flake-utils";
|
||||
|
@ -35,9 +35,24 @@
|
|||
packageOverrides = pkgs: pkgs.rustBuilder.overrides.all;
|
||||
rustChannel = "1.59.0";
|
||||
};
|
||||
rustfilt = pkgs.rustBuilder.makePackageSet' {
|
||||
packageFun = import ./rustfilt/Cargo.nix;
|
||||
workspaceSrc = pkgs.fetchFromGitHub {
|
||||
owner = "luser";
|
||||
repo = "rustfilt";
|
||||
rev = "3c81f107b73fdcf7bbb98b426c1214f15946ec90";
|
||||
sha256 = "508827a420b764439c1c8ef15d330d91d3b89876abd54f340590c9b19dd6d212";
|
||||
};
|
||||
packageOverrides = pkgs: pkgs.rustBuilder.overrides.all;
|
||||
rustChannel = "1.59.0";
|
||||
};
|
||||
workspace = pkgs.lib.lists.foldr (a: b: a // b) {} [
|
||||
git-mit.workspace
|
||||
rustfilt.workspace
|
||||
];
|
||||
in
|
||||
rec {
|
||||
packages = builtins.mapAttrs (_: f: (f { }).bin) git-mit.workspace;
|
||||
packages = builtins.mapAttrs (_: f: (f { }).bin) workspace;
|
||||
hydraJobs = packages;
|
||||
});
|
||||
}
|
||||
|
|
249
rustfilt/Cargo.nix
Normal file
249
rustfilt/Cargo.nix
Normal file
|
@ -0,0 +1,249 @@
|
|||
# This file was @generated by cargo2nix 0.11.0.
|
||||
# It is not intended to be manually edited.
|
||||
|
||||
args@{
|
||||
release ? true,
|
||||
rootFeatures ? [
|
||||
"rustfilt/default"
|
||||
],
|
||||
rustPackages,
|
||||
buildRustPackages,
|
||||
hostPlatform,
|
||||
hostPlatformCpu ? null,
|
||||
hostPlatformFeatures ? [],
|
||||
target ? null,
|
||||
codegenOpts ? null,
|
||||
profileOpts ? null,
|
||||
mkRustCrate,
|
||||
rustLib,
|
||||
lib,
|
||||
workspaceSrc,
|
||||
}:
|
||||
let
|
||||
workspaceSrc = if args.workspaceSrc == null then ./. else args.workspaceSrc;
|
||||
in let
|
||||
inherit (rustLib) fetchCratesIo fetchCrateLocal fetchCrateGit fetchCrateAlternativeRegistry expandFeatures decideProfile genDrvsByProfile;
|
||||
profilesByName = {
|
||||
release = builtins.fromTOML "lto = true\n";
|
||||
};
|
||||
rootFeatures' = expandFeatures rootFeatures;
|
||||
overridableMkRustCrate = f:
|
||||
let
|
||||
drvs = genDrvsByProfile profilesByName ({ profile, profileName }: mkRustCrate ({ inherit release profile hostPlatformCpu hostPlatformFeatures target profileOpts codegenOpts; } // (f profileName)));
|
||||
in { compileMode ? null, profileName ? decideProfile compileMode release }:
|
||||
let drv = drvs.${profileName}; in if compileMode == null then drv else drv.override { inherit compileMode; };
|
||||
in
|
||||
{
|
||||
cargo2nixVersion = "0.11.0";
|
||||
workspace = {
|
||||
rustfilt = rustPackages.unknown.rustfilt."0.2.2-alpha.0";
|
||||
};
|
||||
"registry+https://github.com/rust-lang/crates.io-index".aho-corasick."0.7.3" = overridableMkRustCrate (profileName: rec {
|
||||
name = "aho-corasick";
|
||||
version = "0.7.3";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c"; };
|
||||
features = builtins.concatLists [
|
||||
[ "default" ]
|
||||
[ "std" ]
|
||||
];
|
||||
dependencies = {
|
||||
memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.2.0" { inherit profileName; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".bitflags."1.1.0" = overridableMkRustCrate (profileName: rec {
|
||||
name = "bitflags";
|
||||
version = "1.1.0";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "3d155346769a6855b86399e9bc3814ab343cd3d62c7e985113d46a0ec3c281fd"; };
|
||||
features = builtins.concatLists [
|
||||
[ "default" ]
|
||||
];
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".clap."2.33.0" = overridableMkRustCrate (profileName: rec {
|
||||
name = "clap";
|
||||
version = "2.33.0";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9"; };
|
||||
features = builtins.concatLists [
|
||||
[ "term_size" ]
|
||||
[ "wrap_help" ]
|
||||
];
|
||||
dependencies = {
|
||||
bitflags = rustPackages."registry+https://github.com/rust-lang/crates.io-index".bitflags."1.1.0" { inherit profileName; };
|
||||
term_size = rustPackages."registry+https://github.com/rust-lang/crates.io-index".term_size."0.3.1" { inherit profileName; };
|
||||
textwrap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".textwrap."0.11.0" { inherit profileName; };
|
||||
unicode_width = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-width."0.1.5" { inherit profileName; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".kernel32-sys."0.2.2" = overridableMkRustCrate (profileName: rec {
|
||||
name = "kernel32-sys";
|
||||
version = "0.2.2";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"; };
|
||||
dependencies = {
|
||||
winapi = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.2.8" { inherit profileName; };
|
||||
};
|
||||
buildDependencies = {
|
||||
build = buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi-build."0.1.1" { profileName = "__noProfile"; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.3.0" = overridableMkRustCrate (profileName: rec {
|
||||
name = "lazy_static";
|
||||
version = "1.3.0";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"; };
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".libc."0.2.58" = overridableMkRustCrate (profileName: rec {
|
||||
name = "libc";
|
||||
version = "0.2.58";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "6281b86796ba5e4366000be6e9e18bf35580adf9e63fbe2294aadb587613a319"; };
|
||||
features = builtins.concatLists [
|
||||
[ "default" ]
|
||||
[ "std" ]
|
||||
];
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".memchr."2.2.0" = overridableMkRustCrate (profileName: rec {
|
||||
name = "memchr";
|
||||
version = "2.2.0";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"; };
|
||||
features = builtins.concatLists [
|
||||
[ "default" ]
|
||||
[ "use_std" ]
|
||||
];
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".regex."1.1.7" = overridableMkRustCrate (profileName: rec {
|
||||
name = "regex";
|
||||
version = "1.1.7";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "0b2f0808e7d7e4fb1cb07feb6ff2f4bc827938f24f8c2e6a3beb7370af544bdd"; };
|
||||
features = builtins.concatLists [
|
||||
[ "default" ]
|
||||
[ "use_std" ]
|
||||
];
|
||||
dependencies = {
|
||||
aho_corasick = rustPackages."registry+https://github.com/rust-lang/crates.io-index".aho-corasick."0.7.3" { inherit profileName; };
|
||||
memchr = rustPackages."registry+https://github.com/rust-lang/crates.io-index".memchr."2.2.0" { inherit profileName; };
|
||||
regex_syntax = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.7" { inherit profileName; };
|
||||
thread_local = rustPackages."registry+https://github.com/rust-lang/crates.io-index".thread_local."0.3.6" { inherit profileName; };
|
||||
utf8_ranges = rustPackages."registry+https://github.com/rust-lang/crates.io-index".utf8-ranges."1.0.3" { inherit profileName; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".regex-syntax."0.6.7" = overridableMkRustCrate (profileName: rec {
|
||||
name = "regex-syntax";
|
||||
version = "0.6.7";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "9d76410686f9e3a17f06128962e0ecc5755870bb890c34820c7af7f1db2e1d48"; };
|
||||
dependencies = {
|
||||
ucd_util = rustPackages."registry+https://github.com/rust-lang/crates.io-index".ucd-util."0.1.3" { inherit profileName; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".rustc-demangle."0.1.15" = overridableMkRustCrate (profileName: rec {
|
||||
name = "rustc-demangle";
|
||||
version = "0.1.15";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af"; };
|
||||
});
|
||||
|
||||
"unknown".rustfilt."0.2.2-alpha.0" = overridableMkRustCrate (profileName: rec {
|
||||
name = "rustfilt";
|
||||
version = "0.2.2-alpha.0";
|
||||
registry = "unknown";
|
||||
src = fetchCrateLocal workspaceSrc;
|
||||
dependencies = {
|
||||
clap = rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap."2.33.0" { inherit profileName; };
|
||||
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.3.0" { inherit profileName; };
|
||||
regex = rustPackages."registry+https://github.com/rust-lang/crates.io-index".regex."1.1.7" { inherit profileName; };
|
||||
rustc_demangle = rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustc-demangle."0.1.15" { inherit profileName; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".term_size."0.3.1" = overridableMkRustCrate (profileName: rec {
|
||||
name = "term_size";
|
||||
version = "0.3.1";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "9e5b9a66db815dcfd2da92db471106457082577c3c278d4138ab3e3b4e189327"; };
|
||||
features = builtins.concatLists [
|
||||
[ "default" ]
|
||||
];
|
||||
dependencies = {
|
||||
${ if hostPlatform.parsed.kernel.name == "windows" then "kernel32" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".kernel32-sys."0.2.2" { inherit profileName; };
|
||||
${ if !(hostPlatform.parsed.kernel.name == "windows") then "libc" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".libc."0.2.58" { inherit profileName; };
|
||||
${ if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null } = rustPackages."registry+https://github.com/rust-lang/crates.io-index".winapi."0.2.8" { inherit profileName; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".textwrap."0.11.0" = overridableMkRustCrate (profileName: rec {
|
||||
name = "textwrap";
|
||||
version = "0.11.0";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"; };
|
||||
features = builtins.concatLists [
|
||||
[ "term_size" ]
|
||||
];
|
||||
dependencies = {
|
||||
term_size = rustPackages."registry+https://github.com/rust-lang/crates.io-index".term_size."0.3.1" { inherit profileName; };
|
||||
unicode_width = rustPackages."registry+https://github.com/rust-lang/crates.io-index".unicode-width."0.1.5" { inherit profileName; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".thread_local."0.3.6" = overridableMkRustCrate (profileName: rec {
|
||||
name = "thread_local";
|
||||
version = "0.3.6";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"; };
|
||||
dependencies = {
|
||||
lazy_static = rustPackages."registry+https://github.com/rust-lang/crates.io-index".lazy_static."1.3.0" { inherit profileName; };
|
||||
};
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".ucd-util."0.1.3" = overridableMkRustCrate (profileName: rec {
|
||||
name = "ucd-util";
|
||||
version = "0.1.3";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86"; };
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".unicode-width."0.1.5" = overridableMkRustCrate (profileName: rec {
|
||||
name = "unicode-width";
|
||||
version = "0.1.5";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526"; };
|
||||
features = builtins.concatLists [
|
||||
[ "default" ]
|
||||
];
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".utf8-ranges."1.0.3" = overridableMkRustCrate (profileName: rec {
|
||||
name = "utf8-ranges";
|
||||
version = "1.0.3";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "9d50aa7650df78abf942826607c62468ce18d9019673d4a2ebe1865dbb96ffde"; };
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".winapi."0.2.8" = overridableMkRustCrate (profileName: rec {
|
||||
name = "winapi";
|
||||
version = "0.2.8";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"; };
|
||||
});
|
||||
|
||||
"registry+https://github.com/rust-lang/crates.io-index".winapi-build."0.1.1" = overridableMkRustCrate (profileName: rec {
|
||||
name = "winapi-build";
|
||||
version = "0.1.1";
|
||||
registry = "registry+https://github.com/rust-lang/crates.io-index";
|
||||
src = fetchCratesIo { inherit name version; sha256 = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"; };
|
||||
});
|
||||
|
||||
}
|
Loading…
Reference in a new issue