diff options
| author | Baitinq <[email protected]> | 2025-05-13 22:26:47 +0200 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-05-14 18:28:11 +0200 |
| commit | 162951e04bbb79fd51fe2ebc0bc2f7c2b242a2ea (patch) | |
| tree | 3482e14e34276968bb7af5121c906abd4074207f | |
| parent | Bootstrap: Require filename argument (diff) | |
| download | pry-lang-162951e04bbb79fd51fe2ebc0bc2f7c2b242a2ea.tar.gz pry-lang-162951e04bbb79fd51fe2ebc0bc2f7c2b242a2ea.tar.bz2 pry-lang-162951e04bbb79fd51fe2ebc0bc2f7c2b242a2ea.zip | |
Misc: Cleanup flake.nix
| -rw-r--r-- | flake.nix | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/flake.nix b/flake.nix index 6ebc82e..86ebe6d 100644 --- a/flake.nix +++ b/flake.nix @@ -1,38 +1,37 @@ { - description = "Renfe flake"; + description = "Interpreter flake"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - zig.url = "github:mitchellh/zig-overlay"; + zig.url = "github:mitchellh/zig-overlay"; zls = { url = "github:zigtools/zls"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { - self, - nixpkgs, - zig, - zls, - }: let + outputs = { self, nixpkgs, zig, zls }: let systems = ["x86_64-darwin" "aarch64-darwin" "x86_64-linux"]; + createDevShell = system: let pkgs = import nixpkgs { - system = "${system}"; + inherit system; config.allowUnfree = true; }; - in - pkgs.mkShell { - buildInputs = with pkgs; [ - zig.packages."${system}".master - zls.packages."${system}".default - llvmPackages_20.libllvm - gdb - gf - valgrind - ]; - }; + isDarwin = pkgs.stdenv.isDarwin; + in pkgs.mkShell { + buildInputs = with pkgs; [ + zig.packages."${system}".master + zls.packages."${system}".default + ] + ++ pkgs.lib.optional isDarwin llvmPackages_19.libllvm + ++ pkgs.lib.optionals (!isDarwin) ([ + llvmPackages_20.libllvm + gdb + gf + valgrind + ]); + }; in { devShell = nixpkgs.lib.genAttrs systems createDevShell; }; |