nixpkgs/pkgs/by-name/te/tessen/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

54 lines
1.3 KiB
Nix

{ lib
, stdenvNoCC
, fetchFromSourcehut
, makeWrapper
, installShellFiles
, wtype
, wl-clipboard
, pass
, bemenu
, scdoc
}:
stdenvNoCC.mkDerivation rec {
pname = "tessen";
version = "2.2.3";
src = fetchFromSourcehut {
owner = "~ayushnix";
repo = pname;
rev = "v${version}";
sha256 = "sha256-mVGsI1JBG7X8J7gqocdfxWuTVSZpxS23QPGHCUofvV8=";
};
nativeBuildInputs = [ makeWrapper installShellFiles scdoc ];
dontBuild = true;
installPhase = ''
runHook preInstall
install -D tessen $out/bin/tessen
wrapProgram $out/bin/tessen --prefix PATH : ${ lib.makeBinPath [ bemenu pass wtype wl-clipboard ] }
runHook postInstall
'';
postInstall = ''
scdoc < man/tessen.1.scd > man/tessen.1
scdoc < man/tessen.5.scd > man/tessen.5
installManPage man/*.{1,5}
installShellCompletion --cmd tessen \
--bash completion/tessen.bash-completion \
--fish completion/tessen.fish-completion
install -Dm644 config $out/share/tessen/config
'';
meta = with lib; {
homepage = "https://sr.ht/~ayushnix/tessen";
description = "Interactive menu to autotype and copy Pass and GoPass data";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ monaaraj ];
mainProgram = "tessen";
};
}