Keyd : Reformat.

This commit is contained in:
Dmitry Voronin 2024-05-28 21:44:39 +03:00
parent 82ee67bb35
commit 17b0234f61
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k

View file

@ -1,40 +1,40 @@
# HACK: Add a patch for https://github.com/rvaiya/keyd/pull/545 # HACK: Add a patch for https://github.com/rvaiya/keyd/pull/545
{ lib, ... }: { { lib, ... }: {
nixpkgs.overlays = [ (final: prev: { nixpkgs.overlays = [ (final: prev: {
keyd = prev.keyd.overrideAttrs (old: rec { keyd = prev.keyd.overrideAttrs (old: rec {
patches = (old.patches or []) ++ [(prev.fetchpatch { patches = (old.patches or []) ++ [(prev.fetchpatch {
url = "https://patch-diff.githubusercontent.com/raw/rvaiya/keyd/pull/545.patch"; url = "https://patch-diff.githubusercontent.com/raw/rvaiya/keyd/pull/545.patch";
hash = "sha256-aal8oAXws6DcpeCl7G9GMJQXeLDDbyotWFut0Rf82WI="; hash = "sha256-aal8oAXws6DcpeCl7G9GMJQXeLDDbyotWFut0Rf82WI=";
})]; })];
postInstall = let postInstall = let
pypkgs = prev.python3.pkgs; pypkgs = prev.python3.pkgs;
appMap = pypkgs.buildPythonApplication rec { appMap = pypkgs.buildPythonApplication rec {
inherit (prev.keyd) version src; inherit (prev.keyd) version src;
inherit patches; inherit patches;
pname = "keyd-application-mapper"; pname = "keyd-application-mapper";
format = "other"; format = "other";
postPatch = '' postPatch = ''
substituteInPlace scripts/${pname} \ substituteInPlace scripts/${pname} \
--replace /bin/sh ${prev.runtimeShell} --replace /bin/sh ${prev.runtimeShell}
'';
propagatedBuildInputs = with pypkgs; [ xlib ];
dontBuild = true;
installPhase = ''
install -Dm555 -t $out/bin scripts/${pname}
'';
meta.mainProgram = "keyd-application-mapper";
};
in ''
ln -sf ${lib.getExe appMap} $out/bin/${appMap.pname}
rm -rf $out/etc
''; '';
});
propagatedBuildInputs = with pypkgs; [ xlib ];
dontBuild = true;
installPhase = ''
install -Dm555 -t $out/bin scripts/${pname}
'';
meta.mainProgram = "keyd-application-mapper";
};
in ''
ln -sf ${lib.getExe appMap} $out/bin/${appMap.pname}
rm -rf $out/etc
'';
});
})]; })];
} }