biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / applications / accessibility / svkbd / default.nix
blobcc1951e4caea3cfcdcdcff81a39c6e50f2d0f330
1 { lib
2 , stdenv
3 , fetchurl
4 , writeText
5 , pkg-config
6 , libX11
7 , libXft
8 , libXi
9 , libXinerama
10 , libXtst
11 , layout ? null
12 , conf ? null
13 , patches ? [ ]
16 stdenv.mkDerivation rec {
17   pname = "svkbd";
18   version = "0.4.1";
20   src = fetchurl {
21     url = "https://dl.suckless.org/tools/svkbd-${version}.tar.gz";
22     sha256 = "sha256-+8Jh/D4dgULhRXtC1tZQg6AK4POh9czyRyrMi0auD1o=";
23   };
25   inherit patches;
27   postPatch = let
28     configFile = if lib.isDerivation conf || lib.isPath conf then
29       conf
30     else
31       writeText "config.def.h" conf;
32   in lib.optionalString (conf != null) ''
33     cp ${configFile} config.def.h
34   '';
36   nativeBuildInputs = [
37     pkg-config
38   ];
40   buildInputs = [
41     libX11
42     libXft
43     libXi
44     libXinerama
45     libXtst
46   ];
48   makeFlags = [
49     "PREFIX=${placeholder "out"}"
50   ] ++ lib.optional (layout != null) "LAYOUT=${layout}";
52   meta = with lib; {
53     description = "Simple virtual keyboard";
54     homepage = "https://tools.suckless.org/x/svkbd/";
55     license = licenses.mit;
56     platforms = platforms.linux;
57     maintainers = with maintainers; [ dotlambda ];
58     mainProgram = "svkbd-mobile-intl";
59   };