Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 stdenv, 3 fetchFromGitHub, 4 lib, 5 pkg-config, 6 xorg, 7 cairo, 8 wayland, 9 wayland-protocols, 10 wayland-scanner, 11 libconfig, 12}: 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "activate-linux"; 16 version = "1.1.0"; 17 18 src = fetchFromGitHub { 19 owner = "MrGlockenspiel"; 20 repo = "activate-linux"; 21 tag = "v${finalAttrs.version}"; 22 hash = "sha256-6XnoAoZwAs2hKToWlDqkaGqucmV1VMkEc4QO0G0xmrg="; 23 }; 24 25 makeFlags = [ "PREFIX=$(out)" ]; 26 27 nativeBuildInputs = [ 28 pkg-config 29 wayland-scanner 30 ]; 31 32 buildInputs = [ 33 cairo 34 xorg.libX11 35 xorg.libXext 36 xorg.libXfixes 37 xorg.libXi 38 xorg.libXinerama 39 xorg.libXrandr 40 xorg.libXt 41 xorg.xorgproto 42 wayland 43 wayland-protocols 44 libconfig 45 ]; 46 47 installPhase = '' 48 runHook preInstall 49 50 mkdir -p $out/bin 51 mkdir -p $out/share/man/man1 52 53 cp activate-linux $out/bin 54 cp activate-linux.1 $out/share/man/man1 55 56 install -Dm444 res/icon.png $out/share/icons/hicolor/128x128/apps/activate-linux.png 57 install -Dm444 res/activate-linux.desktop -t $out/share/applications 58 substituteInPlace $out/share/applications/activate-linux.desktop \ 59 --replace 'Icon=icon' 'Icon=activate-linux' 60 61 runHook postInstall 62 ''; 63 64 meta = { 65 description = "\"Activate Windows\" watermark ported to Linux"; 66 homepage = "https://github.com/MrGlockenspiel/activate-linux"; 67 license = lib.licenses.gpl3; 68 maintainers = with lib.maintainers; [ 69 alexnortung 70 donovanglover 71 ]; 72 platforms = lib.platforms.linux; 73 mainProgram = "activate-linux"; 74 }; 75})