clight,clight-gui,clightd: migrate to pkgs/by-name, modernize
- Moved clight, clight-gui, and clightd from pkgs/applications/misc/clight/
into pkgs/by-name/cl/.
- Updated derivations to use `stdenv.mkDerivation (finalAttrs: { ... })`
style instead of `rec`.
- Switched from `rev`/`sha256` to `tag`/`hash` in fetchFromGitHub.
- Applied `libsForQt5` consistently for clight-gui buildInputs and hooks.
- Added postPatch to clight-gui to require cmake >= 3.10.
- Adjusted `meta` blocks to avoid `with lib;` and use explicit `lib.*`.
- Removed old package references from all-packages.nix.
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
qtbase,
|
||||
qtcharts,
|
||||
wrapQtAppsHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clight-gui";
|
||||
version = "unstable-2023-02-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nullobsi";
|
||||
repo = "clight-gui";
|
||||
rev = "29e7216bfcc68135350a695ce446134bcb0463a6";
|
||||
hash = "sha256-U4vaMwnVDZnYLc+K3/yD81Q1vyBL8uSrrhOHbjbox5U=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
qtbase
|
||||
qtcharts
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
sourceRoot = "${src.name}/src";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Qt GUI for clight";
|
||||
homepage = "https://github.com/nullobsi/clight-gui";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ nickhu ];
|
||||
mainProgram = "clight-gui";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
cmake,
|
||||
libsForQt5,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "clight-gui";
|
||||
version = "0-unstable-2023-02-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nullobsi";
|
||||
repo = "clight-gui";
|
||||
rev = "29e7216bfcc68135350a695ce446134bcb0463a6";
|
||||
hash = "sha256-U4vaMwnVDZnYLc+K3/yD81Q1vyBL8uSrrhOHbjbox5U=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail "cmake_minimum_required(VERSION 3.0)" \
|
||||
"cmake_minimum_required(VERSION 3.10)"
|
||||
'';
|
||||
|
||||
buildInputs = with libsForQt5; [
|
||||
qtbase
|
||||
qtcharts
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
libsForQt5.wrapQtAppsHook
|
||||
];
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/src";
|
||||
|
||||
meta = {
|
||||
description = "Qt GUI for clight";
|
||||
homepage = "https://github.com/nullobsi/clight-gui";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ nickhu ];
|
||||
mainProgram = "clight-gui";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
@@ -18,15 +18,15 @@
|
||||
upower,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "clight";
|
||||
version = "4.11";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FedeDP";
|
||||
repo = "Clight";
|
||||
rev = version;
|
||||
sha256 = "sha256-Fu38HRP83Yn2jsq9xnCWOXNlV/0hJKD1/cOOp3EV45Q=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-Fu38HRP83Yn2jsq9xnCWOXNlV/0hJKD1/cOOp3EV45Q=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -55,14 +55,14 @@ stdenv.mkDerivation rec {
|
||||
"-DZSH_COMPLETIONS_DIR=${placeholder "out"}/share/zsh/site-functions"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "C daemon that turns your webcam into a light sensor";
|
||||
homepage = "https://github.com/FedeDP/Clight";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [
|
||||
eadwu
|
||||
];
|
||||
mainProgram = "clight";
|
||||
};
|
||||
}
|
||||
})
|
||||
@@ -28,14 +28,14 @@
|
||||
enableYoctolight ? true,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "clightd";
|
||||
version = "5.9";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "FedeDP";
|
||||
repo = "Clightd";
|
||||
rev = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-LOhBBd7QL5kH4TzMFgrh70C37WsFdsiKArP+tIEiPWo=";
|
||||
};
|
||||
|
||||
@@ -98,14 +98,14 @@ stdenv.mkDerivation rec {
|
||||
ln -svT $out/libexec/clightd $out/bin/clightd
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Linux bus interface that changes screen brightness/temperature";
|
||||
mainProgram = "clightd";
|
||||
homepage = "https://github.com/FedeDP/Clightd";
|
||||
platforms = platforms.linux;
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [
|
||||
platforms = lib.platforms.linux;
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = with lib.maintainers; [
|
||||
eadwu
|
||||
];
|
||||
};
|
||||
}
|
||||
})
|
||||
@@ -10721,12 +10721,6 @@ with pkgs;
|
||||
inherit (darwin) DarwinTools;
|
||||
};
|
||||
|
||||
clight = callPackage ../applications/misc/clight { };
|
||||
|
||||
clight-gui = libsForQt5.callPackage ../applications/misc/clight/clight-gui.nix { };
|
||||
|
||||
clightd = callPackage ../applications/misc/clight/clightd.nix { };
|
||||
|
||||
clipgrab = libsForQt5.callPackage ../applications/video/clipgrab { };
|
||||
|
||||
cmus = callPackage ../applications/audio/cmus {
|
||||
|
||||
Reference in New Issue
Block a user