about summary refs log tree commit diff
path: root/pkgs/by-name/vz
diff options
context:
space:
mode:
authorMoraxyc <i@qaq.li>2024-05-04 09:06:57 +0800
committerMoraxyc <i@qaq.li>2024-06-10 01:45:35 +0800
commitb937d377424ef8e1b42fcff29fea61bb428bfce3 (patch)
tree3008c84279a0a43681b4c29138dd488af1780ec9 /pkgs/by-name/vz
parent47b75e37d5319b622b0071d83cf398a599206be5 (diff)
vzic: init at 0-unstable-2024-06-04
Diffstat (limited to 'pkgs/by-name/vz')
-rw-r--r--pkgs/by-name/vz/vzic/package.nix60
1 files changed, 60 insertions, 0 deletions
diff --git a/pkgs/by-name/vz/vzic/package.nix b/pkgs/by-name/vz/vzic/package.nix
new file mode 100644
index 0000000000000..4e645e096bbf5
--- /dev/null
+++ b/pkgs/by-name/vz/vzic/package.nix
@@ -0,0 +1,60 @@
+{
+  stdenv,
+  lib,
+  buildPackages,
+  fetchFromGitHub,
+  pkg-config,
+  glib,
+  libical,
+}:
+stdenv.mkDerivation rec {
+  pname = "vzic";
+  version = "0-unstable-2024-06-04";
+
+  src = fetchFromGitHub {
+    owner = "libical";
+    repo = "vzic";
+    rev = "354296149e65ca31932c514fddb7435cb47671e9";
+    hash = "sha256-L6BIHr3tfw51AoSvZMlP3HWEWXfEaPa8nq1aJOqcNkE=";
+  };
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace-fail 'pkg-config' "$PKG_CONFIG"
+  '';
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    glib
+    libical
+  ];
+
+  env = {
+    OLSON_DIR = "tzdata2024a";
+    PRODUCT_ID = "-//NixOS//NONSGML Citadel calendar//EN";
+    TZID_PREFIX = "/NixOS/Olson_%D_1/";
+  };
+
+  # no install rule in Makefile
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/share/vtimezone
+    ${stdenv.hostPlatform.emulator buildPackages} ./vzic --output-dir $out/share/vtimezone
+    install -Dm744 vzic $out/bin/vzic
+
+    runHook postInstall
+  '';
+
+  meta = {
+    homepage = "https://github.com/libical/vzic";
+    description = "A program to convert the IANA timezone database files into VTIMEZONE files compatible with the iCalendar specification";
+    changelog = "https://github.com/libical/vzic/blob/${src.rev}/ChangeLog";
+    mainProgram = "vzic";
+    license = with lib.licenses; [ gpl2Plus ];
+    maintainers = with lib.maintainers; [ moraxyc ];
+    broken = !stdenv.hostPlatform.emulatorAvailable buildPackages;
+    platforms = lib.platforms.unix;
+  };
+}