ceph-csi: refactor

- migrate sha256 to hash
- add install runHook
- order derivation by phases order, attrs by alphabetical order
- enable strictDeps
- meta: add changelog, downloadPage, remove nested with
This commit is contained in:
superherointj 2024-08-12 17:02:42 -03:00
parent 0599045c7c
commit 06f1086c5b

View File

@ -1,34 +1,41 @@
{ stdenv, lib, go, ceph, fetchFromGitHub }:
{ ceph, fetchFromGitHub, go, lib, stdenv }:
stdenv.mkDerivation rec {
pname = "ceph-csi";
version = "3.11.0";
nativeBuildInputs = [ go ];
buildInputs = [ ceph ];
src = fetchFromGitHub {
owner = "ceph";
repo = "ceph-csi";
rev = "v${version}";
sha256 = "sha256-EgHl74kJ6lTS3pqz/Hxh/2tpc1xiDNcJxzERwKops+A=";
hash = "sha256-EgHl74kJ6lTS3pqz/Hxh/2tpc1xiDNcJxzERwKops+A=";
};
preConfigure = ''
export GOCACHE=$(pwd)/.cache
'';
strictDeps = true;
nativeBuildInputs = [ go ];
buildInputs = [ ceph ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp ./_output/* $out/bin
runHook postInstall
'';
meta = with lib; {
homepage = "https://ceph.com/";
meta = {
description = "Container Storage Interface (CSI) driver for Ceph RBD and CephFS";
downloadPage = "https://github.com/ceph/ceph-csi";
changelog = "https://github.com/ceph/ceph-csi/releases/tag/v${version}";
homepage = "https://ceph.com/";
license = lib.licenses.asl20;
mainProgram = "cephcsi";
license = [ licenses.asl20 ];
maintainers = with maintainers; [ johanot ];
maintainers = with lib.maintainers; [ johanot ];
platforms = [ "x86_64-linux" "aarch64-linux" ];
};
}