Skip to content

Commit

Permalink
fix: nix flake build freezes in github action, so try magic nix cache…
Browse files Browse the repository at this point in the history
… + switch to nixos-stable
  • Loading branch information
piotr-semenov committed May 10, 2024
1 parent 288f6c1 commit a293fab
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
paths-ignore: [ "*.md" ]

jobs:
Build-VSIX:
Compile-All:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
Expand Down
8 changes: 5 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ Vagrant.configure("2") do |config|

config.vm.provision "shell", privileged: false, inline: <<-'SHELL'
cd /vagrant/
echo "statix check &&\
nix flake check --impure &&\
cp \$(nix build --impure --no-link --print-out-paths)/parigp* ./syntaxes/" |\
nix --version
df -h
echo "statix check && \
nix flake check --impure && \
cp \$(nix build --impure --no-link --print-out-paths)/parigp* ./syntaxes/" | \
nix-shell --run bash
SHELL
end
2 changes: 1 addition & 1 deletion flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
description = "Builds TextMate grammar for latest version of PARI/GP";

inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-stable";

outputs = { self, nixpkgs }:
let
Expand Down
7 changes: 7 additions & 0 deletions nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
in
import (fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
})
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs ? (import ./nixpkgs.nix) {} }:
pkgs.mkShell {
NIX_CONFIG = "experimental-features = nix-command flakes";
nativeBuildInputs = with pkgs; [
Expand Down

0 comments on commit a293fab

Please sign in to comment.