diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..df28ad0 --- /dev/null +++ b/flake.nix @@ -0,0 +1,43 @@ +{ + description = "flake for my dwl"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { + self, + nixpkgs, + }: let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in { + packages.${system}.default = pkgs.stdenv.mkDerivation rec { + pname = "dwl-fabric"; + version = "0.1"; + + # Set the source to your local dwl directory + src = ./.; + + # Add the necessary build dependencies for dwl + buildInputs = with pkgs; [ + xwayland + libxkbcommon + wayland + wayland-protocols + wlroots + xorg.libxcb + pkg-config + ]; + + # The build and installation process + buildPhase = '' + make + ''; + + installPhase = '' + make install PREFIX=$out + ''; + }; + }; +} diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 01ef840..0000000 --- a/shell.nix +++ /dev/null @@ -1,18 +0,0 @@ -{pkgs ? import {}}: -pkgs.mkShell { - packages = with pkgs; [ - gnumake - pkg-config - wayland - xwayland - xorg.libxcb - xorg.xcbutilwm - wayland-protocols - wayland-scanner - libinput - wlroots - libxkbcommon - pixman - systemd - ]; -}