summaryrefslogtreecommitdiffstats
path: root/flake.nix
blob: 2ce2adfe8f04fcfe9dc1ca5216df416d1a645d7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  description = "flake for building dwm";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
  };

  outputs =
    { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };

    in
    {
      packages.${system}.default = pkgs.stdenv.mkDerivation {
        pname = "dwm";
        version = "6.8";
        src = ./.;

        nativeBuildInputs = [ pkgs.pkg-config ];
        buildInputs = with pkgs; [
          libX11
          libxinerama
          libxft
          libxcb
          libxres

        ];

        makeFlags = [
          "PREFIX=$(out)"
          "CC:=$(CC)"
        ];

      };
    };
}