From f5d906922be17ecbfe72cb272e1f0cb0f1496f52 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Sun, 7 Feb 2021 12:24:58 +0000 Subject: [PATCH 1/2] dwm-git: drop --- pkgs/applications/window-managers/dwm/git.nix | 36 ------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 5 --- 3 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 pkgs/applications/window-managers/dwm/git.nix diff --git a/pkgs/applications/window-managers/dwm/git.nix b/pkgs/applications/window-managers/dwm/git.nix deleted file mode 100644 index a13fc78fbfb4..000000000000 --- a/pkgs/applications/window-managers/dwm/git.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib, stdenv, fetchgit, libX11, libXinerama, libXft, writeText, patches ? [ ] -, conf ? null }: - -stdenv.mkDerivation { - pname = "dwm-git"; - version = "20200303"; - - src = fetchgit { - url = "git://git.suckless.org/dwm"; - rev = "61bb8b2241d4db08bea4261c82e27cd9797099e7"; - sha256 = "1j3vly8dln35vnwnwwlaa8ql9fmnlmrv43jcyc8dbfhfxiw6f34l"; - }; - - 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 set the config.def.h file containing the configuration - postPatch = let - configFile = if lib.isDerivation conf || builtins.isPath conf then - conf - else - writeText "config.def.h" conf; - in lib.optionalString (conf != null) "cp ${configFile} config.def.h"; - - 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; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 6452b0e49a16..796563a432bc 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -150,6 +150,7 @@ mapAliases ({ dydisnix = throw "dydisnix has been removed."; # added 2021-01-27 dysnomia = throw "dysnomia has been removed."; # added 2021-01-27 dwarf_fortress = dwarf-fortress; # added 2016-01-23 + dwm-git = throw "dwm-git has been removed from nixpkgs, as it had no updates for 2 years not serving it's purpose."; # added 2021-02-07 elasticmq = throw "elasticmq has been removed in favour of elasticmq-server-bin"; # added 2021-01-17 emacsPackagesGen = emacsPackagesFor; # added 2018-08-18 emacsPackagesNgGen = emacsPackagesFor; # added 2018-08-18 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cefd18a4224c..ad1948b184ff 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21682,11 +21682,6 @@ in patches = config.dwm.patches or []; }; - dwm-git = callPackage ../applications/window-managers/dwm/git.nix { - patches = config.dwm.patches or []; - conf = config.dwm.conf or null; - }; - dwm-status = callPackage ../applications/window-managers/dwm/dwm-status.nix { }; dynamips = callPackage ../applications/virtualization/dynamips { }; From 0e1bf2f2543605a2c2f3d2c4810a4bd8e96fe271 Mon Sep 17 00:00:00 2001 From: 06kellyjac Date: Tue, 9 Feb 2021 14:51:56 +0000 Subject: [PATCH 2/2] dwm: cleanup - nixpkgs-fmt - use pname and version - use multiline for prePatch to make tree-wide modifications easier - remove global `with lib;` - update homepage to dwm page - copy description from git repo - add longDescription - remove unused config.dwm.patches --- .../window-managers/dwm/default.nix | 48 ++++++++++++------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/pkgs/applications/window-managers/dwm/default.nix b/pkgs/applications/window-managers/dwm/default.nix index eb349e6f3b17..2c3ed2e47e88 100644 --- a/pkgs/applications/window-managers/dwm/default.nix +++ b/pkgs/applications/window-managers/dwm/default.nix @@ -1,34 +1,46 @@ -{lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [], conf ? null}: +{ lib, stdenv, fetchurl, libX11, libXinerama, libXft, writeText, patches ? [ ], conf ? null}: -with lib; - -let - name = "dwm-6.2"; -in -stdenv.mkDerivation { - inherit name; +stdenv.mkDerivation rec { + pname = "dwm"; + version = "6.2"; src = fetchurl { - url = "https://dl.suckless.org/dwm/${name}.tar.gz"; + url = "https://dl.suckless.org/dwm/${pname}-${version}.tar.gz"; sha256 = "03hirnj8saxnsfqiszwl2ds7p0avg20izv9vdqyambks00p2x44p"; }; buildInputs = [ libX11 libXinerama libXft ]; - prePatch = ''sed -i "s@/usr/local@$out@" config.mk''; + prePatch = '' + sed -i "s@/usr/local@$out@" config.mk + ''; # Allow users set their own list of patches inherit patches; # Allow users to set the config.def.h file containing the configuration - postPatch = let configFile = if isDerivation conf || builtins.isPath conf then conf else writeText "config.def.h" conf; - in optionalString (conf!=null) "cp ${configFile} config.def.h"; + postPatch = + let + configFile = + if lib.isDerivation conf || builtins.isPath conf + then conf else writeText "config.def.h" conf; + in + lib.optionalString (conf != null) "cp ${configFile} config.def.h"; - meta = { - homepage = "https://suckless.org/"; - description = "Dynamic window manager for X"; - license = lib.licenses.mit; - maintainers = with lib.maintainers; [viric]; - platforms = with lib.platforms; all; + meta = with lib; { + homepage = "https://dwm.suckless.org/"; + description = "An extremely fast, small, and dynamic window manager for X"; + longDescription = '' + dwm is a dynamic window manager for X. It manages windows in tiled, + monocle and floating layouts. All of the layouts can be applied + dynamically, optimising the environment for the application in use and the + task performed. + Windows are grouped by tags. Each window can be tagged with one or + multiple tags. Selecting certain tags displays all windows with these + tags. + ''; + license = licenses.mit; + maintainers = with maintainers; [ viric ]; + platforms = platforms.all; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ad1948b184ff..8fe3f86d3584 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21678,9 +21678,7 @@ in inherit (gnome2) libgnomeui; }; - dwm = callPackage ../applications/window-managers/dwm { - patches = config.dwm.patches or []; - }; + dwm = callPackage ../applications/window-managers/dwm { }; dwm-status = callPackage ../applications/window-managers/dwm/dwm-status.nix { };