nixpkgs/pkgs/by-name/pr/programmer-calculator/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1001 B
Nix
Raw Normal View History

2021-06-18 13:32:24 +00:00
{ lib, gccStdenv, fetchFromGitHub, ncurses }:
gccStdenv.mkDerivation rec {
pname = "programmer-calculator";
2023-01-30 02:23:01 +00:00
version = "3.0";
2021-06-18 13:32:24 +00:00
src = fetchFromGitHub {
owner = "alt-romes";
repo = pname;
rev = "v${version}";
2023-01-30 02:23:01 +00:00
sha256 = "sha256-9mv8Jac6j3fKWLLCu1Bd/T5dbegUB8rRgsj9MaQhFDw=";
2021-06-18 13:32:24 +00:00
};
buildInputs = [ ncurses ];
installPhase = ''
runHook preInstall
install -Dm 555 pcalc -t "$out/bin"
runHook postInstall
'';
meta = with lib; {
description = "Terminal calculator for programmers";
mainProgram = "pcalc";
2021-06-18 13:32:24 +00:00
longDescription = ''
Terminal calculator made for programmers working with multiple number
representations, sizes, and overall close to the bits
'';
homepage = "https://alt-romes.github.io/programmer-calculator";
changelog = "https://github.com/alt-romes/programmer-calculator/releases/tag/v${version}";
license = licenses.gpl3Only;
maintainers = with lib.maintainers; [ cjab ];
platforms = platforms.all;
};
}