mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 07:34:36 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
38 lines
963 B
Nix
38 lines
963 B
Nix
{ lib, stdenv, fetchgit, libX11, libXinerama, libXft, patches ? [], conf ? null }:
|
|
|
|
let
|
|
name = "dwm-git-20180602";
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
inherit name;
|
|
|
|
src = fetchgit {
|
|
url = "git://git.suckless.org/dwm";
|
|
rev = "b69c870a3076d78ab595ed1cd4b41cf6b03b2610";
|
|
sha256 = "10i079h79l4gdch1qy2vrrb2xxxkgkjmgphr5r9a75jbbagwvz0k";
|
|
};
|
|
|
|
buildInputs = [ libX11 libXinerama libXft ];
|
|
|
|
prePatch = ''sed -i "s@/usr/local@$out@" config.mk'';
|
|
|
|
# Allow users set their own list of patches
|
|
inherit patches;
|
|
|
|
# Allow users to override the entire config file AFTER appying the patches
|
|
postPatch = stdenv.lib.optionalString (conf!=null) ''
|
|
echo -n '${conf}' > config.def.h
|
|
'';
|
|
|
|
buildPhase = "make";
|
|
|
|
meta = with lib; {
|
|
homepage = "https://suckless.org/";
|
|
description = "Dynamic window manager for X, development version";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [xeji];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|