From 749e96d23a6a71139ef84322708e6b1338072b7d Mon Sep 17 00:00:00 2001 From: Hannes Schulze Date: Fri, 2 Aug 2024 17:44:25 +0200 Subject: initial commit --- flake.nix | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') 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; + }) + ]; + }; + }); +} -- cgit v1.3.1