about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/pc
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/pc')
-rw-r--r--nixpkgs/pkgs/tools/misc/pc/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/pc/default.nix b/nixpkgs/pkgs/tools/misc/pc/default.nix
new file mode 100644
index 000000000000..6e9c23ee6d8a
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/pc/default.nix
@@ -0,0 +1,36 @@
+{ lib
+, stdenv
+, byacc
+, fetchFromSourcehut
+, gitUpdater
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "pc";
+  version = "0.4";
+
+  src = fetchFromSourcehut {
+    owner = "~ft";
+    repo = "pc";
+    rev = finalAttrs.version;
+    hash = "sha256-fzEDI20o5ROY9n/QRzCW66iCKYaBbI++Taur6EoA0wA=";
+  };
+
+  nativeBuildInputs = [ byacc ];
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  strictDeps = true;
+
+  enableParallelBuilding = true;
+
+  passthru.updateScript = gitUpdater { };
+
+  meta = {
+    description = "Programmer's calculator";
+    homepage = "https://git.sr.ht/~ft/pc";
+    license = with lib.licenses; [ mit ];
+    maintainers = with lib.maintainers; [ moody ];
+    platforms = lib.platforms.unix;
+    mainProgram = "pc";
+  };
+})