hyprland: 0.43.0 -> 0.44.0, hyprpicker: 0.3.0 -> 0.4.1 (#346906)
This commit is contained in:
commit
9fd89c03fe
@ -1,63 +1,53 @@
|
|||||||
{ lib
|
{
|
||||||
, stdenv
|
lib,
|
||||||
, fetchFromGitHub
|
stdenv,
|
||||||
, pkg-config
|
fetchFromGitHub,
|
||||||
, cmake
|
nix-update-script,
|
||||||
, ninja
|
pkg-config,
|
||||||
, cairo
|
cmake,
|
||||||
, fribidi
|
cairo,
|
||||||
, libGL
|
hyprutils,
|
||||||
, libdatrie
|
hyprwayland-scanner,
|
||||||
, libjpeg
|
libGL,
|
||||||
, libselinux
|
libjpeg,
|
||||||
, libsepol
|
libxkbcommon,
|
||||||
, libthai
|
pango,
|
||||||
, libxkbcommon
|
wayland,
|
||||||
, pango
|
wayland-protocols,
|
||||||
, pcre
|
wayland-scanner,
|
||||||
, util-linux
|
libXdmcp,
|
||||||
, wayland
|
debug ? false,
|
||||||
, wayland-protocols
|
|
||||||
, wayland-scanner
|
|
||||||
, libXdmcp
|
|
||||||
, debug ? false
|
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hyprpicker" + lib.optionalString debug "-debug";
|
pname = "hyprpicker" + lib.optionalString debug "-debug";
|
||||||
version = "0.3.0";
|
version = "0.4.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "hyprwm";
|
owner = "hyprwm";
|
||||||
repo = "hyprpicker";
|
repo = "hyprpicker";
|
||||||
rev = "v${finalAttrs.version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-BYQF1zM6bJ44ag9FJ0aTSkhOTY9U7uRdp3SmRCs5fJM=";
|
hash = "sha256-gu26MSYbTlRLMUpZ9PeYXtqqhzPDQXxEDkjiJgwzIIc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cmakeBuildType = if debug then "Debug" else "Release";
|
cmakeBuildType = if debug then "Debug" else "Release";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
ninja
|
hyprwayland-scanner
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
cairo
|
cairo
|
||||||
fribidi
|
hyprutils
|
||||||
libGL
|
libGL
|
||||||
libdatrie
|
|
||||||
libjpeg
|
libjpeg
|
||||||
libselinux
|
|
||||||
libsepol
|
|
||||||
libthai
|
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
pango
|
pango
|
||||||
pcre
|
|
||||||
wayland
|
wayland
|
||||||
wayland-protocols
|
wayland-protocols
|
||||||
wayland-scanner
|
wayland-scanner
|
||||||
libXdmcp
|
libXdmcp
|
||||||
util-linux
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
@ -65,11 +55,13 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
install -Dm644 $src/LICENSE -t $out/share/licenses/hyprpicker
|
install -Dm644 $src/LICENSE -t $out/share/licenses/hyprpicker
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
|
meta = {
|
||||||
description = "Wlroots-compatible Wayland color picker that does not suck";
|
description = "Wlroots-compatible Wayland color picker that does not suck";
|
||||||
homepage = "https://github.com/hyprwm/hyprpicker";
|
homepage = "https://github.com/hyprwm/hyprpicker";
|
||||||
license = licenses.bsd3;
|
license = lib.licenses.bsd3;
|
||||||
maintainers = with maintainers; [ fufexan ];
|
maintainers = with lib.maintainers; [ fufexan ];
|
||||||
platforms = wayland.meta.platforms;
|
platforms = wayland.meta.platforms;
|
||||||
mainProgram = "hyprpicker";
|
mainProgram = "hyprpicker";
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
|
stdenvAdapters,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
cmake,
|
cmake,
|
||||||
|
meson,
|
||||||
ninja,
|
ninja,
|
||||||
aquamarine,
|
aquamarine,
|
||||||
binutils,
|
binutils,
|
||||||
@ -15,7 +17,6 @@
|
|||||||
hyprlang,
|
hyprlang,
|
||||||
hyprutils,
|
hyprutils,
|
||||||
hyprwayland-scanner,
|
hyprwayland-scanner,
|
||||||
jq,
|
|
||||||
libGL,
|
libGL,
|
||||||
libdrm,
|
libdrm,
|
||||||
libexecinfo,
|
libexecinfo,
|
||||||
@ -45,30 +46,52 @@
|
|||||||
enableNvidiaPatches ? false,
|
enableNvidiaPatches ? false,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
info = builtins.fromJSON (builtins.readFile ./info.json);
|
inherit (builtins)
|
||||||
|
foldl'
|
||||||
|
;
|
||||||
|
inherit (lib.asserts) assertMsg;
|
||||||
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
|
inherit (lib.lists)
|
||||||
|
concatLists
|
||||||
|
optionals
|
||||||
|
;
|
||||||
|
inherit (lib.strings)
|
||||||
|
makeBinPath
|
||||||
|
optionalString
|
||||||
|
mesonBool
|
||||||
|
mesonEnable
|
||||||
|
;
|
||||||
|
inherit (lib.trivial)
|
||||||
|
importJSON
|
||||||
|
;
|
||||||
|
|
||||||
|
info = importJSON ./info.json;
|
||||||
|
|
||||||
|
# possibility to add more adapters in the future, such as keepDebugInfo,
|
||||||
|
# which would be controlled by the `debug` flag
|
||||||
|
adapters = [
|
||||||
|
stdenvAdapters.useMoldLinker
|
||||||
|
];
|
||||||
|
|
||||||
|
customStdenv = foldl' (acc: adapter: adapter acc) stdenv adapters;
|
||||||
in
|
in
|
||||||
assert lib.assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed.";
|
assert assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed.";
|
||||||
assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
|
assert assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
|
||||||
assert lib.assertMsg (!hidpiXWayland)
|
assert assertMsg (!hidpiXWayland)
|
||||||
"The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland";
|
"The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland";
|
||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
customStdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "hyprland" + lib.optionalString debug "-debug";
|
pname = "hyprland" + optionalString debug "-debug";
|
||||||
version = "0.43.0";
|
version = "0.44.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "hyprwm";
|
owner = "hyprwm";
|
||||||
repo = "hyprland";
|
repo = "hyprland";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
rev = "refs/tags/v${finalAttrs.version}";
|
rev = "refs/tags/v${finalAttrs.version}";
|
||||||
hash = "sha256-+wE97utoDfhQP6AMdZHUmBeL8grbce/Jv2i5M+6AbaE=";
|
hash = "sha256-XgDhPx+tKs+2lyWM/ZqIHnMArd/c0LGmwAwu0EG1uJM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
# forces GCC to use -std=c++26 on CMake < 3.30
|
|
||||||
"${finalAttrs.src}/nix/stdcxx.patch"
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# Fix hardcoded paths to /usr installation
|
# Fix hardcoded paths to /usr installation
|
||||||
sed -i "s#/usr#$out#" src/render/OpenGL.cpp
|
sed -i "s#/usr#$out#" src/render/OpenGL.cpp
|
||||||
@ -93,13 +116,14 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
hyprwayland-scanner
|
hyprwayland-scanner
|
||||||
jq
|
|
||||||
makeWrapper
|
makeWrapper
|
||||||
cmake
|
meson
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
python3 # for udis86
|
|
||||||
wayland-scanner
|
wayland-scanner
|
||||||
|
# for udis86
|
||||||
|
cmake
|
||||||
|
python3
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
@ -108,7 +132,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
"dev"
|
"dev"
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs =
|
buildInputs = concatLists [
|
||||||
[
|
[
|
||||||
aquamarine
|
aquamarine
|
||||||
cairo
|
cairo
|
||||||
@ -129,32 +153,40 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
wayland-protocols
|
wayland-protocols
|
||||||
xorg.libXcursor
|
xorg.libXcursor
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.hostPlatform.isBSD [ epoll-shim ]
|
(optionals customStdenv.hostPlatform.isBSD [ epoll-shim ])
|
||||||
++ lib.optionals stdenv.hostPlatform.isMusl [ libexecinfo ]
|
(optionals customStdenv.hostPlatform.isMusl [ libexecinfo ])
|
||||||
++ lib.optionals enableXWayland [
|
(optionals enableXWayland [
|
||||||
xorg.libxcb
|
xorg.libxcb
|
||||||
xorg.libXdmcp
|
xorg.libXdmcp
|
||||||
xorg.xcbutilerrors
|
xorg.xcbutilerrors
|
||||||
xorg.xcbutilwm
|
xorg.xcbutilwm
|
||||||
xwayland
|
xwayland
|
||||||
]
|
])
|
||||||
++ lib.optionals withSystemd [ systemd ];
|
(optionals withSystemd [ systemd ])
|
||||||
|
];
|
||||||
|
|
||||||
cmakeBuildType = if debug then "Debug" else "RelWithDebInfo";
|
mesonBuildType = if debug then "debugoptimized" else "release";
|
||||||
|
|
||||||
dontStrip = debug;
|
dontStrip = debug;
|
||||||
|
|
||||||
cmakeFlags = [
|
mesonFlags = concatLists [
|
||||||
(lib.cmakeBool "NO_XWAYLAND" (!enableXWayland))
|
(mapAttrsToList mesonEnable {
|
||||||
(lib.cmakeBool "LEGACY_RENDERER" legacyRenderer)
|
"xwayland" = enableXWayland;
|
||||||
(lib.cmakeBool "NO_SYSTEMD" (!withSystemd))
|
"legacy_renderer" = legacyRenderer;
|
||||||
|
"systemd" = withSystemd;
|
||||||
|
})
|
||||||
|
(mapAttrsToList mesonBool {
|
||||||
|
# PCH provides no benefits when building with Nix
|
||||||
|
"b_pch" = false;
|
||||||
|
"tracy_enable" = false;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
${lib.optionalString wrapRuntimeDeps ''
|
${optionalString wrapRuntimeDeps ''
|
||||||
wrapProgram $out/bin/Hyprland \
|
wrapProgram $out/bin/Hyprland \
|
||||||
--suffix PATH : ${
|
--suffix PATH : ${
|
||||||
lib.makeBinPath [
|
makeBinPath [
|
||||||
binutils
|
binutils
|
||||||
pciutils
|
pciutils
|
||||||
pkgconf
|
pkgconf
|
||||||
@ -163,9 +195,10 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
''}
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
passthru.providedSessions = [ "hyprland" ];
|
passthru = {
|
||||||
|
providedSessions = [ "hyprland" ];
|
||||||
passthru.updateScript = ./update.sh;
|
updateScript = ./update.sh;
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
homepage = "https://github.com/hyprwm/Hyprland";
|
homepage = "https://github.com/hyprwm/Hyprland";
|
||||||
|
Loading…
Reference in New Issue
Block a user