diff options
| author | Hannes Schulze <haschu0103@outlook.de> | 2024-08-02 17:44:25 +0200 |
|---|---|---|
| committer | Hannes Schulze <haschu0103@outlook.de> | 2024-08-02 17:44:25 +0200 |
| commit | 749e96d23a6a71139ef84322708e6b1338072b7d (patch) | |
| tree | 3e94053256aa8fee5a34100a15fbcb30319ef632 /flake.nix | |
initial commit
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..dcc0b7a --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + description = "A purely functional wayland compositor."; + + inputs = { + nixpkgs = { + url = "github:nixos/nixpkgs/nixos-unstable"; + }; + flake-utils = { + url = "github:numtide/flake-utils"; + }; + nixos-apple-silicon = { + url = "github:tpwrules/nixos-apple-silicon"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, flake-utils, nixos-apple-silicon }: + flake-utils.lib.eachDefaultSystem (system: + let + shell = name: overlays: + let + pkgs = import nixpkgs { + inherit system overlays; + }; + haskell = pkgs.haskellPackages.ghcWithPackages (p: + with p; [ microlens microlens-mtl microlens-th haskell-language-server ]); + in + pkgs.mkShell { + inherit name; + packages = [ haskell pkgs.pkg-config pkgs.wayland pkgs.cabal-install ]; + hardeningDisable = [ "fortify" ]; + }; + in + { + devShells = { + default = shell "highway" []; + asahi = shell "highway-asahi" [ + (final: prev: { + mesa = nixos-apple-silicon.packages.${system}.mesa-asahi-edge; + }) + ]; + }; + }); +} |
