nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenvNoCC,
4 fetchurl,
5 appimageTools,
6}:
7
8stdenvNoCC.mkDerivation (finalAttrs: {
9 pname = "deskreen";
10 version = "2.0.4";
11
12 src = fetchurl {
13 url = "https://github.com/pavlobu/deskreen/releases/download/v${finalAttrs.version}/Deskreen-${finalAttrs.version}.AppImage";
14 hash = "sha256-0jI/mbXaXanY6ay2zn+dPWGvsqWRcF8aYHRvfGVsObE=";
15 };
16 deskreenUnwrapped = appimageTools.wrapType2 {
17 inherit (finalAttrs) pname version;
18 src = finalAttrs.src;
19 };
20
21 buildInputs = [
22 finalAttrs.deskreenUnwrapped
23 ];
24
25 dontUnpack = true;
26 dontBuild = true;
27
28 installPhase = ''
29 runHook preInstall
30
31 mkdir -p $out/bin
32 ln -s ${finalAttrs.deskreenUnwrapped}/bin/deskreen $out/bin/deskreen
33
34 runHook postInstall
35 '';
36
37 meta = {
38 description = "Turn any device into a secondary screen for your computer";
39 homepage = "https://deskreen.com";
40 license = lib.licenses.agpl3Only;
41 mainProgram = "deskreen";
42 maintainers = with lib.maintainers; [
43 leo248
44 drupol
45 ];
46 platforms = lib.platforms.linux;
47 };
48})