mirror of
https://github.com/FliegendeWurst/KIT-ILIAS-downloader.git
synced 2024-08-28 04:04:18 +00:00
![Maximilian Bosch](/assets/img/avatar_default.png)
Needed so that it builds with Rust 1.80 again, currently it fails for me with error[E0282]: type annotations needed for `Box<_>` --> /nix/store/1s1dfkw9b28iy8nbc6mybn2fx6j1cll0-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/time-0.3.34/src/format_description/parse/mod.rs:83:9 | 83 | let items = format_items | ^^^^^ ... 86 | Ok(items.into()) | ---- type must be known at this point | help: consider giving `items` an explicit type, where the placeholders `_` are specified | 83 | let items: Box<_> = format_items | ++++++++ Checking regex-automata v0.4.6 Checking nb-connect v1.2.0 Checking indicatif v0.17.8 Compiling rand v0.8.5 Checking tempfile v3.10.1 For more information about this error, try `rustc --explain E0282`. error: could not compile `time` (lib) due to 1 previous error warning: build failed, waiting for other jobs to finish...
70 lines
2.0 KiB
Nix
70 lines
2.0 KiB
Nix
{
|
|
description = "Download content from ilias.studium.kit.edu";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
crane = {
|
|
url = "github:ipetkov/crane";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, crane, ... }: let
|
|
systems = [ "x86_64-linux" ];
|
|
inherit (nixpkgs) lib;
|
|
forEachSystem = lib.genAttrs systems;
|
|
craneLib = forEachSystem (system: crane.lib.${system});
|
|
|
|
toHydraJob = with lib; foldlAttrs
|
|
(jobset: system: attrs: recursiveUpdate jobset
|
|
(mapAttrs (const (drv: { ${system} = drv; }))
|
|
(filterAttrs (name: const (name != "default")) attrs)))
|
|
{ };
|
|
|
|
builds = forEachSystem (system: (lib.fix (final: {
|
|
common = {
|
|
pname = "KIT-ILIAS-Downloader";
|
|
src = craneLib.${system}.cleanCargoSource self;
|
|
};
|
|
cargoArtifacts = craneLib.${system}.buildDepsOnly (final.common // {
|
|
doCheck = false;
|
|
});
|
|
clippy = craneLib.${system}.cargoClippy (final.common // {
|
|
inherit (final) cargoArtifacts;
|
|
cargoClippyExtraArgs = lib.escapeShellArgs [
|
|
"--all-targets"
|
|
"--"
|
|
"-D"
|
|
"warnings"
|
|
"-A"
|
|
"non-snake-case"
|
|
"-A"
|
|
"clippy::upper-case-acronyms"
|
|
];
|
|
});
|
|
format = craneLib.${system}.cargoFmt (final.common // {
|
|
inherit (final) cargoArtifacts;
|
|
});
|
|
kit-ilias-downloader = craneLib.${system}.buildPackage (final.common // {
|
|
inherit (final) cargoArtifacts;
|
|
doCheck = false;
|
|
meta.license = lib.licenses.gpl3Plus;
|
|
meta.platforms = systems;
|
|
});
|
|
})));
|
|
in {
|
|
packages = forEachSystem (system: {
|
|
default = self.packages.${system}.kit-ilias-downloader;
|
|
inherit (builds.${system}) kit-ilias-downloader;
|
|
});
|
|
checks = forEachSystem (system: {
|
|
inherit (builds.${system}) format clippy;
|
|
});
|
|
hydraJobs = {
|
|
packages = toHydraJob self.packages;
|
|
checks = toHydraJob self.checks;
|
|
};
|
|
};
|
|
}
|