Skip to content

Commit

Permalink
Use newer version of just
Browse files Browse the repository at this point in the history
until it is upgraded in nixpkgs, like:

NixOS/nixpkgs#311583
  • Loading branch information
srid committed May 26, 2024
1 parent c9df732 commit c6efa50
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
10 changes: 9 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
./systems/ax41.nix;
};

perSystem = { self', pkgs, lib, config, ... }: {
perSystem = { self', pkgs, system, config, ... }: {
# Flake inputs we want to update periodically
# Run: `nix run .#update`.
nixos-flake.primary-inputs = [
Expand All @@ -117,6 +117,7 @@
formatter = config.treefmt.build.wrapper;

packages.default = self'.packages.activate;

devShells.default = pkgs.mkShell {
inputsFrom = [ config.treefmt.build.devShell ];
packages = with pkgs; [
Expand All @@ -125,6 +126,13 @@
nixd
];
};
# Make our overlay available to the devShell
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [
(import ./packages/overlay.nix { inherit system; flake = { inherit inputs; }; })
];
};
};
};
}
4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@ deploy:
colmena apply --build-on-target

# Deploy to github-runner VM
[group('gr')]
gr-deploy:
colmena apply --build-on-target --on github-runner

# Re-animate the VM that was suspended until now.
[group('gr')]
gr-animate:
colmena upload-keys
ssh -t github-runner "sudo systemctl restart --all github-runner-*"

[group('gr')]
gr-inspect:
ssh -t github-runner "sudo systemctl status --all github-runner-*"

[group('gr')]
gr-ssh:
ssh -t github-runner
21 changes: 21 additions & 0 deletions packages/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,25 @@ self: super: {
nixci = flake.inputs.nixci.packages.${system}.default;
# nix-health = flake.inputs.nix-browser.packages.${system}.nix-health;
actualism-app = flake.inputs.actualism-app.packages.${system}.default;

# Use just v1.27.0, until upstream upgrades it.
just = super.just.overrideAttrs (oa: rec {
name = "${oa.pname}-${version}";
version = "1.27.0";
src = super.fetchFromGitHub {
owner = "casey";
repo = oa.pname;
rev = "refs/tags/${version}";
hash = "sha256-xyiIAw8PGMgYPtnnzSExcOgwG64HqC9TbBMTKQVG97k=";
};
# Overriding `cargoHash` has no effect; we must override the resultant
# `cargoDeps` and set the hash in its `outputHash` attribute.
cargoDeps = oa.cargoDeps.overrideAttrs (super.lib.const {
name = "${name}-vendor.tar.gz";
inherit src;
outputHash = "sha256-jMurOCr9On+sudgCzIBrPHF+6jCE/6dj5E106cAL2qw=";
});

doCheck = false;
});
}

0 comments on commit c6efa50

Please sign in to comment.