mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +00:00
571c71e6f7
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.
48 lines
996 B
Nix
48 lines
996 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, file
|
|
, installShellFiles
|
|
, asciidoctor
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "pistol";
|
|
version = "0.5.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "doronbehar";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-/w2BenBIzhD0KHtELlFy7YGv0lykHrjrROZeW75gHis=";
|
|
};
|
|
|
|
vendorHash = "sha256-+Q72DUKLqahgbLCaXOTAYZaMvNfv3XF+SpyqHyB065g=";
|
|
|
|
doCheck = false;
|
|
|
|
subPackages = [ "cmd/pistol" ];
|
|
|
|
buildInputs = [
|
|
file
|
|
];
|
|
nativeBuildInputs = [
|
|
installShellFiles
|
|
asciidoctor
|
|
];
|
|
postInstall = ''
|
|
asciidoctor -b manpage -d manpage README.adoc
|
|
installManPage pistol.1
|
|
'';
|
|
|
|
ldflags = [ "-s" "-w" "-X main.Version=${version}" ];
|
|
|
|
meta = with lib; {
|
|
description = "General purpose file previewer designed for Ranger, Lf to make scope.sh redundant";
|
|
homepage = "https://github.com/doronbehar/pistol";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ doronbehar ];
|
|
mainProgram = "pistol";
|
|
};
|
|
}
|