mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +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.
49 lines
1.0 KiB
Nix
49 lines
1.0 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, buildGoModule
|
|
, pandoc
|
|
, installShellFiles
|
|
, nix-update-script
|
|
, testers
|
|
, eget
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "eget";
|
|
version = "1.3.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zyedidia";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-jhVUYyp6t5LleVotQQme07IJVdVnIOVFFtKEmzt8e2k=";
|
|
};
|
|
|
|
vendorHash = "sha256-A3lZtV0pXh4KxINl413xGbw2Pz7OzvIQiFSRubH428c=";
|
|
|
|
ldflags = [ "-s" "-w" "-X main.Version=v${version}" ];
|
|
|
|
nativeBuildInputs = [ pandoc installShellFiles ];
|
|
|
|
postInstall = ''
|
|
pandoc man/eget.md -s -t man -o eget.1
|
|
installManPage eget.1
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
tests.version = testers.testVersion {
|
|
package = eget;
|
|
command = "eget -v";
|
|
version = "v${version}";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Easily install prebuilt binaries from GitHub";
|
|
homepage = "https://github.com/zyedidia/eget";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ zendo ];
|
|
};
|
|
}
|