Merge pull request #260702 from NixOS/projecteur/add-nixos-module
nixos/modules/projecteur: init
This commit is contained in:
commit
948c4d7de2
20
nixos/modules/programs/projecteur.nix
Normal file
20
nixos/modules/programs/projecteur.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.programs.projecteur;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.programs.projecteur = {
|
||||||
|
enable = lib.mkEnableOption (lib.mdDoc "projecteur");
|
||||||
|
package = lib.mkPackageOptionMD pkgs "projecteur" { };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
services.udev.packages = [ cfg.package ];
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
maintainers = with lib.maintainers; [ benneti drupol ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,6 +1,13 @@
|
|||||||
{ lib, mkDerivation, fetchFromGitHub,
|
{ lib
|
||||||
cmake, pkg-config,
|
, mkDerivation
|
||||||
qtbase, qtgraphicaleffects, wrapQtAppsHook }:
|
, fetchFromGitHub
|
||||||
|
, cmake
|
||||||
|
, pkg-config
|
||||||
|
, qtbase
|
||||||
|
, qtgraphicaleffects
|
||||||
|
, wrapQtAppsHook
|
||||||
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
pname = "projecteur";
|
pname = "projecteur";
|
||||||
version = "0.9.2";
|
version = "0.9.2";
|
||||||
@ -10,15 +17,23 @@ mkDerivation rec {
|
|||||||
repo = "Projecteur";
|
repo = "Projecteur";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
fetchSubmodules = false;
|
fetchSubmodules = false;
|
||||||
sha256 = "sha256-kg6oYtJ4H5A6RNATBg+XvMfCb9FlhEBFjfxamGosMQg=";
|
hash = "sha256-kg6oYtJ4H5A6RNATBg+XvMfCb9FlhEBFjfxamGosMQg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed '1i#include <array>' -i src/device.h # gcc12
|
sed '1i#include <array>' -i src/device.h # gcc12
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ qtbase qtgraphicaleffects ];
|
buildInputs = [
|
||||||
nativeBuildInputs = [ wrapQtAppsHook cmake pkg-config ];
|
qtbase
|
||||||
|
qtgraphicaleffects
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pkg-config
|
||||||
|
wrapQtAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DCMAKE_INSTALL_PREFIX:PATH=${placeholder "out"}"
|
"-DCMAKE_INSTALL_PREFIX:PATH=${placeholder "out"}"
|
||||||
@ -26,11 +41,12 @@ mkDerivation rec {
|
|||||||
"-DCMAKE_INSTALL_UDEVRULESDIR=${placeholder "out"}/lib/udev/rules.d"
|
"-DCMAKE_INSTALL_UDEVRULESDIR=${placeholder "out"}/lib/udev/rules.d"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = {
|
||||||
description = "Linux/X11 application for the Logitech Spotlight device (and similar devices).";
|
description = "Linux/X11 application for the Logitech Spotlight device (and similar devices).";
|
||||||
homepage = "https://github.com/jahnf/Projecteur";
|
homepage = "https://github.com/jahnf/Projecteur";
|
||||||
license = licenses.mit;
|
license = lib.licenses.mit;
|
||||||
platforms = platforms.linux;
|
mainProgram = "projecteur";
|
||||||
maintainers = with maintainers; [ benneti ];
|
maintainers = with lib.maintainers; [ benneti drupol ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user