Merge pull request #189869 from baloo/baloo/ovmfvartool/python-package
ovmfvartool: use as a python package
This commit is contained in:
commit
09e11e3ffc
@ -1,33 +0,0 @@
|
||||
{ lib, stdenvNoCC, fetchFromGitHub, python3 }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "ovmfvartool";
|
||||
version = "unstable-2021-06-16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hlandau";
|
||||
repo = pname;
|
||||
rev = "c4c0c24dce1d201f95dfd69fd7fd9d51ea301377";
|
||||
hash = "sha256-3OvYAB41apPn1c2YTKBIEITmHSUMQ0oEijY5DhZWWGo=";
|
||||
};
|
||||
|
||||
postPatch = let
|
||||
pythonPkg = python3.withPackages (p: with p; [ pyyaml ]);
|
||||
in ''
|
||||
# needed in build but /usr/bin/env is not available in sandbox
|
||||
substituteInPlace ovmfvartool \
|
||||
--replace "/usr/bin/env python3" "${pythonPkg.interpreter}"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install -m 755 ovmfvartool $out/bin/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Parse and generate OVMF_VARS.fd from Yaml";
|
||||
homepage = "https://github.com/hlandau/ovmfvartool";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ baloo raitobezarius ];
|
||||
};
|
||||
}
|
27
pkgs/development/python-modules/ovmfvartool/default.nix
Normal file
27
pkgs/development/python-modules/ovmfvartool/default.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ lib, buildPythonPackage, fetchFromGitHub, pyyaml }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "ovmfvartool";
|
||||
version = "unstable-2022-09-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hlandau";
|
||||
repo = pname;
|
||||
rev = "45e6b1e53967ee6590faae454c076febce096931";
|
||||
hash = "sha256-XbvcE/MXNj5S5N7A7jxdwgEE5yMuB82Xg+PYBsFRIm0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ pyyaml ];
|
||||
|
||||
# has no tests
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "ovmfvartool" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Parse and generate OVMF_VARS.fd from Yaml";
|
||||
homepage = "https://github.com/hlandau/ovmfvartool";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ baloo raitobezarius ];
|
||||
};
|
||||
}
|
@ -23368,8 +23368,6 @@ with pkgs;
|
||||
tpmSupport = true;
|
||||
};
|
||||
|
||||
ovmfvartool = callPackage ../applications/virtualization/ovmfvartool { };
|
||||
|
||||
ops = callPackage ../applications/virtualization/ops { };
|
||||
|
||||
seabios = callPackage ../applications/virtualization/seabios { };
|
||||
|
@ -6480,6 +6480,8 @@ in {
|
||||
|
||||
ovh = callPackage ../development/python-modules/ovh { };
|
||||
|
||||
ovmfvartool = callPackage ../development/python-modules/ovmfvartool { };
|
||||
|
||||
ovoenergy = callPackage ../development/python-modules/ovoenergy { };
|
||||
|
||||
owslib = callPackage ../development/python-modules/owslib { };
|
||||
|
Loading…
Reference in New Issue
Block a user