python312Packages.vdf: avoid using pname for src.repo
[NixPkgs.git] / pkgs / os-specific / linux / vdo / default.nix
blobdc0a30732ed02c4da89a8a26d1377c53142e1fd7
1 { lib, stdenv
2 , fetchFromGitHub
3 , installShellFiles
4 , libuuid
5 , lvm2_dmeventd  # <libdevmapper-event.h>
6 , zlib
7 , python3
8 }:
10 stdenv.mkDerivation rec {
11   pname = "vdo";
12   version = "8.3.0.71";
14   src = fetchFromGitHub {
15     owner = "dm-vdo";
16     repo = pname;
17     rev = version;
18     hash = "sha256-FZerMUzth43p5jvKQalyYcW+mrl6SLjS8GrivY2qWkI=";
19   };
21   nativeBuildInputs = [
22     installShellFiles
23   ];
25   buildInputs = [
26     libuuid
27     lvm2_dmeventd
28     zlib
29     python3.pkgs.wrapPython
30   ];
32   propagatedBuildInputs = with python3.pkgs; [
33     pyyaml
34   ];
36   pythonPath = propagatedBuildInputs;
38   makeFlags = [
39     "DESTDIR=${placeholder "out"}"
40     "INSTALLOWNER="
41     # all of these paths are relative to DESTDIR and have defaults that don't work for us
42     "bindir=/bin"
43     "defaultdocdir=/share/doc"
44     "mandir=/share/man"
45     "python3_sitelib=${python3.sitePackages}"
46   ];
48   enableParallelBuilding = true;
50   postInstall = ''
51     installShellCompletion --bash $out/usr/share/bash-completion/completions/*
52     rm -rv $out/usr
54     wrapPythonPrograms
55   '';
57   meta = with lib; {
58     homepage = "https://github.com/dm-vdo/vdo";
59     description = "Set of userspace tools for managing pools of deduplicated and/or compressed block storage";
60     # platforms are defined in https://github.com/dm-vdo/vdo/blob/master/utils/uds/atomicDefs.h
61     platforms = [ "x86_64-linux" "aarch64-linux" "s390-linux" "powerpc64-linux" "powerpc64le-linux" ];
62     license = with licenses; [ gpl2Plus ];
63     maintainers = teams.helsinki-systems.members;
64   };