mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-27 06:27:43 +00:00
nix: merge (now redundant) flake check with normal build
Summary: Since 066032b6e6
was merged, the `nix flake check` build no longer
overrides the 'cargo test' profile explicitly, to save disk space. The CI seems
to be in a better spot. This will stem the tide for a while hopefully.
However, with that change in place, the `nix flake check` build was
essentially a redundant, nearly-identical copy of a normal `nix build` with no
differentiating features, except: `RUST_BACKTRACE` is set to 1.
Delete all this code, and remove it from the CI matrix, and instead just export
`RUST_BACKTRACE` on the `checkPhase` of the normal `nix build` instead, which is
functionally equivalent.
Also does some minor, no-functional-change touchups to `flake.nix` while I was
there (whitespace, etc.)
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: I87336b16e2a0b973343ecbde8ffd7b8f
This commit is contained in:
parent
b66adb4bb7
commit
71a3045032
2 changed files with 9 additions and 16 deletions
9
.github/workflows/nix-linux.yml
vendored
9
.github/workflows/nix-linux.yml
vendored
|
@ -10,12 +10,7 @@ permissions: read-all
|
|||
|
||||
jobs:
|
||||
nix:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest ]
|
||||
mode: [ "flake check", "build" ]
|
||||
runs-on: ${{ matrix.os }}
|
||||
runs-on: ubuntu-latest
|
||||
name: nix-build
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
|
@ -24,4 +19,4 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- uses: DeterminateSystems/nix-installer-action@07ebb8d2749aa2fac2baae7d1cfa011e4acfd8d1
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1
|
||||
- run: nix ${{ matrix.mode }} --print-build-logs --show-trace
|
||||
- run: nix build --print-build-logs --show-trace
|
||||
|
|
14
flake.nix
14
flake.nix
|
@ -48,6 +48,7 @@
|
|||
jujutsu = ourRustPlatform.buildRustPackage rec {
|
||||
pname = "jujutsu";
|
||||
version = "unstable-${self.shortRev or "dirty"}";
|
||||
|
||||
buildFeatures = [ "packaging" ];
|
||||
cargoBuildFlags = ["--bin" "jj"]; # don't build and install the fake editors
|
||||
useNextest = true;
|
||||
|
@ -57,9 +58,8 @@
|
|||
"^flake\\.lock$"
|
||||
"^target/"
|
||||
];
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
};
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
nativeBuildInputs = with pkgs; [
|
||||
gzip
|
||||
installShellFiles
|
||||
|
@ -73,10 +73,13 @@
|
|||
darwin.apple_sdk.frameworks.SystemConfiguration
|
||||
libiconv
|
||||
];
|
||||
|
||||
ZSTD_SYS_USE_PKG_CONFIG = "1";
|
||||
LIBSSH2_SYS_USE_PKG_CONFIG = "1";
|
||||
NIX_JJ_GIT_HASH = self.rev or "";
|
||||
CARGO_INCREMENTAL = "0";
|
||||
|
||||
preCheck = "export RUST_BACKTRACE=1";
|
||||
postInstall = ''
|
||||
$out/bin/jj util mangen > ./jj.1
|
||||
installManPage ./jj.1
|
||||
|
@ -93,11 +96,6 @@
|
|||
type = "app";
|
||||
program = "${self.packages.${system}.jujutsu}/bin/jj";
|
||||
};
|
||||
checks.jujutsu = self.packages.${system}.jujutsu.overrideAttrs ({ ... }: {
|
||||
preCheck = ''
|
||||
export RUST_BACKTRACE=1
|
||||
'';
|
||||
});
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
|
|
Loading…
Reference in a new issue