all repos — char/flake @ c8ebe782d87af66a0528afd4cdfe59e115949b83

nixos flake

packages/deskflow/package.nix (view raw)

 1# i got this from a nixpkgs pr and i will delete it when the pr lands but thank u pr person
 2
 3{
 4  lib,
 5  stdenv,
 6  fetchFromGitHub,
 7  cmake,
 8  ninja,
 9  pkg-config,
10  tomlplusplus,
11  cli11,
12  gtest,
13  libX11,
14  libxkbfile,
15  libXtst,
16  libXinerama,
17  libXi,
18  libXrandr,
19  libxkbcommon,
20  pugixml,
21  python3,
22  gdk-pixbuf,
23  libnotify,
24  qt6,
25  callPackage,
26}:
27
28let
29  libei = callPackage ./libs/libei.nix { };
30  libportal = callPackage ./libs/libportal.nix { };
31in
32stdenv.mkDerivation rec {
33  pname = "deskflow";
34
35  version = "1.17.0";
36
37  src = fetchFromGitHub {
38    owner = "deskflow";
39    repo = "deskflow";
40    rev = "${version}+r1";
41    hash = "sha256-OXgL3AmN5s38tlp3yYcMc6y9y8Gf48FuaD0ilKnoKiE=";
42  };
43
44  nativeBuildInputs = [
45    cmake
46    ninja
47    pkg-config
48    qt6.wrapQtAppsHook
49  ];
50
51  postPatch = ''
52    substituteInPlace cmake/Packaging.cmake --replace-warn "set(CMAKE_INSTALL_PREFIX /usr)" ""
53  '';
54
55  cmakeFlags = [
56    "-DCMAKE_SKIP_RPATH=ON"
57  ];
58
59  buildInputs = [
60    tomlplusplus
61    cli11
62    gtest
63    libei
64    libportal
65    libX11
66    libxkbfile
67    libXinerama
68    libXi
69    libXrandr
70    libXtst
71    libxkbcommon
72    pugixml
73    gdk-pixbuf
74    libnotify
75    python3
76    qt6.qtbase
77  ];
78
79  postInstall = ''
80    substituteInPlace $out/share/applications/deskflow.desktop \
81        --replace-fail "Path=/usr/bin" "Path=$out/bin" \
82        --replace-fail "Exec=/usr/bin/deskflow" "Exec=deskflow"
83  '';
84
85  meta = {
86    homepage = "https://github.com/deskflow/deskflow";
87    description = "Deskflow lets you share one mouse and keyboard between multiple computers on Windows, macOS and Linux";
88    mainProgram = "deskflow";
89    maintainers = with lib.maintainers; [ aucub ];
90    license = lib.licenses.gpl2Plus;
91    platforms = [
92      "x86_64-linux"
93      "aarch64-darwin"
94    ];
95    broken = stdenv.hostPlatform.isDarwin;
96  };
97}