Skip to content

Commit

Permalink
Add shell.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
sveitser committed Aug 26, 2024
1 parent d8322f3 commit 90e12dd
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
15 changes: 15 additions & 0 deletions flake.lock

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

4 changes: 3 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
inputs.foundry.url = "github:shazow/foundry.nix/monthly"; # Use monthly branch for permanent releases

outputs = { self, nixpkgs, foundry }:
inputs.flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"; # for shell.nix compatibility

outputs = { self, nixpkgs, foundry, ... }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
Expand Down
13 changes: 13 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(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 90e12dd

Please sign in to comment.