2022-05-17 12:46:48 +00:00
|
|
|
{ stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, pkg-config
|
|
|
|
, xorg
|
|
|
|
, cairo
|
2023-10-05 13:51:25 +00:00
|
|
|
, wayland
|
|
|
|
, wayland-protocols
|
|
|
|
, wayland-scanner
|
|
|
|
, libconfig
|
2022-05-17 12:46:48 +00:00
|
|
|
}:
|
|
|
|
|
2023-10-05 13:51:25 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-05-17 12:46:48 +00:00
|
|
|
pname = "activate-linux";
|
2023-10-05 13:51:25 +00:00
|
|
|
version = "1.1.0";
|
2022-05-17 12:46:48 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "MrGlockenspiel";
|
2023-10-05 13:51:25 +00:00
|
|
|
repo = "activate-linux";
|
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-6XnoAoZwAs2hKToWlDqkaGqucmV1VMkEc4QO0G0xmrg=";
|
2022-05-17 12:46:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
2023-10-05 13:51:25 +00:00
|
|
|
wayland-scanner
|
2022-05-17 12:46:48 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-10-05 13:51:25 +00:00
|
|
|
cairo
|
2022-05-17 12:46:48 +00:00
|
|
|
xorg.libX11
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
2023-10-05 13:51:25 +00:00
|
|
|
xorg.libXi
|
2022-05-17 12:46:48 +00:00
|
|
|
xorg.libXinerama
|
2023-10-05 13:51:25 +00:00
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXt
|
|
|
|
xorg.xorgproto
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
|
|
|
libconfig
|
2022-05-17 12:46:48 +00:00
|
|
|
];
|
|
|
|
|
2023-10-05 13:51:25 +00:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
|
|
|
|
cp activate-linux $out/bin
|
|
|
|
cp activate-linux.1 $out/share/man/man1
|
|
|
|
|
2023-12-01 21:17:20 +00:00
|
|
|
install -Dm444 res/icon.png $out/share/icons/hicolor/128x128/apps/activate-linux.png
|
|
|
|
install -Dm444 res/activate-linux.desktop -t $out/share/applications
|
|
|
|
substituteInPlace $out/share/applications/activate-linux.desktop \
|
|
|
|
--replace 'Icon=icon' 'Icon=activate-linux'
|
|
|
|
|
2023-10-05 13:51:25 +00:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
2022-05-17 12:46:48 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "\"Activate Windows\" watermark ported to Linux";
|
|
|
|
homepage = "https://github.com/MrGlockenspiel/activate-linux";
|
|
|
|
license = licenses.gpl3;
|
2023-10-05 13:51:25 +00:00
|
|
|
maintainers = with maintainers; [ alexnortung donovanglover ];
|
2022-05-17 12:46:48 +00:00
|
|
|
platforms = platforms.linux;
|
2023-10-05 13:51:25 +00:00
|
|
|
mainProgram = "activate-linux";
|
2022-05-17 12:46:48 +00:00
|
|
|
};
|
2023-10-05 13:51:25 +00:00
|
|
|
})
|