Skip to content

Commit

Permalink
Add shell.nix using flake.nix via flake-compat
Browse files Browse the repository at this point in the history
Close #3
  • Loading branch information
jacg committed Jul 11, 2023
2 parents 12fe6e4 + e27d0f1 commit 9004e59
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ jobs:
- name: Test nain4
run: nix develop -c just

- name: nix-shell
run: nix-shell --run just

- name: Run G4 examples
run: nix develop -c just g4-examples/run-examples-that-work
17 changes: 17 additions & 0 deletions flake.lock

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

9 changes: 6 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

description = "Playing with G4 examples";

inputs.nixpkgs .url = "github:NixOS/nixpkgs/nixos-23.05";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs = {
nixpkgs .url = "github:NixOS/nixpkgs/nixos-23.05";
flake-utils .url = "github:numtide/flake-utils";
flake-compat = { url = "github:edolstra/flake-compat"; flake = false; };
};

outputs = { self, nixpkgs, flake-utils }:
outputs = { self, nixpkgs, flake-utils, flake-compat }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; };
in {
Expand Down
10 changes: 10 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; }
).shellNix

0 comments on commit 9004e59

Please sign in to comment.