Merge pull request #310155 from TomaSajt/ratslap

ratslap: make linux-only, use finalAttrs
This commit is contained in:
Weijia Wang 2024-05-08 21:04:19 +02:00 committed by GitHub
commit 2464c25a91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
};
}
})