clipbuzz: use zigHook
Also, a cosmetic refactor: - Reorder parameter listing - Use rec-less, overlay-style overridable recursive attributes (in effect since NixOS#119942); - Remove nested with (according to https://nix.dev/recipes/best-practices#with-scopes)
This commit is contained in:
@@ -1,31 +1,33 @@
|
||||
{ stdenv, lib, fetchFromSourcehut, zig, libX11, libXfixes }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromSourcehut
|
||||
, libX11
|
||||
, libXfixes
|
||||
, zigHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "clipbuzz";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchFromSourcehut {
|
||||
owner = "~cnx";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "1qn98bwp7v7blw4v0g4pckgxrky5ggvq9m0kck2kqw8jg9jc15jp";
|
||||
repo = "clipbuzz";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-V5bAZHoScTzFZBPUhPd7xc/c32SXPLAJp+vsc/lCyeI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ zig ];
|
||||
buildInputs = [ libX11 libXfixes ];
|
||||
nativeBuildInputs = [ zigHook ];
|
||||
|
||||
preBuild = ''
|
||||
export HOME=$TMPDIR
|
||||
'';
|
||||
buildInputs = [
|
||||
libX11
|
||||
libXfixes
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
zig build -Drelease-safe -Dcpu=baseline --prefix $out install
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Buzz on new X11 clipboard events";
|
||||
homepage = "https://git.sr.ht/~cnx/clipbuzz";
|
||||
license = licenses.unlicense;
|
||||
maintainers = [ maintainers.McSinyx ];
|
||||
license = lib.licenses.unlicense;
|
||||
maintainers = [ lib.maintainers.McSinyx ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user