nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 75 lines 1.4 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchFromGitHub, 5 pkg-config, 6 wayland, 7 wayland-scanner, 8 wayland-protocols, 9 unstableGitUpdater, 10 pixman, 11 fcft, 12 writeText, 13 # Boolean flags 14 withCustomConfigH ? (configH != null), 15 # Configurable options 16 configH ? null, 17}: 18 19stdenv.mkDerivation { 20 pname = "dwlb"; 21 version = "0-unstable-2025-05-20"; 22 23 src = fetchFromGitHub { 24 owner = "kolunmi"; 25 repo = "dwlb"; 26 rev = "48dbe00bdb98a1ae6a0e60558ce14503616aa759"; 27 hash = "sha256-S0jkoELkF+oEmXqiWZ8KJYtWAHEXR/Y93jl5yHgUuSM="; 28 }; 29 30 nativeBuildInputs = [ 31 pkg-config 32 ]; 33 34 buildInputs = [ 35 wayland-scanner 36 wayland-protocols 37 pixman 38 fcft 39 wayland 40 ]; 41 42 # Allow alternative config.def.h usage. Taken from dwl.nix. 43 postPatch = 44 let 45 configFile = 46 if lib.isDerivation configH || builtins.isPath configH then 47 configH 48 else 49 writeText "config.h" configH; 50 in 51 lib.optionalString withCustomConfigH "cp ${configFile} config.h"; 52 53 env = { 54 PREFIX = placeholder "out"; 55 }; 56 57 outputs = [ 58 "out" 59 "man" 60 ]; 61 62 passthru.updateScript = unstableGitUpdater { }; 63 64 meta = { 65 description = "Fast, feature-complete bar for dwl"; 66 homepage = "https://github.com/kolunmi/dwlb"; 67 license = lib.licenses.gpl3Plus; 68 mainProgram = "dwlb"; 69 maintainers = with lib.maintainers; [ 70 bot-wxt1221 71 lonyelon 72 ]; 73 platforms = wayland.meta.platforms; 74 }; 75}