about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorYisuiDenghua <bileiner@gmail.com>2023-03-08 00:12:29 +0800
committer百地 希留耶 <65301509+KiruyaMomochi@users.noreply.github.com>2023-03-23 08:44:50 +0800
commitc5ab8fd93f9315988a17a9dfbd7127760466c6bb (patch)
tree5738fbf596198ec7701f2d8ccbf6c81843db16d5 /pkgs/tools
parentdbb9642b6097d5405d7e9ac5bbb1bb13cd7b0b6e (diff)
downloadnixlib-c5ab8fd93f9315988a17a9dfbd7127760466c6bb.tar
nixlib-c5ab8fd93f9315988a17a9dfbd7127760466c6bb.tar.gz
nixlib-c5ab8fd93f9315988a17a9dfbd7127760466c6bb.tar.bz2
nixlib-c5ab8fd93f9315988a17a9dfbd7127760466c6bb.tar.lz
nixlib-c5ab8fd93f9315988a17a9dfbd7127760466c6bb.tar.xz
nixlib-c5ab8fd93f9315988a17a9dfbd7127760466c6bb.tar.zst
nixlib-c5ab8fd93f9315988a17a9dfbd7127760466c6bb.zip
ciel: init at 3.1.4
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/package-management/ciel/default.nix66
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/tools/package-management/ciel/default.nix b/pkgs/tools/package-management/ciel/default.nix
new file mode 100644
index 000000000000..0fe289011640
--- /dev/null
+++ b/pkgs/tools/package-management/ciel/default.nix
@@ -0,0 +1,66 @@
+{ lib
+, bash
+, dbus
+, fetchFromGitHub
+, fetchpatch
+, installShellFiles
+, libgit2
+, libssh2
+, openssl
+, pkg-config
+, rustPlatform
+, systemd
+, xz
+, zlib
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "ciel";
+  version = "3.1.4";
+
+  src = fetchFromGitHub {
+    owner = "AOSC-Dev";
+    repo = "ciel-rs";
+    rev = "refs/tags/v${version}";
+    hash = "sha256-b8oTVtDcxrV41OtfuthIxjbgZTANCfYHQLRJnnEc93c=";
+  };
+
+  cargoHash = "sha256-11/Yf1hTKYRsQKzvwYXgyPuhIZwshwSJ8sNykUQRdoo=";
+
+  nativeBuildInputs = [ pkg-config installShellFiles ];
+
+  # ciel has plugins which is actually bash scripts.
+  # Therefore, bash is required for plugins to work.
+  buildInputs = [ bash systemd dbus openssl libssh2 libgit2 xz zlib ];
+
+  patches = [
+    # cli,completions: use canonicalize path to find libexec location
+    # FIXME: remove this patch after https://github.com/AOSC-Dev/ciel-rs/pull/16 is merged
+    (fetchpatch {
+      name = "use-canonicalize-path-to-find-libexec.patch";
+      url = "https://github.com/AOSC-Dev/ciel-rs/pull/16.patch";
+      sha256 = "sha256-ELK2KpOuoBS774apomUIo8q1eXYs/FX895G7eBdgOQg=";
+    })
+  ];
+
+  postInstall = ''
+    mv -v "$out/bin/ciel-rs" "$out/bin/ciel"
+
+    # From install-assets.sh
+    install -Dm555 -t "$out/libexec/ciel-plugin" plugins/*
+
+    # Install completions
+    installShellCompletion --cmd ciel \
+      --bash completions/ciel.bash \
+      --fish completions/ciel.fish \
+      --zsh completions/_ciel
+  '';
+
+  meta = with lib; {
+    description = "A tool for controlling AOSC OS packaging environments using multi-layer filesystems and containers.";
+    homepage = "https://github.com/AOSC-Dev/ciel-rs";
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ yisuidenghua ];
+  };
+}