nixpkgs/pkgs/by-name/ac/activate-linux/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

72 lines
1.5 KiB
Nix

{ stdenv
, fetchFromGitHub
, lib
, pkg-config
, xorg
, cairo
, wayland
, wayland-protocols
, wayland-scanner
, libconfig
}:
stdenv.mkDerivation (finalAttrs: {
pname = "activate-linux";
version = "1.1.0";
src = fetchFromGitHub {
owner = "MrGlockenspiel";
repo = "activate-linux";
rev = "v${finalAttrs.version}";
hash = "sha256-6XnoAoZwAs2hKToWlDqkaGqucmV1VMkEc4QO0G0xmrg=";
};
makeFlags = [ "PREFIX=$(out)" ];
nativeBuildInputs = [
pkg-config
wayland-scanner
];
buildInputs = [
cairo
xorg.libX11
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXinerama
xorg.libXrandr
xorg.libXt
xorg.xorgproto
wayland
wayland-protocols
libconfig
];
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
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'
runHook postInstall
'';
meta = with lib; {
description = "\"Activate Windows\" watermark ported to Linux";
homepage = "https://github.com/MrGlockenspiel/activate-linux";
license = licenses.gpl3;
maintainers = with maintainers; [ alexnortung donovanglover ];
platforms = platforms.linux;
mainProgram = "activate-linux";
};
})