summaryrefslogtreecommitdiffstats
path: root/flake.nix
blob: 6ceea12758797daedcde5b8fd64c38f532cfd296 (plain)
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
{
  description = "flake for building dmenu";

  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 = "dmenu";
      version = "5.4";
      src = ./.;

      nativeBuildInputs = [pkgs.pkg-config];
      buildInputs = with pkgs; [
        libX11
        fontconfig
        libxinerama
        libxft
        fira-code
      ];
      makeFlags = [
        "PREFIX=$(out)"
        "CC:=$(CC)"
      ];
    };
  };
}