nixpkgs/pkgs/by-name/ci/ciel/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

62 lines
1.4 KiB
Nix

{ lib
, bash
, dbus
, fetchFromGitHub
, installShellFiles
, libgit2
, libssh2
, openssl
, pkg-config
, rustPlatform
, systemd
, xz
, zlib
}:
rustPlatform.buildRustPackage rec {
pname = "ciel";
version = "3.3.0";
src = fetchFromGitHub {
owner = "AOSC-Dev";
repo = "ciel-rs";
rev = "refs/tags/v${version}";
hash = "sha256-vV1qZLVVVc6KFZrpF4blKmbfQjf/Ltn+IhmM5Zqb2zU=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"libmount-0.1.15" = "sha256-JObYz6AUWhvz8q+9DdsbMWm7zNQmMW73WAt+LjY5TV0=";
};
};
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 ];
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 = "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; [ A1ca7raz yisuidenghua ];
mainProgram = "ciel";
};
}