-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopen-vmdk.nix
50 lines (43 loc) · 996 Bytes
/
open-vmdk.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
lib,
stdenv,
fetchFromGitHub,
python3,
zlib,
}:
stdenv.mkDerivation rec {
pname = "open-vmdk";
version = "0.3.7";
src = fetchFromGitHub {
owner = "vmware";
repo = "open-vmdk";
rev = "v${version}";
hash = "sha256-sxsTX6Au9YW233pkQ//g1y3412tLyDqmLX8sT3wNf2k=";
};
installFlags = ["PREFIX=$(out)"];
nativeBuildInputs = [
python3
python3.pkgs.wrapPython
zlib
];
pythonPath = with python3.pkgs; [
pyyaml
lxml
];
postPatch = ''
sed -i '/open-vmdk.conf/d' ova/Makefile
substituteInPlace ova/mkova.sh \
--replace 'PREFIX=/usr' "PREFIX=$out" \
--replace 'vmdk-convert' "$out/bin/vmdk-convert"
'';
postFixup = ''
wrapPythonPrograms
'';
meta = with lib; {
description = "Assistant tool for creating Open Virtual Appliance (OVA)";
homepage = "https://github.com/vmware/open-vmdk";
license = licenses.apsl20;
platforms = platforms.unix;
maintainers = with maintainers; [vifino];
};
}