mirror of
https://github.com/RGBCube/alejandra
synced 2025-07-30 12:07:46 +00:00
Merge pull request #150 from kamadorueda/kamadorueda
feat: crosscompile more
This commit is contained in:
commit
4eab73ad78
3 changed files with 56 additions and 60 deletions
|
@ -17,6 +17,8 @@ Types of changes
|
||||||
- Security in case of vulnerabilities.
|
- Security in case of vulnerabilities.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
## [0.3.0] - 2022-02-18
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Let-in expressions are now indented in the top-level of a file.
|
- Let-in expressions are now indented in the top-level of a file.
|
||||||
|
@ -153,7 +155,8 @@ Types of changes
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[unreleased]: https://github.com/kamadorueda/alejandra/compare/0.2.0...HEAD
|
[unreleased]: https://github.com/kamadorueda/alejandra/compare/0.3.0...HEAD
|
||||||
|
[0.2.0]: https://github.com/kamadorueda/alejandra/compare/0.2.0...0.3.0
|
||||||
[0.2.0]: https://github.com/kamadorueda/alejandra/compare/0.1.0...0.2.0
|
[0.2.0]: https://github.com/kamadorueda/alejandra/compare/0.1.0...0.2.0
|
||||||
[0.1.0]: https://github.com/kamadorueda/alejandra/compare/0.0.0...0.1.0
|
[0.1.0]: https://github.com/kamadorueda/alejandra/compare/0.0.0...0.1.0
|
||||||
[0.0.0]: https://github.com/kamadorueda/alejandra/compare/6adfbe8516bf6d9e896534e01118e1bc41f65425...0.0.0
|
[0.0.0]: https://github.com/kamadorueda/alejandra/compare/6adfbe8516bf6d9e896534e01118e1bc41f65425...0.0.0
|
||||||
|
|
|
@ -1,43 +1,15 @@
|
||||||
steps:
|
steps:
|
||||||
- label: build
|
- label: build
|
||||||
command:
|
|
||||||
- nix build
|
|
||||||
|
|
||||||
- label: cache
|
|
||||||
if: build.branch == "main"
|
if: build.branch == "main"
|
||||||
agents:
|
agents:
|
||||||
queue: private
|
queue: private
|
||||||
artifacts:
|
artifacts:
|
||||||
# Builds on: aarch64-darwin
|
- alejandra-*
|
||||||
# - alejandra-aarch64-apple-darwin
|
|
||||||
|
|
||||||
# Builds on: aarch64-linux, x86_64-linux
|
|
||||||
- alejandra-aarch64-unknown-linux-musl
|
|
||||||
|
|
||||||
# Builds on: x86_64-darwin
|
|
||||||
# - alejandra-x86_64-apple-darwin
|
|
||||||
|
|
||||||
# Builds on: x86_64-linux
|
|
||||||
- alejandra-x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
# Builds on: x86_64-linux
|
|
||||||
- alejandra-x86_64-unknown-linux-musl
|
|
||||||
command:
|
command:
|
||||||
- echo +++
|
- echo +++
|
||||||
- nix build .#alejandra-aarch64-unknown-linux-musl
|
- nix build .#alejandra-binaries
|
||||||
- cachix push alejandra result
|
- cachix push alejandra result
|
||||||
- cp -L result/bin/alejandra alejandra-aarch64-unknown-linux-musl
|
- cp -L result/* .
|
||||||
|
|
||||||
- nix build .#alejandra-x86_64-unknown-linux-gnu
|
|
||||||
- cachix push alejandra result
|
|
||||||
- cp -L result/bin/alejandra alejandra-x86_64-unknown-linux-gnu
|
|
||||||
|
|
||||||
- nix build .#alejandra-x86_64-unknown-linux-musl
|
|
||||||
- cachix push alejandra result
|
|
||||||
- cp -L result/bin/alejandra alejandra-x86_64-unknown-linux-musl
|
|
||||||
|
|
||||||
- nix develop --profile develop --command true
|
|
||||||
- cachix push alejandra develop
|
|
||||||
|
|
||||||
- label: coverage
|
- label: coverage
|
||||||
if: build.branch == "main"
|
if: build.branch == "main"
|
||||||
|
@ -102,13 +74,6 @@ steps:
|
||||||
- echo +++ Derivations count
|
- echo +++ Derivations count
|
||||||
- grep -c drvPath= closure-after.txt
|
- grep -c drvPath= closure-after.txt
|
||||||
|
|
||||||
- label: integrations-vscode
|
|
||||||
if: build.branch != "main"
|
|
||||||
artifacts:
|
|
||||||
- alejandra.vsix
|
|
||||||
command:
|
|
||||||
- nix build --out-link alejandra.vsix .#alejandra-vscode-vsix
|
|
||||||
|
|
||||||
- label: flake check
|
- label: flake check
|
||||||
command:
|
command:
|
||||||
- echo +++
|
- echo +++
|
||||||
|
|
70
flake.nix
70
flake.nix
|
@ -26,14 +26,14 @@
|
||||||
cargoLock.lockFile = ./Cargo.lock;
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
|
|
||||||
passthru.tests = {
|
passthru.tests = {
|
||||||
version = nixpkgs.testVersion {package = super.alejandra;};
|
version = self.testVersion {package = super.alejandra;};
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "The Uncompromising Nix Code Formatter.";
|
description = "The Uncompromising Nix Code Formatter.";
|
||||||
homepage = "https://github.com/kamadorueda/alejandra";
|
homepage = "https://github.com/kamadorueda/alejandra";
|
||||||
license = self.lib.licenses.unlicense;
|
license = self.lib.licenses.unlicense;
|
||||||
maintainers = [nixpkgs.lib.maintainers.kamadorueda];
|
maintainers = [self.lib.maintainers.kamadorueda];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -41,11 +41,6 @@
|
||||||
];
|
];
|
||||||
system = host;
|
system = host;
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs."aarch64-darwin" = nixpkgsForHost "aarch64-darwin";
|
|
||||||
nixpkgs."aarch64-linux" = nixpkgsForHost "aarch64-linux";
|
|
||||||
nixpkgs."x86_64-darwin" = nixpkgsForHost "x86_64-darwin";
|
|
||||||
nixpkgs."x86_64-linux" = nixpkgsForHost "x86_64-linux";
|
|
||||||
in rec {
|
in rec {
|
||||||
checks."aarch64-darwin" = packages."aarch64-darwin";
|
checks."aarch64-darwin" = packages."aarch64-darwin";
|
||||||
checks."aarch64-linux" = packages."aarch64-linux";
|
checks."aarch64-linux" = packages."aarch64-linux";
|
||||||
|
@ -74,21 +69,54 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit nixpkgs;
|
nixpkgs."aarch64-darwin" = nixpkgsForHost "aarch64-darwin";
|
||||||
|
nixpkgs."aarch64-linux" = nixpkgsForHost "aarch64-linux";
|
||||||
|
nixpkgs."x86_64-darwin" = nixpkgsForHost "x86_64-darwin";
|
||||||
|
nixpkgs."x86_64-linux" = nixpkgsForHost "x86_64-linux";
|
||||||
|
|
||||||
packages."aarch64-darwin"."alejandra-aarch64-apple-darwin" = nixpkgs."aarch64-darwin".alejandra;
|
packages."aarch64-darwin" = with nixpkgs."aarch64-darwin"; {
|
||||||
packages."aarch64-linux"."alejandra-aarch64-unknown-linux-musl" = nixpkgs."aarch64-linux".alejandra;
|
"alejandra-aarch64-apple-darwin" = alejandra;
|
||||||
packages."x86_64-darwin"."alejandra-x86_64-apple-darwin" = nixpkgs."x86_64-darwin".alejandra;
|
|
||||||
packages."x86_64-linux"."alejandra-aarch64-unknown-linux-musl" = nixpkgs."x86_64-linux".pkgsCross.aarch64-multiplatform-musl.alejandra;
|
|
||||||
packages."x86_64-linux"."alejandra-x86_64-unknown-linux-gnu" = nixpkgs."x86_64-linux".alejandra;
|
|
||||||
packages."x86_64-linux"."alejandra-x86_64-unknown-linux-musl" = nixpkgs."x86_64-linux".pkgsCross.musl64.alejandra;
|
|
||||||
|
|
||||||
packages."x86_64-linux"."alejandra-vscode-vsix" = nixpkgs."x86_64-linux".mkYarnPackage {
|
|
||||||
name = "alejandra";
|
|
||||||
src = ./integrations/vscode;
|
|
||||||
packageJSON = ./integrations/vscode/package.json;
|
|
||||||
yarnLock = ./integrations/vscode/yarn.lock;
|
|
||||||
yarnNix = ./integrations/vscode/yarn.lock.nix;
|
|
||||||
};
|
};
|
||||||
|
packages."aarch64-linux" = with nixpkgs."aarch64-linux"; {
|
||||||
|
"alejandra-aarch64-unknown-linux-musl" = alejandra;
|
||||||
|
};
|
||||||
|
packages."x86_64-darwin" = with nixpkgs."x86_64-darwin"; {
|
||||||
|
"alejandra-x86_64-apple-darwin" = alejandra;
|
||||||
|
};
|
||||||
|
packages."x86_64-linux" = with nixpkgs."x86_64-linux"; let
|
||||||
|
binaries = with pkgsCross; {
|
||||||
|
"alejandra-aarch64-unknown-linux-gnu" = aarch64-multiplatform.alejandra;
|
||||||
|
"alejandra-aarch64-unknown-linux-musl" = aarch64-multiplatform-musl.alejandra;
|
||||||
|
"alejandra-armv6l-unknown-linux-musleabihf" = muslpi.alejandra;
|
||||||
|
"alejandra-armv6l-unknown-linux-gnueabihf" = raspberryPi.alejandra;
|
||||||
|
"alejandra-armv7l-unknown-linux-gnueabihf" = armv7l-hf-multiplatform.alejandra;
|
||||||
|
"alejandra-i686-unknown-linux-gnu" = gnu32.alejandra;
|
||||||
|
"alejandra-i686-unknown-linux-musl" = musl32.alejandra;
|
||||||
|
# "alejandra-mipsel-unknown-linux-uclibc" = ben-nanonote.alejandra;
|
||||||
|
# "alejandra-mipsel-unknown-linux-gnu" = fuloongminipc.alejandra;
|
||||||
|
"alejandra-x86_64-unknown-linux-gnu" = alejandra;
|
||||||
|
"alejandra-x86_64-unknown-linux-musl" = musl64.alejandra;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
binaries
|
||||||
|
// {
|
||||||
|
"alejandra-binaries" = linkFarm "alejandra-binaries" (
|
||||||
|
lib.mapAttrsToList
|
||||||
|
(
|
||||||
|
name: path: {
|
||||||
|
inherit name;
|
||||||
|
path = "${path}/bin/alejandra";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
binaries
|
||||||
|
);
|
||||||
|
"alejandra-vscode-vsix" = mkYarnPackage {
|
||||||
|
name = "alejandra";
|
||||||
|
src = ./integrations/vscode;
|
||||||
|
packageJSON = ./integrations/vscode/package.json;
|
||||||
|
yarnLock = ./integrations/vscode/yarn.lock;
|
||||||
|
yarnNix = ./integrations/vscode/yarn.lock.nix;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue