diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 75c6dd0b60e9..997f8636f396 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -13330,6 +13330,15 @@ githubId = 75299; name = "Malcolm Matalka"; }; + orhun = { + email = "orhunparmaksiz@gmail.com"; + github = "orhun"; + githubId = 24392180; + name = "Orhun Parmaksız"; + keys = [{ + fingerprint = "165E 0FF7 C48C 226E 1EC3 63A7 F834 2482 4B3E 4B90"; + }]; + }; orichter = { email = "richter-oliver@gmx.net"; github = "ORichterSec"; diff --git a/pkgs/tools/misc/daktilo/default.nix b/pkgs/tools/misc/daktilo/default.nix new file mode 100644 index 000000000000..b28f3b08f8cd --- /dev/null +++ b/pkgs/tools/misc/daktilo/default.nix @@ -0,0 +1,66 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, installShellFiles +, stdenv +, darwin +, unixtools +, pkg-config +, alsa-lib +, xorg +}: + +rustPlatform.buildRustPackage rec { + pname = "daktilo"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "orhun"; + repo = "daktilo"; + rev = "v${version}"; + hash = "sha256-kbJwBOUODtHdngbfa6HbbQJ0kgW6f64c0EG3y8wLymw="; + }; + + cargoHash = "sha256-u9vL2HAUgP43ZDwIEK2u/I+KUEjQsfXda03gnGJ1Krc="; + + nativeBuildInputs = [ + installShellFiles + pkg-config + ]; + + buildInputs = [ + alsa-lib + xorg.libX11 + xorg.libXi + xorg.libXtst + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Security + ]; + + nativeCheckInputs = [ + unixtools.script + ]; + + postInstall = '' + mkdir -p man completions + + OUT_DIR=man $out/bin/daktilo-mangen + OUT_DIR=completions $out/bin/daktilo-completions + + installManPage man/daktilo.1 + installShellCompletion \ + completions/daktilo.{bash,fish} \ + --zsh completions/_daktilo + + rm $out/bin/daktilo-{completions,mangen} + ''; + + meta = with lib; { + description = "Turn your keyboard into a typewriter"; + homepage = "https://github.com/orhun/daktilo"; + changelog = "https://github.com/orhun/daktilo/blob/${src.rev}/CHANGELOG.md"; + license = with licenses; [ asl20 mit ]; + maintainers = with maintainers; [ orhun ]; + mainProgram = "daktilo"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 99bf72a34481..92da00a96077 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31042,6 +31042,8 @@ with pkgs; dablin = callPackage ../applications/radio/dablin { }; + daktilo = callPackage ../tools/misc/daktilo { }; + darcs = haskell.lib.compose.overrideCabal (drv: { configureFlags = (lib.remove "-flibrary" drv.configureFlags or []) ++ ["-f-library"]; }) (haskell.lib.compose.justStaticExecutables haskellPackages.darcs);