Skip to content

Commit

Permalink
perf: Remove flake-utils input from flake.nix (#11)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The `flake-utils` input was removed from the main `flake.nix` file, in consequence it no longer outputs `devShells`
  • Loading branch information
sestrella authored Nov 24, 2023
1 parent b0e58ce commit dedb96b
Show file tree
Hide file tree
Showing 11 changed files with 299 additions and 176 deletions.
4 changes: 3 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
use flake
source_url "https://raw.githubusercontent.com/cachix/devenv/d1f7b48e35e6dee421cfd0f51481d17f77586997/direnvrc" "sha256-YBzqskFZxmNb3kYVoKD9ZixoPXJh1C9ZvTLGFRkauZ0="

use devenv
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ jobs:
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v23
- name: Install Cachix
run: nix-env -iA cachix -f https://cachix.org/api/v1/install
- name: Setup Cachix
run: cachix use devenv
- name: Install devenv
run: nix-env -if https://install.devenv.sh/latest
- name: Run tests
run: nix eval --impure .#tests
working-directory: tests
run: devenv shell -- tests

templates:
runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
.direnv
node_modules
templates/*/flake.lock

# Devenv
.devenv*
devenv.local.nix

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml

172 changes: 172 additions & 0 deletions devenv.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1700691772,
"narHash": "sha256-LidI1PVpxL5/WchIRfMszzsiA5t40QyJiU8V/vd4ZZE=",
"owner": "cachix",
"repo": "devenv",
"rev": "38302f4b9ff45915151848b719c5c4127946c1b8",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1700786208,
"narHash": "sha256-vP0WI7qNkg3teQJN5xjFcxgnBNiKCbkgw3X9HcAxWJY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8b8c9407844599546393146bfac901290e0ab96b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1685801374,
"narHash": "sha256-otaSUoFEMM+LjBI1XL/xGB5ao6IwnZOXc47qhIgJe8U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c37ca420157f4abc31e26f436c1145f8951ff373",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixtest": {
"locked": {
"lastModified": 1689623844,
"narHash": "sha256-VvOQ7iuwsdZzUh213N5cHzaMKmqbX6qWwXoMGXRcE1o=",
"owner": "jetpack-io",
"repo": "nixtest",
"rev": "82e49b045e50a6c0597ab7d613d44c5a323241ab",
"type": "github"
},
"original": {
"owner": "jetpack-io",
"repo": "nixtest",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1700064067,
"narHash": "sha256-1ZWNDzhu8UlVCK7+DUN9dVQfiHX1bv6OQP9VxstY/gs=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "e558068cba67b23b4fbc5537173dbb43748a17e8",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"nixtest": "nixtest",
"pre-commit-hooks": "pre-commit-hooks"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
11 changes: 11 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ pkgs, nixtest, ... }:

{
scripts.tests.exec = ''
nix eval --impure --apply 'run: run ./tests' ${nixtest}#run
'';

languages.javascript.enable = true;

pre-commit.hooks.nixpkgs-fmt.enable = true;
}
5 changes: 5 additions & 0 deletions devenv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
inputs:
nixpkgs:
url: github:nixos/nixpkgs/nixpkgs-unstable
nixtest:
url: github:jetpack-io/nixtest
42 changes: 5 additions & 37 deletions flake.lock

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

Loading

0 comments on commit dedb96b

Please sign in to comment.