mirror of
https://github.com/eRgo35/dwm.git
synced 2025-12-16 13:46:11 +01:00
feat: nixified
This commit is contained in:
46
flake.nix
Normal file
46
flake.nix
Normal file
@@ -0,0 +1,46 @@
|
||||
{
|
||||
outputs = { self, nixpkgs }: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
packages.${system}.dwm = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "dwm";
|
||||
version = "custom";
|
||||
src = ./.;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
xorg.libX11
|
||||
xorg.libXft
|
||||
xorg.libXinerama
|
||||
];
|
||||
|
||||
makeFlags = [ "CC=${pkgs.gcc}/bin/gcc" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp dwm $out/bin/
|
||||
'';
|
||||
|
||||
meta = with pkgs.lib; {
|
||||
description = "Dynamic Window Manager";
|
||||
license = licenses.mit;
|
||||
maintainers = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
gnumake
|
||||
gcc
|
||||
xorg.libX11
|
||||
xorg.libX11.dev
|
||||
xorg.libXft
|
||||
xorg.libXinerama
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
echo "Development shell for dwm ready."
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user