From 56137a2cacefb66c8b9cd11d6a44349a100474e8 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 14 Oct 2024 20:58:45 -0300 Subject: [PATCH] setconf: get rid of rec --- pkgs/tools/misc/setconf/default.nix | 52 ++++++++++++++++------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/pkgs/tools/misc/setconf/default.nix b/pkgs/tools/misc/setconf/default.nix index 320ae683c5cb..fb6aeefd84ae 100644 --- a/pkgs/tools/misc/setconf/default.nix +++ b/pkgs/tools/misc/setconf/default.nix @@ -1,28 +1,32 @@ -{ lib -, python3Packages -, fetchFromGitHub +{ + lib, + fetchFromGitHub, + python3Packages, }: -python3Packages.buildPythonApplication rec { - pname = "setconf"; - version = "0.7.7"; +let + self = python3Packages.buildPythonApplication { + pname = "setconf"; + version = "0.7.7"; - src = fetchFromGitHub { - owner = "xyproto"; - repo = "setconf"; - rev = version; - hash = "sha256-HYZdDtDlGrT3zssDdMW3559hhC+cPy8qkmM8d9zEa1A="; + src = fetchFromGitHub { + owner = "xyproto"; + repo = "setconf"; + rev = self.version; + hash = "sha256-HYZdDtDlGrT3zssDdMW3559hhC+cPy8qkmM8d9zEa1A="; + }; + + build-system = with python3Packages; [ setuptools ]; + + pyproject = true; + + meta = { + homepage = "https://github.com/xyproto/setconf"; + description = "Small utility for changing settings in configuration textfiles"; + changelog = "https://github.com/xyproto/setconf/releases/tag/${self.src.rev}"; + mainProgram = "setconf"; + maintainers = with lib.maintainers; [ AndersonTorres ]; + }; }; - - build-system = with python3Packages; [ setuptools ]; - - pyproject = true; - - meta = { - homepage = "https://github.com/xyproto/setconf"; - description = "Small utility for changing settings in configuration textfiles"; - changelog = "https://github.com/xyproto/setconf/releases/tag/${version}"; - mainProgram = "setconf"; - maintainers = with lib.maintainers; [ AndersonTorres ]; - }; -} +in +self