mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-08 20:19:04 +03:00
cleaned up module and added package with overlay
This commit is contained in:
93
package.nix
Normal file
93
package.nix
Normal file
@@ -0,0 +1,93 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
cmake,
|
||||
git,
|
||||
pkg-config,
|
||||
makeWrapper,
|
||||
wayland-protocols,
|
||||
glfw,
|
||||
freetype,
|
||||
fontconfig,
|
||||
mesa,
|
||||
xorg,
|
||||
wayland,
|
||||
libxkbcommon,
|
||||
zlib,
|
||||
bzip2,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "clrsync";
|
||||
version = "unstable-2024-12-15";
|
||||
|
||||
src = lib.cleanSourceWith {
|
||||
src = ./.;
|
||||
filter = path: type:
|
||||
let
|
||||
baseName = baseNameOf path;
|
||||
in
|
||||
! (lib.hasSuffix ".o" baseName
|
||||
|| lib.hasSuffix ".a" baseName
|
||||
|| baseName == "build"
|
||||
|| baseName == "CMakeCache.txt"
|
||||
|| baseName == "CMakeFiles"
|
||||
|| baseName == ".git"
|
||||
|| baseName == "result"
|
||||
|| baseName == ".direnv"
|
||||
);
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
git
|
||||
pkg-config
|
||||
makeWrapper
|
||||
wayland-protocols
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
glfw
|
||||
freetype
|
||||
fontconfig
|
||||
xorg.libXcursor
|
||||
mesa
|
||||
xorg.libX11
|
||||
xorg.libXrandr
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
wayland
|
||||
wayland-protocols
|
||||
libxkbcommon
|
||||
zlib
|
||||
bzip2
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DUSE_SYSTEM_GLFW=ON"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cmake --install . --prefix $out
|
||||
|
||||
wrapProgram $out/bin/clrsync_gui \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
|
||||
|
||||
wrapProgram $out/bin/clrsync_cli \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Color scheme manager with GUI and CLI";
|
||||
homepage = "https://github.com/obsqrbtz/clrsync";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
mainProgram = "clrsync_gui";
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user