From 5e60b24dc1de1abbd062215a662bae6c47112f1b Mon Sep 17 00:00:00 2001 From: FabricSoul Date: Tue, 29 Jul 2025 19:04:29 -0400 Subject: [PATCH] migrate from shell to flake --- flake.nix | 43 +++++++++++++++++++++++++++++++++++++++++++ shell.nix | 18 ------------------ 2 files changed, 43 insertions(+), 18 deletions(-) create mode 100644 flake.nix delete mode 100644 shell.nix 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 - ]; -}