summaryrefslogtreecommitdiffstats
path: root/flake.nix
blob: 21de19fe6f8edd5e0f67a6386b9989c7a3cd8777 (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
{
  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
        fira-code
      ];

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