mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 11:48:13 +01:00
nixfmt
This commit is contained in:
34
default.nix
34
default.nix
@@ -11,25 +11,25 @@
|
|||||||
(makeRustPlatform {
|
(makeRustPlatform {
|
||||||
cargo = rust;
|
cargo = rust;
|
||||||
rustc = rust;
|
rustc = rust;
|
||||||
})
|
}).buildRustPackage
|
||||||
.buildRustPackage {
|
{
|
||||||
pname = packageToml.name;
|
pname = packageToml.name;
|
||||||
inherit (packageToml) version;
|
inherit (packageToml) version;
|
||||||
|
|
||||||
src = builtins.path {
|
src = builtins.path {
|
||||||
path = ./.;
|
path = ./.;
|
||||||
inherit (packageToml) name;
|
inherit (packageToml) name;
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUseCargoParallelTests = true;
|
dontUseCargoParallelTests = true;
|
||||||
|
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
|
||||||
nativeBuildInputs = [rust];
|
nativeBuildInputs = [ rust ];
|
||||||
buildInputs = lib.optional stdenv.isDarwin [
|
buildInputs = lib.optional stdenv.isDarwin [
|
||||||
libiconv
|
libiconv
|
||||||
darwin.apple_sdk.frameworks.Foundation
|
darwin.apple_sdk.frameworks.Foundation
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [python3];
|
nativeCheckInputs = [ python3 ];
|
||||||
}
|
}
|
||||||
|
|||||||
65
flake.nix
65
flake.nix
@@ -7,36 +7,45 @@
|
|||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ {
|
outputs =
|
||||||
flake-parts,
|
inputs@{
|
||||||
rust-overlay,
|
flake-parts,
|
||||||
...
|
rust-overlay,
|
||||||
}:
|
...
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
}:
|
||||||
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
perSystem = {
|
systems = [
|
||||||
self',
|
"x86_64-linux"
|
||||||
pkgs,
|
"aarch64-linux"
|
||||||
system,
|
"aarch64-darwin"
|
||||||
...
|
"x86_64-darwin"
|
||||||
}: let
|
];
|
||||||
packageToml = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package;
|
perSystem =
|
||||||
in {
|
{
|
||||||
formatter = pkgs.alejandra;
|
self',
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
packageToml = (builtins.fromTOML (builtins.readFile ./Cargo.toml)).package;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
formatter = pkgs.alejandra;
|
||||||
|
|
||||||
_module.args = {
|
_module.args = {
|
||||||
pkgs = import inputs.nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [(import rust-overlay)];
|
overlays = [ (import rust-overlay) ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells = pkgs.callPackages ./shell.nix { inherit pkgs packageToml self'; };
|
||||||
|
|
||||||
|
packages.default = pkgs.callPackage ./default.nix {
|
||||||
|
inherit packageToml;
|
||||||
|
rust = pkgs.rust-bin.stable.latest.minimal;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells = pkgs.callPackages ./shell.nix {inherit pkgs packageToml self';};
|
|
||||||
|
|
||||||
packages.default = pkgs.callPackage ./default.nix {
|
|
||||||
inherit packageToml;
|
|
||||||
rust = pkgs.rust-bin.stable.latest.minimal;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user