From a76f3ae05d470b2806a2ad66ca756156b4ed050b Mon Sep 17 00:00:00 2001 From: TomaSajt <62384384+TomaSajt@users.noreply.github.com> Date: Wed, 8 May 2024 19:09:37 +0200 Subject: [PATCH] ratslap: make linux-only, use finalAttrs --- pkgs/by-name/ra/ratslap/package.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/ra/ratslap/package.nix b/pkgs/by-name/ra/ratslap/package.nix index 6ea5cc191652..59ff8ffb8e1e 100644 --- a/pkgs/by-name/ra/ratslap/package.nix +++ b/pkgs/by-name/ra/ratslap/package.nix @@ -7,15 +7,15 @@ , git }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "ratslap"; version = "0.4.1"; src = fetchFromGitHub { owner = "krayon"; repo = "ratslap"; - rev = version; - sha256 = "sha256-PO/79tTiO4TBtojrEtkSf5W6zuG+Ml2iJGAtYHDwHEY="; + rev = finalAttrs.version; + hash = "sha256-PO/79tTiO4TBtojrEtkSf5W6zuG+Ml2iJGAtYHDwHEY="; leaveDotGit = true; }; @@ -33,9 +33,9 @@ stdenv.mkDerivation rec { makeFlagsArray+=( "-W gitup" "VDIRTY=" - "MAJVER=${version}" + "MAJVER=${finalAttrs.version}" "APPBRANCH=main" - "BINNAME=${pname}" + "BINNAME=ratslap" "MARKDOWN_GEN=" "BUILD_DATE=$(git show -s --date=format:'%Y-%m-%d %H:%M:%S%z' --format=%cd)" "BUILD_MONTH=$(git show -s --date=format:'%B' --format=%cd)" @@ -49,8 +49,8 @@ stdenv.mkDerivation rec { mkdir -p $out/bin cp ratslap $out/bin - mv manpage.1 ${pname}.1 - installManPage ${pname}.1 + mv manpage.1 ratslap.1 + installManPage ratslap.1 runHook postInstall ''; @@ -62,9 +62,9 @@ stdenv.mkDerivation rec { all buttons and configuring modes, DPI settings and the LED. ''; homepage = "https://github.com/krayon/ratslap"; - changelog = "https://github.com/krayon/ratslap/releases/tag/${version}"; + changelog = "https://github.com/krayon/ratslap/releases/tag/${finalAttrs.version}"; license = licenses.gpl2Only; maintainers = with maintainers; [ zebreus ]; - platforms = platforms.all; + platforms = platforms.linux; }; -} +})