From 0a415f33c1e925c3f74b351da9240043c8c7f9b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 8 Nov 2021 09:45:05 +0100 Subject: [PATCH 1/5] evilwm: change prePatch to postPatch --- pkgs/applications/window-managers/evilwm/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/window-managers/evilwm/default.nix b/pkgs/applications/window-managers/evilwm/default.nix index c11d3d6b14df..0855e512fd8e 100644 --- a/pkgs/applications/window-managers/evilwm/default.nix +++ b/pkgs/applications/window-managers/evilwm/default.nix @@ -26,8 +26,11 @@ stdenv.mkDerivation rec { xorgproto ]; - prePatch = ''substituteInPlace ./Makefile --replace /usr $out \ - --replace "CC = gcc" "#CC = gcc"''; + postPatch = '' + substituteInPlace ./Makefile \ + --replace /usr $out \ + --replace "CC = gcc" "#CC = gcc" + ''; # Allow users set their own list of patches inherit patches; @@ -35,14 +38,12 @@ stdenv.mkDerivation rec { meta = with lib; { homepage = "http://www.6809.org.uk/evilwm/"; description = "Minimalist window manager for the X Window System"; - license = { shortName = "evilwm"; fullName = "Custom, inherited from aewm and 9wm"; url = "http://www.6809.org.uk/evilwm/"; free = true; }; # like BSD/MIT, but Share-Alike'y; See README. - maintainers = with maintainers; [ amiloradovsky ]; platforms = platforms.all; }; From d49083f40de085a2ab09fe3868645c6f03c5c89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 8 Nov 2021 09:45:44 +0100 Subject: [PATCH 2/5] i3/lock-fancy: switch ot pname+version, cleanup postPatch --- .../window-managers/i3/lock-fancy.nix | 36 ++++++++++--------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/window-managers/i3/lock-fancy.nix b/pkgs/applications/window-managers/i3/lock-fancy.nix index 7275d664468a..9a1b959690a2 100644 --- a/pkgs/applications/window-managers/i3/lock-fancy.nix +++ b/pkgs/applications/window-managers/i3/lock-fancy.nix @@ -11,35 +11,39 @@ }: stdenv.mkDerivation rec { - rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a"; pname = "i3lock-fancy"; - version = "unstable-2018-11-25_rev${builtins.substring 0 7 rev}"; + version = "unstable-2018-11-25"; + src = fetchFromGitHub { owner = "meskarune"; repo = "i3lock-fancy"; - inherit rev; + rev = "7accfb2aa2f918d1a3ab975b860df1693d20a81a"; sha256 = "00lqsvz1knb8iqy8lnkn3sf4c2c4nzb0smky63qf48m8za5aw9b1"; }; - patchPhase = '' - sed -i -e "s|mktemp|${coreutils}/bin/mktemp|" i3lock-fancy - sed -i -e "s|'rm -f |'${coreutils}/bin/rm -f |" i3lock-fancy - sed -i -e "s|scrot -z |${scrot}/bin/scrot -z |" i3lock-fancy - sed -i -e "s|convert |${imagemagick.out}/bin/convert |" i3lock-fancy - sed -i -e "s|awk -F|${gawk}/bin/awk -F|" i3lock-fancy - sed -i -e "s| awk | ${gawk}/bin/awk |" i3lock-fancy - sed -i -e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" i3lock-fancy - sed -i -e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' i3lock-fancy - sed -i -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' i3lock-fancy - sed -i -e "s|getopt |${getopt}/bin/getopt |" i3lock-fancy - sed -i -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" i3lock-fancy - sed -i -e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z -o)|" i3lock-fancy + + postPatch = '' + sed -i i3lock-fancy \ + -e "s|mktemp|${coreutils}/bin/mktemp|" \ + -e "s|'rm -f |'${coreutils}/bin/rm -f |" \ + -e "s|scrot -z |${scrot}/bin/scrot -z |" \ + -e "s|convert |${imagemagick.out}/bin/convert |" \ + -e "s|awk -F|${gawk}/bin/awk -F|" \ + -e "s| awk | ${gawk}/bin/awk |" \ + -e "s|i3lock -i |${i3lock-color}/bin/i3lock-color -i |" \ + -e 's|icon="/usr/share/i3lock-fancy/icons/lockdark.png"|icon="'$out'/share/i3lock-fancy/icons/lockdark.png"|' \ + -e 's|icon="/usr/share/i3lock-fancy/icons/lock.png"|icon="'$out'/share/i3lock-fancy/icons/lock.png"|' \ + -e "s|getopt |${getopt}/bin/getopt |" \ + -e "s|fc-match |${fontconfig.bin}/bin/fc-match |" \ + -e "s|shot=(import -window root)|shot=(${scrot}/bin/scrot -z -o)|" rm Makefile ''; + installPhase = '' mkdir -p $out/bin $out/share/i3lock-fancy/icons cp i3lock-fancy $out/bin/i3lock-fancy cp icons/lock*.png $out/share/i3lock-fancy/icons ''; + meta = with lib; { description = "i3lock is a bash script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text"; homepage = "https://github.com/meskarune/i3lock-fancy"; From 86bf5eb0bbdb5dcbeeff9e372d5743c520c728bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 8 Nov 2021 09:47:20 +0100 Subject: [PATCH 3/5] ion-3: switch to pname+verison, format --- .../window-managers/ion-3/default.nix | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/window-managers/ion-3/default.nix b/pkgs/applications/window-managers/ion-3/default.nix index cdea6969dd9a..4794de1d5f84 100644 --- a/pkgs/applications/window-managers/ion-3/default.nix +++ b/pkgs/applications/window-managers/ion-3/default.nix @@ -1,19 +1,25 @@ { lib, stdenv, fetchurl, xlibsWrapper, lua, gettext, groff }: stdenv.mkDerivation rec { - name = "ion"; + pname = "ion"; version = "3-20090110"; - meta = { - description = "Tiling tabbed window manager designed with keyboard users in mind"; - homepage = "http://modeemi.fi/~tuomov/ion"; - platforms = with lib.platforms; linux; - license = lib.licenses.lgpl21; - }; + src = fetchurl { url = "http://tuomov.iki.fi/software/dl/ion-${version}.tar.gz"; sha256 = "1nkks5a95986nyfkxvg2rik6zmwx0lh7szd5fji7yizccwzc9xns"; }; + buildInputs = [ xlibsWrapper lua gettext groff ]; + buildFlags = [ "LUA_DIR=${lua}" "X11_PREFIX=/no-such-path" "PREFIX=\${out}" ]; + installFlags = [ "PREFIX=\${out}" ]; + + meta = with lib; { + description = "Tiling tabbed window manager designed with keyboard users in mind"; + homepage = "http://modeemi.fi/~tuomov/ion"; + platforms = with platforms; linux; + license = licenses.lgpl21; + maintainers = with maintainers; [ ]; + }; } From 023922bcd1ed9bf56fe3a0e122f604b6046b2354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 8 Nov 2021 09:47:34 +0100 Subject: [PATCH 4/5] tabbed: switch to pname+version, move with lib to meta --- pkgs/applications/window-managers/tabbed/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/window-managers/tabbed/default.nix b/pkgs/applications/window-managers/tabbed/default.nix index 938092bb8aba..7366ff196954 100644 --- a/pkgs/applications/window-managers/tabbed/default.nix +++ b/pkgs/applications/window-managers/tabbed/default.nix @@ -1,10 +1,8 @@ { lib, stdenv, fetchgit, xorgproto, libX11, libXft, customConfig ? null, patches ? [ ] }: -with lib; - stdenv.mkDerivation { - name = "tabbed"; - version = "unstable-20180310"; + pname = "tabbed"; + version = "unstable-2018-03-10"; src = fetchgit { url = "https://git.suckless.org/tabbed"; @@ -24,7 +22,7 @@ stdenv.mkDerivation { "PREFIX=$(out)" ]; - meta = { + meta = with lib; { homepage = "https://tools.suckless.org/tabbed"; description = "Simple generic tabbed fronted to xembed aware applications"; license = licenses.mit; From 9467e1178c5b5d711ed43e3c16c91b9e117d60c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 8 Nov 2021 09:47:47 +0100 Subject: [PATCH 5/5] trayer: minor formatting --- pkgs/applications/window-managers/trayer/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/window-managers/trayer/default.nix b/pkgs/applications/window-managers/trayer/default.nix index 6be3a33ac0b9..57cf0fc93fac 100644 --- a/pkgs/applications/window-managers/trayer/default.nix +++ b/pkgs/applications/window-managers/trayer/default.nix @@ -4,9 +4,6 @@ stdenv.mkDerivation rec { pname = "trayer"; version = "1.1.8"; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gdk-pixbuf gtk2 ]; - src = fetchFromGitHub { owner = "sargon"; repo = "trayer-srg"; @@ -14,10 +11,14 @@ stdenv.mkDerivation rec { sha256 = "1mvhwaqa9bng9wh3jg3b7y8gl7nprbydmhg963xg0r076jyzv0cg"; }; - preConfigure = '' + postPatch = '' patchShebangs configure ''; + nativeBuildInputs = [ pkg-config ]; + + buildInputs = [ gdk-pixbuf gtk2 ]; + makeFlags = [ "PREFIX=$(out)" ]; meta = with lib; {