1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-31 04:27:45 +00:00

feat: update inputs and format

This commit is contained in:
Kevin Amado 2022-01-30 21:56:25 -05:00
parent 969023c1d6
commit 4a45bf1de4
No known key found for this signature in database
GPG key ID: FFF341057F503148
3 changed files with 51 additions and 51 deletions

View file

@ -29,56 +29,56 @@
system:
let
nixpkgs = import inputs.nixpkgs { inherit system; };
cargoToml = builtins.fromTOML ( builtins.readFile ./Cargo.toml );
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
treefmt = inputs.treefmt.defaultPackage.${ system };
fenix = inputs.fenix.packages.${ system };
fenixPlatform = nixpkgs.makeRustPlatform { inherit ( fenix.latest ) cargo rustc; };
fenixPlatform = nixpkgs.makeRustPlatform { inherit (fenix.latest) cargo rustc; };
in
{
checks = { defaultPackage = inputs.self.defaultPackage.${ system }; };
defaultApp = {
type = "app";
program = "${ inputs.self.defaultPackage.${ system } }/bin/alejandra";
};
defaultPackage =
fenixPlatform.buildRustPackage
{
pname = cargoToml.package.name;
version =
let
commit = inputs.self.shortRev or "dirty";
date = inputs.self.lastModifiedDate or inputs.self.lastModified or "19700101";
in
"${ builtins.substring 0 8 date }_${ commit }";
src = inputs.self.sourceInfo;
cargoLock.lockFile = ./Cargo.lock;
meta = {
description = cargoToml.package.description;
homepage = "https://github.com/kamadorueda/alejandra";
license = nixpkgs.lib.licenses.unlicense;
maintainers = [ nixpkgs.lib.maintainers.kamadorueda ];
{
checks = { defaultPackage = inputs.self.defaultPackage.${ system }; };
defaultApp = {
type = "app";
program = "${ inputs.self.defaultPackage.${ system } }/bin/alejandra";
};
defaultPackage =
fenixPlatform.buildRustPackage
{
pname = cargoToml.package.name;
version =
let
commit = inputs.self.shortRev or "dirty";
date = inputs.self.lastModifiedDate or inputs.self.lastModified or "19700101";
in
"${ builtins.substring 0 8 date }_${ commit }";
src = inputs.self.sourceInfo;
cargoLock.lockFile = ./Cargo.lock;
meta = {
description = cargoToml.package.description;
homepage = "https://github.com/kamadorueda/alejandra";
license = nixpkgs.lib.licenses.unlicense;
maintainers = [ nixpkgs.lib.maintainers.kamadorueda ];
};
};
};
devShell =
nixpkgs.mkShell
{
name = "Alejandra";
packages = [
fenix.rust-analyzer
fenix.latest.cargo
fenix.latest.clippy
fenix.latest.rust-src
fenix.latest.rustc
fenix.latest.rustfmt
inputs.alejandra.outputs.defaultPackage.${ system }
nixpkgs.jq
nixpkgs.nodejs
nixpkgs.nodePackages.prettier
nixpkgs.nodePackages.prettier-plugin-toml
nixpkgs.shfmt
treefmt
];
};
}
devShell =
nixpkgs.mkShell
{
name = "Alejandra";
packages = [
fenix.rust-analyzer
fenix.latest.cargo
fenix.latest.clippy
fenix.latest.rust-src
fenix.latest.rustc
fenix.latest.rustfmt
inputs.alejandra.outputs.defaultPackage.${ system }
nixpkgs.jq
nixpkgs.nodejs
nixpkgs.nodePackages.prettier
nixpkgs.nodePackages.prettier-plugin-toml
nixpkgs.shfmt
treefmt
];
};
}
);
}