From 5ec1939e0f1c9fbd6fd7cb67615a4763ccd188f2 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Mon, 7 Aug 2023 20:45:20 -0400 Subject: [PATCH 1/3] xautolock: Add meta.mainProgram and remove rec --- pkgs/misc/screensavers/xautolock/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/misc/screensavers/xautolock/default.nix b/pkgs/misc/screensavers/xautolock/default.nix index fc87290da69a..90265afc4284 100644 --- a/pkgs/misc/screensavers/xautolock/default.nix +++ b/pkgs/misc/screensavers/xautolock/default.nix @@ -2,7 +2,7 @@ , imake, gccmakedep, libX11, libXext, libXScrnSaver, xorgproto }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "xautolock"; version = "2.2-7-ga23dd5c"; @@ -11,8 +11,8 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "peti"; repo = "xautolock"; - rev = "v${version}"; - sha256 = "10j61rl0sx9sh84rjyfyddl73xb5i2cpb17fyrli8kwj39nw0v2g"; + rev = "v${finalAttrs.version}"; + hash = "sha256-T2zAbRqSTxRp9u6EdZmIZfVxaGveeZkJgjp1DWgORoI="; }; nativeBuildInputs = [ imake gccmakedep ]; @@ -31,5 +31,6 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ peti ]; platforms = platforms.linux; license = licenses.gpl2; + mainProgram = "xautolock"; }; -} +}) From c0790c094cd59b3104912404e915ce57eabfcc17 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Mon, 7 Aug 2023 20:48:28 -0400 Subject: [PATCH 2/3] dash: Add meta.mainProgram and cleanup --- pkgs/shells/dash/default.nix | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix index ff4656f6650f..6bdbd1798e3d 100644 --- a/pkgs/shells/dash/default.nix +++ b/pkgs/shells/dash/default.nix @@ -8,13 +8,13 @@ , dash }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "dash"; version = "0.5.12"; src = fetchurl { - url = "http://gondor.apana.org.au/~herbert/dash/files/${pname}-${version}.tar.gz"; - sha256 = "sha256-akdKxG6LCzKRbExg32lMggWNMpfYs4W3RQgDDKSo8oo="; + url = "http://gondor.apana.org.au/~herbert/dash/files/dash-${finalAttrs.version}.tar.gz"; + hash = "sha256-akdKxG6LCzKRbExg32lMggWNMpfYs4W3RQgDDKSo8oo="; }; strictDeps = true; @@ -31,22 +31,23 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with lib; { - homepage = "http://gondor.apana.org.au/~herbert/dash/"; - description = "A POSIX-compliant implementation of /bin/sh that aims to be as small as possible"; - platforms = platforms.unix; - license = with licenses; [ bsd3 gpl2 ]; - }; - passthru = { shellPath = "/bin/dash"; tests = { - "execute-simple-command" = runCommand "${pname}-execute-simple-command" { } '' + "execute-simple-command" = runCommand "dash-execute-simple-command" { } '' mkdir $out - ${dash}/bin/dash -c 'echo "Hello World!" > $out/success' + ${lib.getExe dash} -c 'echo "Hello World!" > $out/success' [ -s $out/success ] grep -q "Hello World" $out/success ''; }; }; -} + + meta = with lib; { + homepage = "http://gondor.apana.org.au/~herbert/dash/"; + description = "A POSIX-compliant implementation of /bin/sh that aims to be as small as possible"; + platforms = platforms.unix; + license = with licenses; [ bsd3 gpl2 ]; + mainProgram = "dash"; + }; +}) From 2ed62c15fb34c25f578c5078656046e3f42de2b5 Mon Sep 17 00:00:00 2001 From: Gerg-L Date: Mon, 7 Aug 2023 20:54:23 -0400 Subject: [PATCH 3/3] picom: Add meta.mainProgram and remove rec --- pkgs/applications/window-managers/picom/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/window-managers/picom/default.nix b/pkgs/applications/window-managers/picom/default.nix index ddcab1095719..b5eda761ab33 100644 --- a/pkgs/applications/window-managers/picom/default.nix +++ b/pkgs/applications/window-managers/picom/default.nix @@ -30,14 +30,14 @@ , withDebug ? false }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "picom"; version = "10.2"; src = fetchFromGitHub { owner = "yshui"; repo = "picom"; - rev = "v${version}"; + rev = "v${finalAttrs.version}"; hash = "sha256-C+icJXTkE+XMaU7N6JupsP8xhmRVggX9hY1P7za0pO0="; fetchSubmodules = true; }; @@ -113,5 +113,6 @@ stdenv.mkDerivation rec { homepage = "https://github.com/yshui/picom"; maintainers = with maintainers; [ ertes twey thiagokokada ]; platforms = platforms.linux; + mainProgram = "picom"; }; -} +})